Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Create Invoice + payment automatically

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

Former Member
replied

Hi Gábor,

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

Please check this reply:

Sorry,

Frank

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question