Hello
Based on this discussion I'll make the following redesing proposal
The petra constants CARRY-FORWARD-IN-SAME-CC="SAMECC" and CARRY-FORWARD-IN-STANDARD-CC = "STANDARDCC" are defined in the lines 191 and 192 glpp.i. They are used in the setup routine gs4100w and in the year end routine gl3241.p and here in the lines 262 to 300.
Following this program wee we need:
[]a a_carry_forward_cost_centre_c column in a_cost_centre[/:m]
[]a a_carry_forward_in_same_cc_l column in a_cost_centre[/:m]
[]a a_override_account_c column in a_cost_centre[/:m]
[]a a_standard_cost_centre_c column in a_ledger[/:m]
[]a a_earnings_bf_account_c column in a_ledger[/:m]
[]a replacement of a_ledger.a_ilt_processing_centre_l against a_ledger.a_ilt_account_code_c (if this account is not defined the result of a_ledger.a_ilt_processing_centre_l is assumend as to be false otherwise true)[/:m][/list:u]
Then the following pseudo code will run:
Account part:
if (a_cost_centre.a_override_account_c <> "")
{
lv_account_to_c = a_cost_centre.a_override_account_c
} else
{
lv_account_to_c = a_ledger.a_earnings_bf_account_c
}
Cost centre part:
if (a_cost_centre.a_carry_forward_cost_centre_c <> "")
{
lv_cost_centre_to_c = a_cost_centre.a_carry_forward_cost_centre_c
lv_carry_forward_cc_l = true
}
else if (a_cost_centre.a_carry_forward_in_same_cc_l )
{
lv_cost_centre_to_c = a_general_ledger_master.a_cost_centre_code_c
lv_carry_forward_cc_l = true
}
else
{
lv_cost_centre_to_c = a_ledger.a_a_standard_cost_centre_c
lv_carry_forward_cc_l = false
}
Override options
if (a_ledger.a_ilt_account_code_c <> "")
{
lv_account_to_c = a_ledger.a_ilt_account_code_c
lv_cost_centre_to_c = a_general_ledger_master.a_cost_centre_code_c
}
if (a_ledger.a_branch_processing_l)
{
lv_cost_centre_to_c = a_general_ledger_master.a_cost_centre_code_c
}
Best regards
Wolfgang