Using the standard 'create invoice from salesorder' in workflows - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18) +--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4) +--- Thread: Using the standard 'create invoice from salesorder' in workflows (/showthread.php?tid=338) |
RE: Using the standard 'create invoice from salesorder' in workflows - Guido1982 - 08-09-2016 Again, it is good to have you around. Would have never known this otherwise. Will test and let you know. RE: Using the standard 'create invoice from salesorder' in workflows - Guido1982 - 08-09-2016 Well, I seem to have it working. But I still do not understand why the first method did not work, since we had basically the same approach. We only seem to be taking a longer way around now (I must be missing something). Please take a look at this commit. You won't need all of it, and I'm going to rename it to something else for my own purposes (with a 'cbx' prefix, the reason being that I really need the exact payment conditions and the no. of days to be set per workflow). What I do not understand (and would like to):
Some things that may be weird I will explain:
And now, it is not working again.... I have no idea why. Again no product lines. Hmm, it only works when you do a full save.. Not an edit... I guess the system's 'pdoInformation' retrieval cannot be trusted. RE: Using the standard 'create invoice from salesorder' in workflows - Guido1982 - 08-10-2016 I've been fighting with this all day now and just can't get it to work. I've tried everything I could think of, my last approach was to create an invoice without any productlines and then re-retrieve the productlines from the sales order through a different class method of the workflow class. This class method would then revise the invoice with the product lines from the sales order. So basically split the invoice creation from the inventorylines creation. Nothing works on quick-edit. I can only get it to work on full-save. I'm kind of running out of ideas... I did however, find this... Which maybe part of the problem? RE: Using the standard 'create invoice from salesorder' in workflows - Guido1982 - 08-11-2016 In the end.. It was one line that was needed.. And a couple of hours diggind around, but that taught me a lot about the system.. I created a PR, but I don't think it's quite OK yet. Still needs some sanitizing.. RE: Using the standard 'create invoice from salesorder' in workflows - joebordes - 08-27-2016 just for reference and completeness in case anybody lands here, we now have this functionality for all four inventory modules in the application: https://github.com/tsolucio/corebos/pull/87 |