Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using the standard 'create invoice from salesorder' in workflows
#22
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):
  • Why the previous version (that was smaller and didn't have as many work-arounds) did not worl while it was basically doing the same.
  • What the $meta object is, and why you need it to sanitize the input.

Some things that may be weird I will explain:
  • 'Assigned user ID' was not created by the 'getConvertSoToInvoice' function. Although it was there in the salesorder instance (so_focus), it was empty after calling the function 'getConvertSoToInvoice'.
  • I set the invoice status to 'AutoCreated', since it is being created automatically in this case.

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.
Reply


Messages In This Thread
RE: Using the standard 'create invoice from salesorder' in workflows - Guido1982 - 08-09-2016, 08:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)