diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index fd556807..1be5b058 100644 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -129,6 +129,7 @@ class Invoice extends BaseController 'tax' => (int)$this->request->getPost('invoice_tax'), 'discount' => (int)$this->request->getPost('discount'), 'total_amount' => (int)$this->request->getPost('grand_total'), + 'shipping_charge' => (int)$this->request->getPost('shippingCharges'), 'order_number' => $this->request->getPost('order_number'), 'payment_method' => 'Cash on Delivery', // "Credit Card," "Cash on Delivery," "PayPal","PayTm","Gpay" 'payment_status' => 'Pending', //"Paid," "Pending," "Failed," "Refunded," "Canceled," "Authorized," and "Completed." @@ -432,7 +433,7 @@ class Invoice extends BaseController // Create an mPDF object $mpdf = new Mpdf(); - + $mpdf->autoLangToFont = true; $mpdf->autoScriptToLang = true; // Set PDF properties $mpdf->SetTitle('Invoice'); $mpdf->SetAuthor('VBP'); diff --git a/app/Models/InvoiceModel.php b/app/Models/InvoiceModel.php index 5c5a8ed9..aaf85421 100644 --- a/app/Models/InvoiceModel.php +++ b/app/Models/InvoiceModel.php @@ -8,7 +8,7 @@ class InvoiceModel extends Model protected $table = 'invoice'; protected $primaryKey = 'invoice_id'; // protected $allowedFields = ['invoice_id','invoice_number','customer_id','invoice_date','event_id','business_id','created_on','business_id']; -protected $allowedFields = ['invoice_id', 'invoice_number', 'customer_id', 'invoice_date', 'due_date', 'subtotal', 'tax', 'discount', 'total_amount', 'payment_status', 'order_number', 'payment_method', 'event_id', 'business_id', 'shipping_address_id', 'billing_address_id', 'created_on', 'created_by', 'updated_on', 'updated_by', 'isactive','billing_address','shipping_address','status']; +protected $allowedFields = ['invoice_id', 'invoice_number', 'customer_id', 'invoice_date', 'due_date', 'subtotal', 'tax', 'discount', 'shipping_charge','total_amount', 'payment_status', 'order_number', 'payment_method', 'event_id', 'business_id', 'shipping_address_id', 'billing_address_id', 'created_on', 'created_by', 'updated_on', 'updated_by', 'isactive','billing_address','shipping_address','status']; public function saveInvoiceItemDetails($data){ $i = 0; diff --git a/app/Views/invoice_pdf_template.php b/app/Views/invoice_pdf_template.php index c2af28d4..7c9066f8 100644 --- a/app/Views/invoice_pdf_template.php +++ b/app/Views/invoice_pdf_template.php @@ -1,6 +1,7 @@
+