Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Discount Negative

$
0
0

Hi Experts,

 

I'am using DI API to post purchase order but my problem is that when i use the gross price on posting my discount is automatically set to negative but if i use unit price it is ok. I need to use the gross price not unit price. you can see on my screenshot below. Can you please help me.

 

Here's my PHP code:

 

$oPo = $vCmp->GetBusinessObject(22);

$oPo->CardCode = $vendor;

$oPo->DocDate = $documentdate;

$oPo->DocDueDate = $deliverydate;

$oPo->TaxDate = $postingdate;

$oPo->DiscountPercent = ($discPercent == '')? 0 : $discPercent;

$oPo->PaymentGroupCode = $paymentterms;

$oPo->Comments = $remarks; //SET REMARKS

$oPo->Series = $series;

$oPo->BPL_IDAssignedToInvoice = $bplid;

 

 

 

$oPo->Lines->ItemCode = $value[0];

$oPo->Lines->DiscountPercent = 0;

$oPo->Lines->PriceAfterVAT = $value[6];

$oPo->Lines->Quantity = $value[1];

$oPo->Lines->WarehouseCode = $value[3];

$oPo->Lines->VatGroup = $value[4];

$oPo->Lines->Add();

 

$retval = $oPo->Add();

 

 

discprob.png


Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>