cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business One - Service Layer double Problem

0 Kudos

Hi ,

I set the Quantities decimal settings to 6 ..

Administrator->System Initialization->General Settings ->Display-> Quantities -> 6

Then i try to add new Purchase Invoice with ServiceLayer.

Document invoice = new Document();

invoice.CardCode = "S001";

invoice.DocDate = docdate;

invoice.DocDueDate = docdate;

invoice.TaxDate = docdate;

invoice.DocCurrency = "TRY";

invoice.DocType = "dDocument_Item";

invoice.DownPaymentType = "tYES";

Document_Lines newLine = new Document_Lines();

newLine.ItemCode = "I001";

newLine.UnitPrice = 10000;

newLine.Quantity = 0.0003;

newLine.VatGroup = "P05";

Invoice.DocumentLines.Add(newLine);

Document newInvoice = currentOdataService.AddNewPurchaseInvoice(Invoice);

It adds invoice correctly when newLine.Quantity = 0.0003.

But when I change the quantity line to newLine.Quantity = 0.00003. it adds invoice incorrectly. The invoice quantity changes to 1. How can i add invoice when quantity is smaller than 0.0001 with service layer.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gul Ay,

Kindly help to confirm your SAP Business One Version along with the Localization in question. I haven't been able to reproduce this issue in the DEMO Database (UK) on SAP Business One Version 9.3 PL05.

Also, if possible, please help to provide some additional information about the issue.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ralph Oliveira,

I will be checking this issue further at my side.

Gul Ay, if you will be reporting the issue to SAP Business One Support Team, please mention the link of this thread in the incident.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

former_member197733
Contributor
0 Kudos

Ok, your approach is better anyway..
I will withdraw my answer.

former_member374449
Participant
0 Kudos

Hi Ankit,

I am trying to create a sales order via SAP HANA Service Layer using Services metadata.

So I am going through several websites.

I found this "currentOdataService" word in several code which are provided in websites.

I wanted to know how we can create this object and what is the used of it.

Thanks & Regards.

Manish Pant