Importer for Price List
Improvement - allow importing with ID's for PriceList and Version (instead of forcing name and validfrom) Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2690930
This commit is contained in:
parent
9479e2008c
commit
6ce3b10eda
|
@ -234,19 +234,19 @@ public class ImportPriceList extends SvrProcess
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.warning("Invalid Currency=" + no);
|
log.warning("Invalid Currency=" + no);
|
||||||
|
|
||||||
// Mandatory Name
|
// Mandatory Name or PriceListID
|
||||||
sql = new StringBuffer ("UPDATE I_PriceList "
|
sql = new StringBuffer ("UPDATE I_PriceList "
|
||||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Mandatory Name,' "
|
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Mandatory Name or PriceListID,' "
|
||||||
+ "WHERE Name IS NULL"
|
+ "WHERE Name IS NULL AND M_PriceList_ID IS NULL"
|
||||||
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.warning("No Mandatory Name=" + no);
|
log.warning("No Mandatory Name=" + no);
|
||||||
|
|
||||||
// Mandatory ValidFrom
|
// Mandatory ValidFrom or PriceListVersionID
|
||||||
sql = new StringBuffer ("UPDATE I_PriceList "
|
sql = new StringBuffer ("UPDATE I_PriceList "
|
||||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Mandatory ValidFrom,' "
|
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Mandatory ValidFrom or PriceListVersionID,' "
|
||||||
+ "WHERE ValidFrom IS NULL"
|
+ "WHERE ValidFrom IS NULL AND M_PriceList_Version_ID IS NULL"
|
||||||
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
|
|
Loading…
Reference in New Issue