commit
f82e9ef7e2
|
|
@ -84,6 +84,8 @@ public class MID_UploadPEB extends SvrProcess{
|
|||
order.set_ValueNoCheck("NoAju1", row.getCell(0).getStringCellValue());
|
||||
String AJU_DocType_Value = row.getCell(5).getStringCellValue();
|
||||
int MID_AJUDocType_ID = DB.getSQLValue(get_TrxName(), "SELECT MID_AJUDocumentType_ID FROM MID_AjuDocumentType WHERE Value =?", new Object[] { AJU_DocType_Value });
|
||||
if(MID_AJUDocType_ID <=0)
|
||||
throw new AdempiereException("AJU Document For "+AJU_DocType_Value+" !!!");
|
||||
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 =? AND IsCustomer ='Y'", new Object[] { row.getCell(3).getStringCellValue(), getAD_Client_ID()});
|
||||
|
|
@ -158,7 +160,7 @@ public class MID_UploadPEB extends SvrProcess{
|
|||
order.setAD_Org_ID(Env.getContextAsInt(getCtx(), "#AD_Org_ID"));
|
||||
order.set_ValueNoCheck("RegisterNo", rs.getString("NODAFT"));
|
||||
order.setIsSOTrx(true);
|
||||
order.set_ValueNoCheck("RegisterDate", rs.getString("TGDAFT"));
|
||||
order.set_ValueNoCheck("RegisterDate", rs.getTimestamp("TGDAFT"));
|
||||
order.set_ValueNoCheck("NoAju1", no_aju);
|
||||
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());
|
||||
|
|
@ -178,8 +180,7 @@ public class MID_UploadPEB extends SvrProcess{
|
|||
if (M_Product_ID <= 0) {throw new AdempiereException("Product " + rsDtl.getString("KDBRG") + " tidak ada!");}
|
||||
if (C_UOM_ID <= 0) {throw new AdempiereException("Uom " + rsDtl.getString("JNSATUAN") + " tidak ada!");}
|
||||
|
||||
MOrderLine oLine = new MOrderLine(getCtx(), 0, get_TrxName());
|
||||
oLine.setHeaderInfo(order);
|
||||
MOrderLine oLine = new MOrderLine(order);
|
||||
oLine.setM_Product_ID(M_Product_ID);
|
||||
oLine.setC_UOM_ID(C_UOM_ID);
|
||||
oLine.setQty(rsDtl.getBigDecimal("JMSATUAN"));
|
||||
|
|
@ -187,6 +188,10 @@ public class MID_UploadPEB extends SvrProcess{
|
|||
oLine.setPriceActual(rsDtl.getBigDecimal("FOBPERBRG"));
|
||||
oLine.saveEx();
|
||||
}
|
||||
|
||||
String message = Msg.parseTranslation(getCtx(), "@OrderCreated@ " + order.getDocumentNo());
|
||||
addBufferLog(order.getC_Order_ID(), order.getDateOrdered(), null, message,
|
||||
order.get_Table_ID(), order.getC_Order_ID());
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue