diff --git a/app/app/Helpers/InvoiceHelper.php b/app/app/Helpers/InvoiceHelper.php index a24b72379..76d10ec38 100755 --- a/app/app/Helpers/InvoiceHelper.php +++ b/app/app/Helpers/InvoiceHelper.php @@ -116,7 +116,7 @@ public static function generatePrettyInvoice($user, $workspace, $invoice) $paymentRecvdDate = "N/A"; if ($invoice->status == PaymentStatus::PAID) { $paidInvoice = TRUE; - $paymentRecvdDate = $invoice->complete_date->format('d M Y'); + $paymentRecvdDate = $invoice->paid_date->format('d M Y'); } $invoiceDesc = sprintf("%s invoice for %s", $site, $invoiceDate->format("M Y")); diff --git a/app/app/UserInvoice.php b/app/app/UserInvoice.php index 90d4c5313..483bca5e9 100755 --- a/app/app/UserInvoice.php +++ b/app/app/UserInvoice.php @@ -6,7 +6,7 @@ use App\BalanceResource; class UserInvoice extends BalanceResource { - protected $dates = ['created_at', 'updated_at', 'complete_date', 'due_date', 'last_attempted']; + protected $dates = ['created_at', 'updated_at', 'complete_date', 'paid_date', 'due_date', 'last_attempted']; protected $guarded = array('id'); protected $table = "users_invoices"; diff --git a/app/database/migrations/2026_06_09_185217_invoice_paid_date.php b/app/database/migrations/2026_06_09_185217_invoice_paid_date.php new file mode 100644 index 000000000..c080fde23 --- /dev/null +++ b/app/database/migrations/2026_06_09_185217_invoice_paid_date.php @@ -0,0 +1,32 @@ +dateTime('paid_date')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users_invoices', function (Blueprint $table) { + $table->dropColumn('paid_date'); + }); + } +} diff --git a/app/resources/views/pdf/estimated_charges.blade.php b/app/resources/views/pdf/estimated_charges.blade.php index c06028c5e..227e5f505 100755 --- a/app/resources/views/pdf/estimated_charges.blade.php +++ b/app/resources/views/pdf/estimated_charges.blade.php @@ -80,7 +80,6 @@