diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java index 3624546ba9..d36ff9d6db 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java @@ -78,6 +78,7 @@ public class CalloutInOut extends CalloutEngine mTab.setValue("FreightAmt", order.getFreightAmt()); mTab.setValue("C_BPartner_ID", Integer.valueOf(order.getC_BPartner_ID())); + mTab.setValue("SalesRep_ID", Integer.valueOf(order.getSalesRep_ID())); //[ 1867464 ] mTab.setValue("C_BPartner_Location_ID", Integer.valueOf(order.getC_BPartner_Location_ID())); diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index ba97b678e8..fbfb3ec209 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -2957,6 +2957,7 @@ public class MInOut extends X_M_InOut implements DocAction, IDocsPostProcess setC_Project_ID(order.getC_Project_ID()); setC_Campaign_ID(order.getC_Campaign_ID()); setC_Activity_ID(order.getC_Activity_ID()); + setSalesRep_ID (order.getSalesRep_ID()); setUser1_ID(order.getUser1_ID()); setUser2_ID(order.getUser2_ID()); diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 5a19bdd32c..4c04c2157c 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -392,7 +392,8 @@ public class MInvoice extends X_C_Invoice implements DocAction, IDocsPostProcess setDateInvoiced(invoiceDate); setDateAcct(getDateInvoiced()); // - setSalesRep_ID(ship.getSalesRep_ID()); + if (getSalesRep_ID() == 0) + setSalesRep_ID(ship.getSalesRep_ID()); } // MInvoice /** @@ -625,6 +626,7 @@ public class MInvoice extends X_C_Invoice implements DocAction, IDocsPostProcess setC_BPartner_Location_ID(order.getBill_Location_ID()); // Overwrite Contact setAD_User_ID(order.getBill_User_ID()); + setSalesRep_ID(order.getSalesRep_ID()); // } // 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()); setC_PaymentTerm_ID(order.getC_PaymentTerm_ID()); + setSalesRep_ID(order.getSalesRep_ID()); saveEx(); load(get_TrxName()); // refresh from DB // copy payment schedule from order if invoice doesn't have a current payment schedule