From edcdecd5698df5cabd9834c67f532baf10bd12db Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 9 Mar 2025 19:50:25 +1100 Subject: [PATCH] Fixes for statements + unapplied payments --- ...19_add_payment_unapplied_pdf_variabels.php | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 database/migrations/2025_03_09_084919_add_payment_unapplied_pdf_variabels.php diff --git a/database/migrations/2025_03_09_084919_add_payment_unapplied_pdf_variabels.php b/database/migrations/2025_03_09_084919_add_payment_unapplied_pdf_variabels.php new file mode 100644 index 0000000000..099e7afbf0 --- /dev/null +++ b/database/migrations/2025_03_09_084919_add_payment_unapplied_pdf_variabels.php @@ -0,0 +1,57 @@ +cursor() + ->each(function ($c) { + + + $settings = $c->settings; + $pdf_variables = $settings->pdf_variables; + + $ss = [ + '$payment.number', + '$payment.date', + '$payment.amount', + '$payment.payment_balance', + ]; + + + $pdf_variables->statement_unapplied_columns = $ss; + + $settings->pdf_variables = $pdf_variables; + $c->settings = $settings; + $c->save(); + + + + }); + + + + } + + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +};