Quintiq file version 2.0
|
#parent: #root
|
Method GenerateShow (
|
FinancialSalesReport table,
|
Strings productids,
|
String factory
|
)
|
{
|
TextBody:
|
[*
|
// 甄兰鸽 Oct-12-2024 (created)
|
//年汇总
|
yearcolumn := this.FinancialSalesColumn( relnew, Name := '汇总', Period := this.FinancialSalesSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
|
sumrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Unit := factory, RowNr := table.FinancialSalesRow( relsize ) );
|
sumyearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
|
sumrow.FinancialSalesCell( relinsert, sumyearcell );
|
traverse( table, FinancialSalesRow, row, row.Unit() = factory ){
|
productid := construct( Strings );
|
productid.Add( row.Name() );
|
|
if( productids.ContainsAll( productid ) ){
|
showrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), RowNr := row.RowNr() );
|
yearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
|
showrow.FinancialSalesCell( relinsert, yearcell );
|
|
traverse( row, FinancialSalesCell, cell, not cell.FinancialSalesColumn().IsDay() ){
|
column := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() and not column.IsDay());
|
|
sumcell := selectobject( column, FinancialSalesCell, c, c.FinancialSalesRow() = sumrow );
|
if( isnull( sumcell ) ){
|
sumcell := column.FinancialSalesCell( relnew, Value := '0' );
|
sumrow.FinancialSalesCell( relinsert, sumcell );
|
}
|
|
showcell := column.FinancialSalesCell( relnew, Value := cell.Value(), IsUpdate := cell.IsUpdate() );
|
showrow.FinancialSalesCell( relinsert, showcell );
|
yearcell.Value( [String]( [Real]yearcell.Value() + [Real]cell.Value() ) );
|
sumyearcell.Value( [String]( [Real]sumyearcell.Value() + [Real]cell.Value() ) );
|
value := [Real]cell.Value() + [Real]sumcell.Value();
|
sumcell.Value( [String]value );
|
}
|
}
|
}
|
*]
|
}
|