Daily Invoice Mailing ********************** This document is used to docment the process of emailing and and snail mailing out the daily invoices. This document will likely change often as the program gets features added. Running the R-8-8 Report ========================= Start by using changing company or selecting company 1 (Berkley) from the Change Company Menu(F10). The key strokes for the report are R-8-8. This will give you an option window. This report needs to be run to a spreadsheet so select *"Y"* for that option. .. image:: images/dailyInvoiceMailOptions.png The system will ask for a date range to run the report for. This is typically the day before but on monday it needs to be run twice. Once for Friday and once for Saturday. Press the Begin button once you have inputted the correct dates. .. image:: images/dailyInvoiceMailDate.png That will run the report. It takes 5-10 minutes. Excel will open up with the report when it is complete. Nothing needs to be done with the report except to save it as an excel spreadsheet. The name that it has to be saved as is "R88 month day" where month is the 3 character abreviation and day is a numerical representation. Do not add any 0's before any numbers. An example would be **"R88 Dec 1"** .. image:: images/dailyInvoiceMailExcelSave.png .. image:: images/dailyInvoiceMailName.png After you have saved the file you may close Excel. Generating the Invoices ======================== You may now generate the invoices. This must be done on a computer that has Print Wizard installed and correctly setup. Be sure that you are still in the Berkley store (store one). From the main menu press *2 Order Processing*. Put in your login credentials and then select **G** from the drop down menu. You may get the following error, ignore it and click ok. .. image:: images/dailyInvoiceMailTermError.png You will also get the following warning about pdfs not being created. We typically create pdfs on the day following the invoice date. Just press the *OK* button. .. image:: images/dailyInvoiceMailPdfError.png Select the date that you wish to process the invoices. Keep in mind that if you create invoices for the wrong day, you will overwrite the invoices that may have already been there. Click on the *Generate PDFs [1]* tab. At the bottom of the page there is a toggle to just run for those customers who have at least one email address set up wit us. Since we are only emailing invoices, be sure to change this to a *Y*. .. image:: images/dailyInvoiceMailCustomer.png Then press begin. Depending on the amount of invoices that the system creates, it may take some time. Once this is complete the program needs to be run to remove the 0 balance invoices and the credit memos from the queue. At this point the system requires that a PC with Printwizard is used to generate the invoices, I cannot automate the process entirely. The invoiceHelper program is currently a commandline only program that requires up to one argument and will print the output to standard I/O. If a report is needed, redirect standard I/O to a file .. code:: bash PS C:\Users\jeremy\Documents\Projects\programming\invoiceHelper> .\invoiceHelper.py > output.txt This will send the report to a file in the current directory named output.txt. You can then print it or email it out. Below is sample output .. code:: bash PS C:\Users\jeremy\Documents\Projects\programming\invoiceHelper> .\invoiceHelper.py -saturday O:\Daily contract emailing\R88 Dec 26.xlsx Invoice To Email 2 7256854 5035086 Invoice to Mail 0 PS C:\Users\jeremy\Documents\Projects\programming\invoiceHelper> This report shows any invoices that will be emailed, the total number being emailed, the invoices that need to be hand mailed and the total number of those invoices. This should be run every morning, but invoices from Friday and Saturday will be run on Monday. To run the script for those days add an argument to the program call corresponding to the day that you are running it for. .. code:: bash PS C:\Users\jeremy\Documents\Projects\programming\invoiceHelper> .\invoiceHelper.py -saturday PS C:\Users\jeremy\Documents\Projects\programming\invoiceHelper> .\invoiceHelper.py -friday Now you can actually email the invoices. Back in the GUI session