parent
b8bdd0ff64
commit
3fcf307d1d
|
|
@ -65,7 +65,7 @@ public class MID_UploadTPB extends SvrProcess{
|
|||
order.set_ValueNoCheck("MID_AJUDocumentType_ID", MID_AJUDocType_ID);
|
||||
|
||||
int C_BPartner_ID = DB.getSQLValue(get_TrxName(), "SELECT C_BPartner_ID FROM C_Bpartner WHERE Name =? AND AD_Client_ID =?", new Object[] { row.getCell(3).getStringCellValue(), getAD_Client_ID()});
|
||||
int C_Currency_ID = DB.getSQLValue(get_TrxName(), "SELECT C_Currency_ID FROM C_Currency WHERE ISO_Code =? ", new Object[] { row.getCell(88).getStringCellValue(), getAD_Client_ID()});
|
||||
int C_Currency_ID = DB.getSQLValue(get_TrxName(), "SELECT C_Currency_ID FROM C_Currency WHERE ISO_Code =? ", new Object[] { row.getCell(88).getStringCellValue()});
|
||||
order.setC_BPartner_ID(C_BPartner_ID);
|
||||
order.setC_BPartner_Location_ID(MBPartnerLocation.getForBPartner(getCtx(), C_BPartner_ID, get_TrxName())[0].getC_BPartner_Location_ID());
|
||||
order.setC_DocTypeTarget_ID();
|
||||
|
|
@ -122,7 +122,7 @@ public class MID_UploadTPB extends SvrProcess{
|
|||
Qty = new BigDecimal(rowBarang.getCell(16).getNumericCellValue());
|
||||
PriceList = new BigDecimal(rowBarang.getCell(3).getNumericCellValue());
|
||||
Discount = new BigDecimal(rowBarang.getCell(5).getNumericCellValue());
|
||||
PriceActual = PriceList;
|
||||
PriceActual = PriceList.subtract(Discount.divide(Env.ONEHUNDRED, 2,BigDecimal.ROUND_DOWN).multiply(PriceList));
|
||||
}else if (aJU_DocType_Value.equals("40")){
|
||||
Qty = new BigDecimal(rowBarang.getCell(32).getNumericCellValue());
|
||||
PriceList = new BigDecimal(rowBarang.getCell(29).getNumericCellValue());
|
||||
|
|
@ -141,8 +141,8 @@ public class MID_UploadTPB extends SvrProcess{
|
|||
retValue.setC_UOM_ID(C_UOM_ID);
|
||||
retValue.setQty(Qty);
|
||||
retValue.setPriceList(PriceList);
|
||||
retValue.setPriceEntered(PriceActual);
|
||||
retValue.setDiscount(Discount);
|
||||
retValue.setPrice(PriceActual);
|
||||
retValue.saveEx();
|
||||
return retValue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue