Difference between revisions of "Invoice save"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "Category:Cost {{HelpFiles}} = Invoice_save = == Syntax == Invoice_save (array invoiceObject); == Arguments == array ''invoiceObject'' == Return type == Empty ==...")
 
(Arguments)
(Tag: visualeditor)
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
= Invoice_save =
 
= Invoice_save =
  
 
+
Save Invoice after create new ''[[Invoice_new]]'' or after edit an existing [[Invoice_getInvoiceByResourceId]]
  
 
== Syntax ==
 
== Syntax ==
Line 13: Line 13:
 
== Arguments ==
 
== Arguments ==
  
array ''invoiceObject''
+
array. See more at ''[[CGS Constants list#Invoice constant|invoiceObject]] or [[Invoice_new]]''
  
 
== Return type ==
 
== Return type ==

Latest revision as of 05:22, 11 January 2018



Invoice_save

Save Invoice after create new Invoice_new or after edit an existing Invoice_getInvoiceByResourceId

Syntax

Invoice_save (array invoiceObject);

Arguments

array. See more at invoiceObject or Invoice_new

Return type

Empty

Example

string ledgerName = "test4";
string ledgerEntryDescription = "123";
array ledgerEntry = LedgerEntry_new(ledgerName, ledgerEntryDescription);
string invoiceName = "test1";
number parentResourceId = 11088827;
number eraningUserRId = 10768810;
array invoiceDate = getCurrentDateTime();
array dueDate = getCurrentDateTime();
number templateInvoiceRId = 2111;
array invoice = Invoice_new (invoiceName, parentResourceId, eraningUserRId, invoiceDate, dueDate, templateInvoiceRId);
invoice[INVOICE_LEDGER] = {ledgerEntry};
Invoice_save(invoice);