Get sales price, purchase, sales discount for item like sales line
Nghia Song
Tel - WhatsApp: +84967324794
Email: songnghia.uit@gmail.com
{
PriceDisc_Price priceDisc_Price = PriceDisc_Price::construct();
PriceDisc_LineDisc priceDisc_LineDisc;
//TODO: sell price and sell off
priceDisc_Price.parmModuleType(ModuleInventPurchSales::Sales);
priceDisc_Price.parmItemId(inventJournalTransNew.ItemId);
priceDisc_Price.parmInventDim(newInventDim);
priceDisc_Price.parmUnitID(scanUnitId);
priceDisc_Price.parmPriceDate(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()));
priceDisc_Price.parmQty(inventJournalTransNew.Qty);
priceDisc_Price.parmAccountNum("");
priceDisc_Price.parmCurrencyCode(Ledger::accountingCurrency(CompanyInfo::current()));
inventJournalTransNew.VtvSellPrice = priceDisc_Price.price();
priceDisc_LineDisc.parmModuleType(ModuleInventPurchSales::Sales);
priceDisc_LineDisc.parmItemId(inventJournalTransNew.ItemId);
priceDisc_LineDisc.parmInventDim(newInventDim);
priceDisc_LineDisc.parmUnitID(scanUnitId);
priceDisc_LineDisc.parmDiscDate(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()));
priceDisc_LineDisc.parmQty(inventJournalTransNew.Qty);
priceDisc_LineDisc.parmAccountNum("");
priceDisc_LineDisc.parmCurrencyCode(Ledger::accountingCurrency(CompanyInfo::current()));
inventJournalTransNew.VtvPercentSalesOff = priceDisc_LineDisc.discPct();
inventJournalTransNew.VtvDiscountAmount = priceDisc_LineDisc.discAmount();
}
No comments:
Post a Comment