Quintiq file version 2.0
|
#parent: #root
|
Method UpdateForDM (
|
StockingPoint_MP newstockingpoint
|
)
|
{
|
Description: 'This update method is created purposely for DM integration that accept the stocking point with new value'
|
TextBody:
|
[*
|
// soh yee Jan-7-2015 (created)
|
|
// stockingpoint is the incoming stocking point from DMIS that has new value
|
// Only perform necessary search for performance propose
|
unit := ifexpr( this.UnitID() = newstockingpoint.UnitID(),
|
this.Unit(),
|
Unit::FindUnitTypeIndex( newstockingpoint.UnitID() ) );
|
|
currency := ifexpr( this.CurrencyID() = newstockingpoint.CurrencyID(),
|
this.Currency_MP(),
|
Currency_MP::FindCurrencyTypeIndex( newstockingpoint.CurrencyID() ) );
|
|
uom := ifexpr( this.UnitOfMeasureName() = newstockingpoint.UnitOfMeasureName(),
|
this.UnitOfMeasure_MP(),
|
UnitOfMeasure_MP::FindUnitOfMeasureTypeIndex( newstockingpoint.UnitOfMeasureName() ) );
|
|
group := ifexpr( this.GroupName() = newstockingpoint.CurrencyID(),
|
this.Group(),
|
Group::FindGroupTypeIndex( newstockingpoint.GroupName() ) );
|
|
this.Update( unit, newstockingpoint.ID(), newstockingpoint.Name(),
|
uom, currency,
|
newstockingpoint.IconName(), newstockingpoint.IsPlannedInfinite(),
|
newstockingpoint.Start(), newstockingpoint.End(),
|
group,
|
newstockingpoint.GISCountryCode(), newstockingpoint.GISCity(),
|
newstockingpoint.GISPostalCode(), newstockingpoint.Notes(),
|
false );
|
|
this.UpdateIsSoftDeleted( newstockingpoint.IsSoftDeleted() );
|
*]
|
}
|