xtuple/xtuple — pull request #2097 by jcarlin (2014-12-22 21:45:26+00:00)
Title: Print duplicate label quantities for qty transacted

Shortcut UAT:
Add `console.log("printQty: ", printQty);`here: https://github.com/xtuple/xtuple/blob/4_8_x/node-datasource/routes/generate_report.js#L337, restart the datasource. To setup and print to cups 'pdf' printer:
1. Install CUPS and CUPS-PDF
2. Add the Printer to the Printer object in Setup > Printers. Use the EXACT name as the CUPS printer name
3. Navigate home then Actions > Preferences and set all of the pickers to PDF, save.

1. Create a Sales Order (I TTOYS and BTRUCK1, qty of 10). Select the order from the Sales Order list, tap the action gear Issue to Shipping.
2. Tap the line item and Issue Item, enter qty 2, Issue. 2 labels should print ("printQty: 10" should display in your datasource log).
3. Tap the line item in the Issue to Shipping list and select Print from the action gear, 8 labels should print, "printQty: 8" should display in your datasource log.

Repeat the above (1-3) for Purchase Order - Receipt, Work Order - Issue to Shipping & Post Production, Transfer Order - Ship and Receive.

What I did to print qty with cups pdf printer (pdf UAT):
With CUPS-PDF. I had to configure a couple things in cups - change the default output (print) directory and allow multiple copies (cupsManualCopes) in the PDF.ppd printer config file.
1. Make a directory called PDF in your user's home directory.
2. sudo vi /etc/cups/cups/cups-pdf.conf and change the following:
> #Out /var/spool/cups-pdf/${USER}
> Out /home/{your user name}/PDF
3. Edit the cups pdf printer settings file that should be located here: `/etc/cups/ppd/PDF.ppd`. Add `*cupsManualCopies: True` and save.
4. Run `sudo service cups restart`.
5. Navigate to localhost:631 > Administration > Manage Printers > click on PDF (or whatever your printer's name is) > Administration drop down menu, select Modify Printer > Continue > Continue > 'Or Provide a PPD File' click Choose File, select your ppd file (/etc/cups/ppd/PDF.ppd) > Modify Printer.

1. Create a Sales Order (I TTOYS and BTRUCK1, qty of 10). Select the order from the Sales Order list, tap the action gear Issue to Shipping.
2. Tap the line item and Issue Item, enter qty 2, Issue. 2 labels should print ("printQty: 10" should display in your datasource log).
3. Tap the line item in the Issue to Shipping list and select Print from the action gear, 8 labels should print, "printQty: 8" should display in your datasource log.

Repeat the above (1-3) for Purchase Order - Receipt, Work Order - Issue to Shipping & Post Production, Transfer Order - Ship and Receive.