|
Lines 423-429
subtest 'cashup_reconciliation' => sub {
Link Here
|
| 423 |
}; |
423 |
}; |
| 424 |
|
424 |
|
| 425 |
subtest 'surplus_cashup' => sub { |
425 |
subtest 'surplus_cashup' => sub { |
| 426 |
plan tests => 9; |
426 |
plan tests => 10; |
| 427 |
|
427 |
|
| 428 |
$schema->storage->txn_begin; |
428 |
$schema->storage->txn_begin; |
| 429 |
|
429 |
|
|
Lines 472-479
subtest 'cashup_reconciliation' => sub {
Link Here
|
| 472 |
sprintf( '%.0f', $surplus_line->amount ), sprintf( '%.0f', -$surplus ), |
472 |
sprintf( '%.0f', $surplus_line->amount ), sprintf( '%.0f', -$surplus ), |
| 473 |
'Surplus amount is correct (negative for credit)' |
473 |
'Surplus amount is correct (negative for credit)' |
| 474 |
); |
474 |
); |
| 475 |
is( $surplus_line->branchcode, $register2->branch, 'Surplus branchcode matches register branch' ); |
475 |
is( $surplus_line->branchcode, $register2->branch, 'Surplus branchcode matches register branch' ); |
| 476 |
is( $surplus_line->payment_type, 'CASH', 'Surplus payment_type is set to CASH' ); |
476 |
is( $surplus_line->payment_type, 'CASH', 'Surplus payment_type is set to CASH' ); |
|
|
477 |
is( sprintf( '%.0f', $surplus_line->amountoutstanding ), '0', 'Surplus amountoutstanding is set to 0' ); |
| 477 |
|
478 |
|
| 478 |
# Note should be undef for surplus without user note |
479 |
# Note should be undef for surplus without user note |
| 479 |
is( $surplus_line->note, undef, 'No note for surplus without user reconciliation note' ); |
480 |
is( $surplus_line->note, undef, 'No note for surplus without user reconciliation note' ); |
|
Lines 522-528
subtest 'cashup_reconciliation' => sub {
Link Here
|
| 522 |
}; |
523 |
}; |
| 523 |
|
524 |
|
| 524 |
subtest 'deficit_cashup' => sub { |
525 |
subtest 'deficit_cashup' => sub { |
| 525 |
plan tests => 9; |
526 |
plan tests => 10; |
| 526 |
|
527 |
|
| 527 |
$schema->storage->txn_begin; |
528 |
$schema->storage->txn_begin; |
| 528 |
|
529 |
|
|
Lines 571-578
subtest 'cashup_reconciliation' => sub {
Link Here
|
| 571 |
sprintf( '%.0f', $deficit_line->amount ), sprintf( '%.0f', $deficit ), |
572 |
sprintf( '%.0f', $deficit_line->amount ), sprintf( '%.0f', $deficit ), |
| 572 |
'Deficit amount is correct (positive for debit)' |
573 |
'Deficit amount is correct (positive for debit)' |
| 573 |
); |
574 |
); |
| 574 |
is( $deficit_line->branchcode, $register3->branch, 'Deficit branchcode matches register branch' ); |
575 |
is( $deficit_line->branchcode, $register3->branch, 'Deficit branchcode matches register branch' ); |
| 575 |
is( $deficit_line->payment_type, 'CASH', 'Deficit payment_type is set to CASH' ); |
576 |
is( $deficit_line->payment_type, 'CASH', 'Deficit payment_type is set to CASH' ); |
|
|
577 |
is( sprintf( '%.0f', $deficit_line->amountoutstanding ), '0', 'Deficit amountoutstanding is set to 0' ); |
| 576 |
|
578 |
|
| 577 |
# Note should be undef for deficit without user note |
579 |
# Note should be undef for deficit without user note |
| 578 |
is( $deficit_line->note, undef, 'No note for deficit without user reconciliation note' ); |
580 |
is( $deficit_line->note, undef, 'No note for deficit without user reconciliation note' ); |
| 579 |
- |
|
|