So here is code for its reading:
InventTable inventTable = InventTable::find( '5801-105-535-ND_0_0000' ); PriceDisc priceDisc; PriceCur iPrice; if ( inventTable ) { /* -- find sales price for item, dimension, unit, date and company */ priceDisc = new PriceDisc( ModuleInventPurchSales::Sales, inventTable.ItemId, null, 'ks', systemdateget(), 1, 'COMPANY_AG' ); if ( priceDisc.findPrice( CustTable::find( 'COMPANY_AG' ).PriceGroup ) ) iPrice = priceDisc.price(); /*else if ( priceDisc.findItemPrice() ) iPrice = priceDisc.price();*/ info( "Sales price: " + num2str( iPrice, 15, 2, 1, 0 ) ); }Output could be:
Sales price: 20.50
No comments:
Post a Comment