fix payments

This commit is contained in:
root
2026-07-08 23:30:16 -04:00
parent 6e8da3cc2c
commit ed11cccecc
15 changed files with 959 additions and 132 deletions
@@ -25,6 +25,26 @@ class TestableFinancialSystemLedgerCleanup extends FinancialSystemLedgerCleanup
$this->calls[] = 'ensureIndexes';
}
protected function backfillInstallmentSequence(): void
{
$this->calls[] = 'backfillInstallmentSequence';
}
protected function ensurePaymentDateHasTime(): void
{
$this->calls[] = 'ensurePaymentDateHasTime';
}
protected function repairPaymentInvoiceTerms(): void
{
$this->calls[] = 'repairPaymentInvoiceTerms';
}
protected function normalizePaymentStatuses(): void
{
$this->calls[] = 'normalizePaymentStatuses';
}
protected function ensureConfigurationDefaults(): void
{
$this->calls[] = 'ensureConfigurationDefaults';
@@ -61,7 +81,11 @@ class FinancialSystemLedgerCleanupTest extends CIUnitTestCase
$this->assertSame([
'addInstallmentSequenceColumn',
'backfillInstallmentSequence',
'ensurePaymentDateHasTime',
'ensureIndexes',
'repairPaymentInvoiceTerms',
'normalizePaymentStatuses',
'ensureConfigurationDefaults',
'archivePaypalTables',
'refreshFinancialNavItems',
@@ -11,9 +11,14 @@ class PaymentModelMetadataTest extends CIUnitTestCase
{
$model = new PaymentModel();
$fields = self::getPrivateProperty($model, 'allowedFields');
$columns = self::getPrivateProperty($model, 'paymentColumns');
$this->assertContains('installment_seq', $fields);
$this->assertContains('transaction_id', $fields);
$this->assertContains('check_file', $fields);
foreach (['installment_seq', 'transaction_id', 'check_file'] as $field) {
if (in_array($field, $columns, true)) {
$this->assertContains($field, $fields);
} else {
$this->assertNotContains($field, $fields);
}
}
}
}