use of org.eevolution.model.I_PP_MRP in project adempiere by adempiere.
the class CSVFactory method readMRPLine.
private void readMRPLine(TestableMRP mrpTest, String[] header, List<String> line) {
boolean isGenerated = getValue("Generated", Boolean.class, header, line);
Timestamp DatePromised = getValue("DatePromised", Timestamp.class, header, line);
Timestamp DateStartSchedule = getValue("DateStartSchedule", Timestamp.class, header, line);
String TypeMRP = getValue("TypeMRP", String.class, header, line);
String DocStatus = getValue("DocStatus", String.class, header, line);
BigDecimal Qty = getValue("Qty", BigDecimal.class, header, line);
String MRP_Notice = getValue("MRP_Notice", String.class, header, line);
//
if (MRP_Notice != null && MRP_Notice.trim().length() > 0 && TestableMRP.isTestableMRPNotice(MRP_Notice)) {
mrpTest.expectedNotices.add(new MRPNotice(MRP_Notice));
}
//
if (TypeMRP == null || TypeMRP.trim().length() == 0) {
;
} else {
I_PP_MRP mrp = MRPUtil.createMRP(mrpTest.planning, TypeMRP, DocStatus, Qty, DatePromised, DateStartSchedule);
mrp.setDescription("CSV Line " + reader.getLineNumber());
if (isGenerated) {
mrpTest.expectedMRP.add(mrp);
} else {
mrpTest.initialMRP.add(mrp);
}
}
}
use of org.eevolution.model.I_PP_MRP in project adempiere by adempiere.
the class TestableMRP method createMRPSupply.
private void createMRPSupply(int AD_Org_ID, int PP_MRP_ID, MProduct product, BigDecimal QtyPlanned, Timestamp DemandDateStartSchedule) {
Timestamp datePromised = DemandDateStartSchedule;
Timestamp dateStartSchedule = TimeUtil.addDays(datePromised, 0 - this.planning.getDeliveryTime_Promised().intValueExact());
I_PP_MRP mrp = MRPUtil.createMRP(this.planning, X_PP_MRP.TYPEMRP_Supply, X_PP_MRP.DOCSTATUS_Drafted, QtyPlanned, datePromised, dateStartSchedule);
((PO) mrp).saveEx(get_TrxName());
this.actualMRP.add(mrp);
}
use of org.eevolution.model.I_PP_MRP in project adempiere by adempiere.
the class TestableMRP method dumpStatus.
public void dumpStatus() {
log.info("------------ MRP TEST --------------");
log.info(" Name : " + this.name);
log.info(" Description : " + this.description);
log.info(" Product : " + this.productValue);
log.info(" Today : " + this.today);
log.info(" QtyOnHand : " + this.qtyOnHand);
((PO) this.planning).dump();
//
log.info("------------ Initial MRP --------------");
for (I_PP_MRP mrp : this.initialMRP) log.info(" " + ((PO) mrp).toString());
log.info("------------ Expected MRP --------------");
for (I_PP_MRP mrp : this.expectedMRP) log.info(" " + ((PO) mrp).toString());
log.info("------------ Actual MRP --------------");
for (I_PP_MRP mrp : this.actualMRP) log.info((" " + (PO) mrp).toString());
log.info("------------ Expected NOTICES --------------");
for (MRPNotice notice : this.expectedNotices) log.info(" " + notice.toString());
log.info("------------ Actual NOTICES --------------");
for (MRPNotice notice : this.actualNotices) log.info(" " + notice.toString());
}
Aggregations