From 0d728947dc4e717bc81f77be4810281cf7eeb15f Mon Sep 17 00:00:00 2001 From: yanweiyuan3 <yanweiyuan3@gmail.com> Date: 星期二, 26 九月 2023 21:15:29 +0800 Subject: [PATCH] Update Dosync method for organcode --- _Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl index bee6304..4504921 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl @@ -14,7 +14,12 @@ if( isnull( businessTypes ) or businessTypes.Size() = 0 ) { listToDeal := selectset( globalOTDTable, Global_MappingCustomOrder, item, true ); } else { - listToDeal := selectset( globalOTDTable, Global_MappingCustomOrder, item, businessTypes.Find( item.BusinessType() ) <> -1 ); + organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, businessTypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() ); + listToDeal := selectset( globalOTDTable, + Global_MappingCustomOrder, + item, + ( businessTypes.Find( item.BusinessType() ) <> -1 ) and + ( organcodelist.Find( item.StockingPointID().SubString( 0, 3 ) ) >= 0 ) ); } queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date(); queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() ); -- Gitblit v1.9.3