A simple way to check if all sales orders are invoiced - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Modules/Extension Support (https://discussions.corebos.org/forumdisplay.php?fid=9) +--- Thread: A simple way to check if all sales orders are invoiced (/showthread.php?tid=203) |
A simple way to check if all sales orders are invoiced - Guido1982 - 11-18-2015 I wrote a small file that does only one simple thing: Check if the sum of all invoices related to a sales order is at least equal to the sales order total. I other words, you can check if you didn't forget to create invoices. It creates a very simple table. Take this code and place it in a NEW file called SO_Invoiced.php, in the modules/SalesOrder folder: PHP Code: <?php No point your browser to Code: http://{your-crm-url}/index.php?module=SalesOrder&action=SalesOrderAjax&file=SO_Invoiced If you used a different filename, change the last part of the URL (after 'file=') to your file name. RE: A simple way to check if all sales orders are invoiced - joebordes - 11-18-2015 You could add this as an inline detail view block on the invoices: http://corebos.org/documentation/doku.php?id=en:devel:add_special_block very useful RE: A simple way to check if all sales orders are invoiced - Guido1982 - 11-19-2015 Hey Joe, Thanks, I was planning on implementing this into the system. Just not sure in what form yet. The current behaviour is derived from the workflow that sales orders are leading and the company I made this for wants to list all of them to see if they are totally invoiced. I was thinking in incorporating this into the sales order listview, preceded by a popup that lets you choose things like the timeframe of orders you'd like to check, the status ( or multiple) you'd like to in- or exclude and then maybe the possibility to create a PDF (I have some experience with MPDF). Your idea would work as well, only I would add this to the sales order detailview, since it is meant to see if a sales order was completely invoiced. As soon I have a little time, I'll put some work into this. RE: A simple way to check if all sales orders are invoiced - joebordes - 11-19-2015 What I usually do for this use case is add a button to the list view (your ideas is along the right path :-) ). That way the user can use all the filtering conditions and or search facilities the application gives you, which the user already knows how to use, the user then selects the SO he wants to check and the button goes off to another script which receives the list of selected records and does the magic it has to do. HTH RE: A simple way to check if all sales orders are invoiced - Guido1982 - 11-19-2015 Thanks, I'll try to create something that takes advantage of the already in place filter mechanism. Basically I need to alter my starting-point (a query that retrieves ALL sales orders since january first of the current year) into something that creates a set of sales orders in the current filter view and start collecting invoices from there I think. The rest of the script can stay the same (more or less). RE: A simple way to check if all sales orders are invoiced - Guido1982 - 12-01-2015 Code: Optional Step: Custom Links I'm guessing you meant this? Will implement this when I'm finished with my current Exactonline project. RE: A simple way to check if all sales orders are invoiced - joebordes - 12-01-2015 Yes, a DETAILVIEWWIDGET with the "block:/" option |