| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod FlushData ( |
| | | GlobalOTDSOP globalOTDSOP |
| | | GlobalOTDSOP globalOTDSOP, |
| | | const GlobalOTDTable globalOTDTable |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | globalOTDSOP.SummaryOfInboundTransaction( relflush ); |
| | | |
| | | traverse ( globalOTDTable, Global_MappingSummaryOfInboundTransaction, gmsoit ) { |
| | | targetSummaryOfInboundTransaction := select( globalOTDSOP, SummaryOfInboundTransaction, tempSOIBT, |
| | | tempSOIBT.Item() = gmsoit.Item() and |
| | | tempSOIBT.OrganCode() = gmsoit.OrganCode() and |
| | | tempSOIBT.OrganName() = gmsoit.OrganName() and |
| | | tempSOIBT.PlantName() = gmsoit.PlantName() ); |
| | | |
| | | if ( isnull( targetSummaryOfInboundTransaction ) ) { |
| | | targetSummaryOfInboundTransaction := globalOTDSOP.SummaryOfInboundTransaction( relnew, Item := gmsoit.Item(), |
| | | OrganCode := gmsoit.OrganCode(), |
| | | OrganName := gmsoit.OrganName(), |
| | | PlantName := gmsoit.PlantName() |
| | | ); |
| | | } |
| | | |
| | | if ( gmsoit.TransactionDate().Month() = 1 ) { |
| | | targetSummaryOfInboundTransaction.Total1( targetSummaryOfInboundTransaction.Total1() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 2 ) { |
| | | targetSummaryOfInboundTransaction.Total2( targetSummaryOfInboundTransaction.Total2() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 3 ) { |
| | | targetSummaryOfInboundTransaction.Total3( targetSummaryOfInboundTransaction.Total3() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 4 ) { |
| | | targetSummaryOfInboundTransaction.Total4( targetSummaryOfInboundTransaction.Total4() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 5 ) { |
| | | targetSummaryOfInboundTransaction.Total5( targetSummaryOfInboundTransaction.Total5() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 6 ) { |
| | | targetSummaryOfInboundTransaction.Total6( targetSummaryOfInboundTransaction.Total6() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 7 ) { |
| | | targetSummaryOfInboundTransaction.Total7( targetSummaryOfInboundTransaction.Total7() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 8 ) { |
| | | targetSummaryOfInboundTransaction.Total8( targetSummaryOfInboundTransaction.Total8() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 9 ) { |
| | | targetSummaryOfInboundTransaction.Total9( targetSummaryOfInboundTransaction.Total9() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 10 ) { |
| | | targetSummaryOfInboundTransaction.Total10( targetSummaryOfInboundTransaction.Total10() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 11 ) { |
| | | targetSummaryOfInboundTransaction.Total11( targetSummaryOfInboundTransaction.Total11() + gmsoit.TransactionQTY() ); |
| | | } else if ( gmsoit.TransactionDate().Month() = 12 ) { |
| | | targetSummaryOfInboundTransaction.Total12( targetSummaryOfInboundTransaction.Total2() + gmsoit.TransactionQTY() ); |
| | | } |
| | | |
| | | } |
| | | *] |
| | | } |