Quintiq file version 2.0
|
#parent: #root
|
StaticMethod Update (
|
ProductInStockingPoint_MPs pisps,
|
Boolean isbatcheditunitofmeasure,
|
Boolean hasunitofmeasure,
|
String unitofmeasurename,
|
Boolean isbatcheditisnegativeinventoryallowed,
|
Boolean isnegativeinventoryallowed,
|
Boolean isbatcheditisexcluded,
|
Boolean isexcluded,
|
Boolean isbatcheditisexcludedfrombalancing,
|
Boolean isexcludedfrombalancing,
|
Boolean isbatcheditisssafetystockkept,
|
Boolean issafetystockkept,
|
Boolean isbatcheditinputlotsize,
|
Real inputlotsize,
|
Boolean isbatcheditexcludeshelflife,
|
Boolean isexcludeshelflife,
|
Boolean isfromdb
|
)
|
{
|
Description: 'Batch update'
|
TextBody:
|
[*
|
// Batch update the selected set of ProductInStockingPoint_MPs' PISPSpecification
|
// Traverse the selected set of ProductInStockingPoint_MPs
|
traverse( pisps, Elements, pisp )
|
{
|
// Get PISPSpecification of the current ProductInStockingPoint_MP
|
spec := pisp.PISPSpecification();
|
|
// Populate the respective variables with data according to whether the attributes are selected for batch updating
|
hasunitofmeasure := ifexpr( isbatcheditunitofmeasure, hasunitofmeasure, guard( spec.HasUnitOfMeasure(), false ) );
|
unitofmeasurename := ifexpr( isbatcheditunitofmeasure, unitofmeasurename, guard( spec.UnitOfMeasureName(), pisp.UnitOfMeasureName() ) );
|
isnegativeinvetoryallowed := ifexpr( isbatcheditisnegativeinventoryallowed, isnegativeinventoryallowed, guard( spec.IsNegativeInventoryAllowed(), false ) );
|
isexcluded := ifexpr( isbatcheditisexcluded, isexcluded, guard( spec.IsExcluded(), false ) );
|
isexcludedfrombalancing := ifexpr( isbatcheditisexcludedfrombalancing, isexcludedfrombalancing, guard( spec.IsExcludedFromBalancing(), false ) );
|
issafetystockkept := ifexpr( isbatcheditisssafetystockkept, issafetystockkept, guard( spec.IsSafetyStockKept(), false ) );
|
inputlotsize := ifexpr( isbatcheditinputlotsize, inputlotsize, guard( spec.InputLotSize(), 0.0 ) );
|
isexcludeshelflife := ifexpr( isbatcheditexcludeshelflife, isexcludeshelflife, guard( spec.IsExcludeShelfLifeAndMaturation(), false ) );
|
|
// Create/Update PISPSpecification
|
PISPSpecification::CreateUpdate( pisp.Product_MP(),
|
pisp.StockingPoint_MP(),
|
hasunitofmeasure,
|
unitofmeasurename,
|
isnegativeinvetoryallowed,
|
isexcluded,
|
isexcludedfrombalancing,
|
issafetystockkept,
|
inputlotsize,
|
isexcludeshelflife,
|
isfromdb
|
);
|
|
}
|
*]
|
}
|