on 03-31-2006 3:17 PM
Hi!
I make an application, that inserts to SBO database invoices with payments automatically.
Now they are shown in the "A/R Invoice" form correctly, but we want to show them in the "A/R Invoice + Payment" form.
What can I set in the Invoice and/or Payment object to request my invoices in this form?
The program uses only the DI API with Delphi7. The part of the source:
// Invoice interface:
EgySzla:=SBO.SBOCompany.GetBusinessObject(oInvoices) As Documents;
// Invoice head:
EgySzla.DocObjectCode:=oInvoices;
EgySzla.CardCode:=PChar(ediUgyfel.Text);
EgySzla.ManualNumber:=ApNum'/'PChar(ediNyugta.Text); // ECR receipt identifier
EgySzla.DocTotal:=Forgalom.RcpTotal;
// Invoice details:
EgySzla.Lines.ItemCode:=Forgalom.Tetel.ItemCode;
EgySzla.Lines.PriceAfterVat:=Forgalom.Tetel.Price;
EgySzla.Lines.Quantity:=Forgalom.Tetel.Count;
// Insert:
RetCode:=EgySzla.Add; // Works fine!
...
// Payment interface:
EgyFiz:=SBO.SBOCompany.GetBusinessObject(oIncomingPayments) As Payments;
// Payment head:
EgyFiz.CardCode:=PChar(ediUgyfel.Text);
EgyFiz.ApplyVAT:=tYes;
EgyFiz.CashSum:=MTotal;
EgyFiz.Reference1:=PChar(IntToStr(SzlaSz));
// Payment.Invoice details:
EgyFiz.Invoices.DocEntry:=SzlaSz; // from OINV.DocNum
EgyFiz.Invoices.InvoiceType:=oInvoices;
EgyFiz.Invoices.SumApplied:=MTotal;
// Insert:
RetCode:=EgyFiz.Add; // Works fine, too!
...
Thanks all!
Gábor
Hi Gábor,
Unfortunately this option (ASFAIK it's "just" a flag) is not available through DI API.
Please check this reply:
Sorry,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey!
i am also trying to post an invoice with payment! at the moment i am posting a sales order but i have some problems posting the invoice correctly! which fields do you set before posting the invoice and where do you get the DocTotal from?
Thanks!
Maggie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Hey!
>
> i am also trying to post an invoice with payment! at
> the moment i am posting a sales order but i have some
> problems posting the invoice correctly! which fields
> do you set before posting the invoice and where do
> you get the DocTotal from?
> Thanks!
> Maggie
I suggest to read the Order and Invoice exemple from the SDK Help Center
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.