|
From: <cli...@gr...> - 2007-01-24 16:32:42
|
Author: cliberty
Date: 2007-01-24 08:32:36 -0800 (Wed, 24 Jan 2007)
New Revision: 51
Modified:
versions/0.9/trunk/src/org/opentaps/dataimport/CustomerImportServices.java
Log:
Adding company name to name of imported PriceRules for easier reference
Modified: versions/0.9/trunk/src/org/opentaps/dataimport/CustomerImportServices.java
===================================================================
--- versions/0.9/trunk/src/org/opentaps/dataimport/CustomerImportServices.java 2007-01-24 15:03:35 UTC (rev 50)
+++ versions/0.9/trunk/src/org/opentaps/dataimport/CustomerImportServices.java 2007-01-24 16:32:36 UTC (rev 51)
@@ -434,7 +434,9 @@
if (companyPartyId != null) {
// productPriceRule
String productPriceRuleId = delegator.getNextSeqId("ProductPriceRule");
- toStore.add(delegator.makeValue("ProductPriceRule", UtilMisc.toMap("productPriceRuleId", productPriceRuleId, "ruleName", "Imported rule for partyId " + companyPartyId, "isSale", "N", "fromDate", now)));
+ String priceRuleName = "Imported rule for ";
+ priceRuleName += UtilValidate.isEmpty(customer.get("companyName")) ? "partyId: " + companyPartyId : customer.getString("companyName");
+ toStore.add(delegator.makeValue("ProductPriceRule", UtilMisc.toMap("productPriceRuleId", productPriceRuleId, "ruleName", priceRuleName, "isSale", "N", "fromDate", now)));
// productPriceCond
toStore.add(delegator.makeValue("ProductPriceCond", UtilMisc.toMap("productPriceRuleId", productPriceRuleId, "productPriceCondSeqId", UtilFormatOut.formatPaddedNumber(1, 2), "inputParamEnumId", "PRIP_PARTY_ID", "operatorEnumId", "PRC_EQ", "condValue", companyPartyId)));
// productPriceAction
|