diff --git a/app/Views/invoice_pdf_layout_old.php b/app/Views/invoice_pdf_layout_old.php new file mode 100644 index 0000000..788bf2c --- /dev/null +++ b/app/Views/invoice_pdf_layout_old.php @@ -0,0 +1,238 @@ +
| INVOICE | + +
+ |
+
| = $invoice[0]->type; ?> | ++ | + |
| + | + | = $invoice[0]->company_address; ?>, | +
| + | + | + company_city ?? ''); + $s = trim($invoice[0]->company_state ?? ''); + $p = trim($invoice[0]->company_postal_code ?? ''); + if ($p === '0' || $p === 0) { $p = ''; } + $output = ''; + if ($c && $s && $p) { $output = "$c, $s - $p."; + } elseif ($c && $s) { $output = "$c, $s."; + } elseif ($c && $p) { $output = "$c - $p."; + } elseif ($s && $p) { $output = "$s - $p."; + } elseif ($c) { $output = "$c."; + } elseif ($s) { $output = "$s."; + } elseif ($p) { $output = "$p."; } + echo $output; + ?> + | +
| + | + | Mobile: = $invoice[0]->company_mobile_no_1; ?> | +
| + | + | GSTIN: = $invoice[0]->company_gstno; ?> | +
| Bill To, | ++ | + | + |
| = $invoice[0]->client_name; ?> | +Invoice Date: | += date("d-m-Y", strtotime($invoice[0]->created_at)); ?> | +|
| + billing_address ?? ''); + $bc = trim($invoice[0]->billing_city ?? ''); + $bs = trim($invoice[0]->billing_state ?? ''); + $bp = trim($invoice[0]->billing_postal_code ?? ''); + if ($bp === '0' || $bp === 0) {$bp = '';} + $address = ''; + if ($ba && $bc && $bs && $bp) { $address = "$ba, $bc, $bs - $bp,"; + } elseif ($ba && $bc && $bs) { $address = "$ba, $bc, $bs,"; + } elseif ($ba && $bc && $bp) { $address = "$ba, $bc - $bp,"; + } elseif ($ba && $bs && $bp) { $address = "$ba, $bs - $bp,"; + } elseif ($ba && $bc) { $address = "$ba, $bc,"; + } elseif ($ba && $bs) { $address = "$ba, $bs,"; + } elseif ($ba && $bp) { $address = "$ba - $bp,"; + } elseif ($bc && $bs && $bp) { $address = "$bc, $bs - $bp,"; + } elseif ($bc && $bs) { $address = "$bc, $bs,"; + } elseif ($bc && $bp) { $address = "$bc - $bp,"; + } elseif ($bs && $bp) { $address = "$bs - $bp,"; + } elseif ($ba) { $address = "$ba,"; + } elseif ($bc) { $address = "$bc,"; + } elseif ($bs) { $address = "$bs,"; + } elseif ($bp) { $address = "$bp,"; + } else { $address = '-';} + echo $address; + ?> + | ++ | Payment Mode: | += $invoice[0]->mode_of_payment; ?> | +
| Mobile: = $invoice[0]->mobile_no; ?> , GST: = ($invoice[0]->client_gst) ? $invoice[0]->client_gst : 'nil'; ?> | ++ | + | + |
+
| Vehicle No: | += $vehicle['reg_no']; ?> | ++ | Model: | += $vehicle['make_name']; ?> = $vehicle['model_name']; ?> | ++ | invoice No: | += $invoice[0]->invoice_number; ?> | +
+
| No | +Description | +HSN/SAC | +Rate(₹) | +Qty | +Taxable Value | +Per | +GST(%) | +Total Tax(₹) | +Total(₹) | +
| = $key+1; ?> | += $value->product_name; ?> | += $value->hsn_sac; ?> | += $value->net_price; ?> | += $value->qty; ?> | += ($value->net_price * $value->qty); ?> | += $value->per; ?> | += $value->tax; ?> | ++ | amount, 2, '.', ''); ?> | +
| + | Sub Total | += $subTotal; ?> | +
| + | CGST | += number_format($subTax/2, 2, '.', ''); ?> | +
| + | SGST | += number_format($subTax/2, 2, '.', ''); ?> | +
| + | Total | += number_format($subTotal+$subTax, 2, '.', ''); ?> | +
| + | Discount | +0.00 | +
| + | Grand Total | +₹ = number_format($grandTotal, 2, '.', ''); ?> | +
+
+
|
+ S.A Signature: ++ |
+ + |
+ Customer Signature: ++ |
+