cancel
Showing results for 
Search instead for 
Did you mean: 

Create Invoice + payment automatically

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member185703
Active Contributor
0 Kudos

Hi Gábor,

Unfortunately this option (ASFAIK it's "just" a flag) is not available through DI API.

Please check this reply:

Sorry,

Frank

Former Member
0 Kudos

Thank You, Frank!

Not problem, we will set IsICT "manually"... Life is life!

Best regards

Gábor

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

> 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