[ExtensionOf(classStr(WhsPostEngine))]final class WhsPostEngine_RevolutionDancewear_Extension{ public static boolean post(WHSWaveTable _waveTable, WHSReleaseToWarehouseId _releaseToWarehouseId) { WHSWaveLine waveLine; SalesTable salesTable; LogisticsPostalAddress LogisticsPostalAddress; LogisticsPostalAddress logisticsPostalAddressOld; utcdatetime now = DateTimeUtil::getSystemDateTime(); utcdatetime futureDate = DateTimeUtil::addMonths(now,6); DirPartyTable dirPartyTable; CustTable custTable; utcDateTime utcMinVal = DateTimeUtil::minValue(); utcDateTime utcMaxVal = DateTimeUtil::maxValue(); Common common; DictTable dictTable; ; ttsbegin; while select waveLine where waveLine.WaveID == _waveTable.waveID outer join SalesTable where SalesTable.SalesID == waveLine.OrderNum // outer join forupdate validtimeState(dateFrom,dateTo) * from LogisticsPostalAddress where LogisticsPostalAddress.RecId == SalesTable.AddressRefRecId { dictTable = new DictTable(salesTable.AddressRefTableId); common = dictTable.makeRecord(); //common.selectForUpdate(_forUpdate); select custTable where custTable.RecId == salesTable.AddressRefRecId; LogisticsPostalAddress = CustTable.postalAddress(); //select dirPartyTable where dirPartyTable.RecId == custTable.Party; while select forupdate validtimeState(utcMinVal,utcMaxVal) logisticsPostalAddressOld where logisticsPostalAddressOld.Location == LogisticsPostalAddress.Location && logisticsPostalAddressOld.RecId != LogisticsPostalAddress.RecId //logisticsPostalAddress where logisticsPostalAddress.RecId == SalesTable.AddressRefRecId; if(LogisticsPostalAddress.ValidTo < now) { logisticsPostalAddressOld.validTimeStateUpdateMode(ValidTimeStateUpdate::CreateNewTimePeriod); logisticsPostalAddressOld.ValidTo = futureDate; logisticsPostalAddressOld.update(); } } ttscommit; boolean ret = next post(_waveTable, _releaseToWarehouseId); return ret; }}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156