IDEMPIERE-5782 Generated Shipments/MR and Invoices with Invalid Sales Rep (#1914)
This commit is contained in:
parent
2dbdeb6f77
commit
509e900a0a
|
@ -78,6 +78,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
mTab.setValue("FreightAmt", order.getFreightAmt());
|
mTab.setValue("FreightAmt", order.getFreightAmt());
|
||||||
|
|
||||||
mTab.setValue("C_BPartner_ID", Integer.valueOf(order.getC_BPartner_ID()));
|
mTab.setValue("C_BPartner_ID", Integer.valueOf(order.getC_BPartner_ID()));
|
||||||
|
mTab.setValue("SalesRep_ID", Integer.valueOf(order.getSalesRep_ID()));
|
||||||
|
|
||||||
//[ 1867464 ]
|
//[ 1867464 ]
|
||||||
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(order.getC_BPartner_Location_ID()));
|
mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(order.getC_BPartner_Location_ID()));
|
||||||
|
|
|
@ -2957,6 +2957,7 @@ public class MInOut extends X_M_InOut implements DocAction, IDocsPostProcess
|
||||||
setC_Project_ID(order.getC_Project_ID());
|
setC_Project_ID(order.getC_Project_ID());
|
||||||
setC_Campaign_ID(order.getC_Campaign_ID());
|
setC_Campaign_ID(order.getC_Campaign_ID());
|
||||||
setC_Activity_ID(order.getC_Activity_ID());
|
setC_Activity_ID(order.getC_Activity_ID());
|
||||||
|
setSalesRep_ID (order.getSalesRep_ID());
|
||||||
setUser1_ID(order.getUser1_ID());
|
setUser1_ID(order.getUser1_ID());
|
||||||
setUser2_ID(order.getUser2_ID());
|
setUser2_ID(order.getUser2_ID());
|
||||||
|
|
||||||
|
|
|
@ -392,6 +392,7 @@ public class MInvoice extends X_C_Invoice implements DocAction, IDocsPostProcess
|
||||||
setDateInvoiced(invoiceDate);
|
setDateInvoiced(invoiceDate);
|
||||||
setDateAcct(getDateInvoiced());
|
setDateAcct(getDateInvoiced());
|
||||||
//
|
//
|
||||||
|
if (getSalesRep_ID() == 0)
|
||||||
setSalesRep_ID(ship.getSalesRep_ID());
|
setSalesRep_ID(ship.getSalesRep_ID());
|
||||||
} // MInvoice
|
} // MInvoice
|
||||||
|
|
||||||
|
@ -625,6 +626,7 @@ public class MInvoice extends X_C_Invoice implements DocAction, IDocsPostProcess
|
||||||
setC_BPartner_Location_ID(order.getBill_Location_ID());
|
setC_BPartner_Location_ID(order.getBill_Location_ID());
|
||||||
// Overwrite Contact
|
// Overwrite Contact
|
||||||
setAD_User_ID(order.getBill_User_ID());
|
setAD_User_ID(order.getBill_User_ID());
|
||||||
|
setSalesRep_ID(order.getSalesRep_ID());
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
// Check if Shipment/Receipt is based on RMA
|
// Check if Shipment/Receipt is based on RMA
|
||||||
|
@ -3208,6 +3210,7 @@ public class MInvoice extends X_C_Invoice implements DocAction, IDocsPostProcess
|
||||||
{
|
{
|
||||||
setPaymentRule(order.getPaymentRule());
|
setPaymentRule(order.getPaymentRule());
|
||||||
setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
|
setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
|
||||||
|
setSalesRep_ID(order.getSalesRep_ID());
|
||||||
saveEx();
|
saveEx();
|
||||||
load(get_TrxName()); // refresh from DB
|
load(get_TrxName()); // refresh from DB
|
||||||
// copy payment schedule from order if invoice doesn't have a current payment schedule
|
// copy payment schedule from order if invoice doesn't have a current payment schedule
|
||||||
|
|
Loading…
Reference in New Issue