I've nearly completed a script to load sales invoices into LedgerSMB
based on XML data from an external source. Many thanks to Erik. One last piece of the puzzle: adding a payment. Using store procedure (function) payment_post seems a good way to procedure, but a few of its many arguments are not clear to me. I can finish up this load script if someone can give me some guidance on the arguments. I've tried calling the function, but it errors saying that either the function does not exist (of course it does) or parameters are incorrect. I'm assuming that an argument containing "op_" means overpayment. Since I'm not an accountant, I'm understanding what to supply in each argument. Below is the function signature: function payment_post( in_datepaid date, in_account_class integer, in_entity_credit_id integer, in_curr character, in_notes text, in_department_id integer, in_gl_description text, in_cash_account_id integer[], in_amount numeric[], in_cash_approved boolean[], in_source text[], in_memo text[], in_transaction_id integer[], in_op_amount numeric[], in_op_cash_account_id integer[], in_op_source text[], in_op_memo text[], in_op_account_id integer[], in_ovp_payment_id integer[], in_approved boolean ) Thanks.
Brian
Brian Wolf
Phone: 410.367.2958
Email: ..hidden..
Try out Activus
Secure Payments™, our recurring payments
application.
Demo at http://demo.activustech.com
-------- Original Message --------
Just to confirm............
Using the LedgerSMB UI, I created a sales invoice containing two parts, and posted the invoice along with a payment. I can see five rows in the ACC_TRANS table. For each part, ACC_TRANS contains one row with account ID = 15 ('4010' Sales). There are two rows with account ID = 3 ('1200' AR), with offsetting amounts (i.e., one positive and one negative). The additional row has account ID = 1 ('1060' Checking), with a negative amount equal to the sum of the parts amounts. Thanks.
Brian Brian Wolf
Phone: 410.367.2958
Email: ..hidden..
Try out Activus
Secure Payments™, our recurring payments
application.
Demo at http://demo.activustech.com
|
------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev
_______________________________________________ Ledger-smb-users mailing list ..hidden.. https://lists.sourceforge.net/lists/listinfo/ledger-smb-users