Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- {{-- @include('layouts.printingcss') --}}
- {{--
- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> --}}
- <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
- <style>
- /* @media print { */
- /* body {
- width: 816px;
- } */
- #items { /* style for the 3rd table */
- font-size: 16px;
- clear: both;
- margin: 0 auto;
- width: 1000px;
- /* border: 1px solid black; */
- }
- #items td { /* style for the 3rd table */
- /* border: 1px solid black; */
- }
- .table { /* width for the 2nd and 4th table */
- width: 1000px;
- margin: 0;
- }
- #page-wrap { /* to set the width of the */
- width: 1000px;
- margin: 0 auto;
- }
- #items th { /* to change the background color of table header */
- background: #eee;
- padding-top: 20px;
- padding-bottom: 20px;
- font-size:1px;
- }
- #items td.total-line { /* to align right the extra info in the table 3 */
- text-align: right;
- }
- #items td.total-value { /* padding for the td of values in the table 3 */
- padding: 0px;
- }
- div,
- td,
- th,
- h1,
- h2,
- h3,
- h4,
- h5,
- h6,
- p,
- span {
- /* font-size: 12px !important; */
- }
- th, /* for changing the capitalization of the ff. */
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- text-transform: capitalize !important;
- }
- .table, /* no border for table */
- .table tr,
- .table td {
- /* border: 1px solid black; */
- }
- .p { /* font size and margin for paragraph */
- font-size: 11px !important;
- margin-bottom: 5px;
- text-transform: none;
- }
- .input-blank-1, /* margin for the div that contains the info of table 2 and 4*/
- .input-blank-2 {
- margin-bottom: 10px;
- position: relative;
- }
- .input-blank-1 .p { /* style for the class p of all the div in the table 2 */
- display: inline-block;
- background-color: white;
- position: relative;
- top: 8px;
- font-weight: bold;
- }
- .input-blank-1 .span { /* style for the class span of all the div in the table 2 */
- display: inline-block;
- height: 3px;
- border-bottom: 1px solid black;
- }
- .input-blank-2 .p { /* style for the class p of all the div in the table 4 */
- display: block;
- background-color: white;
- font-weight: bold;
- }
- .input-blank-2 .span { /* style for the class span of all the div in the table 4 */
- margin-top: 30px;
- display: block;
- height: 1px;
- border-bottom: 1px solid black;
- }
- .smallFont {
- font-size:5px;
- }
- .text-center { /* to center the text in the p of the table 4 */
- text-align: center;
- }
- .main-content { /* padding for the table 3 */
- margin: 0;
- }
- .input-data { /* style for the data of table 3 */
- position: absolute;
- top: 0;
- left: 110px;
- }
- .invisible { /* to hide some text in the table 2 and to hide all text in the table 4 */
- opacity: 0;
- }
- .text-right { /* to align the date and terms to the right */
- text-align: right;
- right: 0;
- }
- * { /* to set the margin and padding of all */
- margin: 0;
- padding: 0;
- }
- body {
- /* font: 14px/1.4 "Times New Roman", Times, sans-serif; */
- }
- table { /* to collapse the table borders into a single border */
- /* border-collapse: collapse; */
- }
- .number { /* to set some text in the table 3 to center */
- text-align: right !important;
- }
- .pad {
- padding-bottom: 10px;
- }
- .date {
- text-align: right !important;
- padding-right: 10px !important;
- }
- .textLeft {
- text-align: left !important;
- padding-left: 10px;
- }
- .textRight {
- text-align: right !important;
- }
- .bottomFont {
- font-size: 12px;
- font-weight: bold;
- }
- .padLeft {
- padding-left: 20px;
- padding-right: 30px;
- }
- </style>
- </head>
- <body>
- <div class="content-wrapper">
- <section class="content">
- <div id="page-wrap">
- <table class="table invisible">
- <tr>
- <td>
- <img id="image" src="/images/cdologo.jpg" alt="logo" />
- </td>
- <td>
- <p class="p">SFP Karla's Marketing, Inc.</p>
- <p class="p">San Isidro, Bacoor Pampanga</p>
- <p class="p">VAT Reg. TIN: 237-672-486-000</p>
- <p class="p">Tel. Nos. (045) 455-0862 * Telefax No. (045) 455-0861</p>
- </td>
- <td>
- <h2 style="font-size: 16px !important; margin-bottom: 10px;">SALES INVOICE</h2>
- <p style="font-size: 16px !important;">No.</p>
- </td>
- </tr>
- </table>
- <div style="height: 0px;"></div>
- <table class="table">
- <tr>
- <td class="input-blank-1">
- <p class="p invisible">SOLD TO:</p>
- <p class="input-data">{{ $customer_info->customer_name }}</p>
- <span class="span invisible" />
- </td>
- <td class="input-blank-1" style="width:500px;">
- <p class="p invisible">Terms :</p>
- <p class="input-data text-left" style="padding-left: 200px;">{{ $payment_type->payment_type }}</p>
- <span class="span invisible" />
- </td>
- </tr>
- <tr>
- <td class="input-blank-1" style="width:500px;">
- <p class="p invisible">ADDRESS:</p>
- <p class="input-data">{{ $customer_info->delivery_address }}</p>
- <span class="span invisible" />
- </td>
- <td class="input-blank-1">
- <p class="p invisible">Date :</p>
- <?php
- $date = date_create($sale_invoice->posting_date);
- ?>
- <p class="input-data text-left" style="padding-left: 200px;">{{ date_format($date, "m/d/Y") }}</p>
- <span class="span invisible" />
- </td>
- </tr>
- <tr>
- <td class="input-blank-1">
- <p class="p invisible">TIN(BUYER):</p>
- <p class="input-data"></p>
- <span class="span invisible" />
- </td>
- <td class="input-blank-1">
- <p class="p invisible">OSCA/PWD ID No.:</p>
- <p class="input-data"></p>
- <span class="span invisible" />
- </td>
- </tr>
- <tr>
- <td class="input-blank-1">
- <p class="p invisible">BUS. STYLE:</p>
- <p class="input-data" style="padding-left:50px;"></p>
- <span class="span invisible" />
- </td>
- <td class="input-blank-1" style="width:500px;">
- <p class="p invisible">SC/PWD Signature:</p>
- <p class="input-data text-left" style="padding-left: 120px;"></p>
- <span class="span invisible" />
- </td>
- </tr>
- </table>
- <div class="main-content">
- <table id="items">
- <tr><td style="height:25px;" colspan="6"></td></tr>
- <?php $total_sales = 0; ?>
- <?php $total_price = 0; ?>
- <?php $total_discount = 0; ?>
- <?php $total_price_counter=0; ?>
- <?php $total_piece = 0; ?>
- <?php $total_case = 0; ?>
- <?php $total_kilos = 0; ?>
- <?php $total_nonVat = 0; ?>
- <?php $total_unitPrice = 0; ?>
- <?php $total_netAmount = 0; ?>
- <?php $total_qty = 0; ?>
- <?php $total_net = 0; ?>
- <?php $additional_discount = 0; ?>
- <?php $total_netPrice = 0; ?>
- <?php $net_amount = 0; ?>
- <?php $counter = 0; ?>
- @foreach($sale_order_products as $value)
- <?php
- if ($value->uom == 'Case') {
- $total_case += $value->product_qty;
- }
- if ($value->uom == 'Piece') {
- $total_piece += $value->product_qty;
- }
- ?>
- <tr>
- <!-- Code for PROD. ID -->
- <td style="height:25px; width:1%; white-space:nowrap;">
- <div>{{ $value->product_code }}</div>
- </td>
- <!-- Code for DESCRIPTION -->
- <td class="textLeft" style="width:480px;">
- <div>{{ $value->product_name }}</div>
- </td>
- <!-- Code for QTY & UNIT-->
- <td>
- <div>{{ $value->product_qty }} {{ $value->uom }}</div>
- </td>
- <?php $total_qty = $value->product_qty * $value->uom_factor; ?>
- <!-- Code for Kilos -->
- <td style="width:80px;">
- <div>{{ number_format(($value->product_qty * $value->uom_factor) * $value->net_weight, 2) }}</div>
- </td>
- <!-- Code for Non-Vat Price and Net Amount -->
- <?php
- $total_unitPrice = round($value->product_discounted_list_price/1.12,2);
- if ($value->uom == 'Case'){
- $net_amount = $total_unitPrice * $value->uom_factor;
- $total_netAmount = $value->product_qty * $value->uom_factor * $total_unitPrice;
- $total_sales += $total_netAmount;
- }
- if ($value->uom == 'Piece'){
- $net_amount = $total_unitPrice;
- $total_netAmount = $value->product_qty * $total_unitPrice;
- $total_sales += $total_netAmount;
- }
- ?>
- <td class="number" style="padding-right:30px;">
- <div>{{number_format($net_amount,2)}}</div>
- </td>
- <td class="number" style="padding-right:30px;">
- <!-- <div>{{ number_format($value->product_discount_price,2) }}</div> -->
- <div>{{number_format($total_netAmount,2)}}</div>
- </td>
- </tr>
- {{-- <td class=" number">
- <div>{{ $value->uom_factor }}</div>
- </td>
- <td class="number">
- <div>{{ number_format($total_qty = $value->product_qty * $value->uom_factor) }}</div>
- </td> --}}
- <?php $total_qty = $value->product_qty * $value->uom_factor; ?>
- <!-- <?php $total_price=$total_qty*$value->product_discounted_list_price; ?>
- {{number_format($total_price,2)}}
- <?php
- $percent = 0;
- $test_discount = DB::table('sale_invoice_detail')
- ->where('sale_invoice_id', $sale_invoice->id)
- ->where('product_id', $value->product_id)
- ->leftJoin('products', 'sale_invoice_detail.product_id', '=', 'products.id')
- ->first();
- $product_discount = $total_price - $test_discount->product_discount_price;
- if($product_discount!=0)
- {
- $percent = $total_price / $product_discount;
- $product_discount = $total_sales / $percent;
- } else if ($product_discount == 0) {
- $product_discount = 0;
- }
- ?>
- {{ number_format($product_discount,2)}} -->
- </tr>
- <?php $total_price_counter += $total_price; ?>
- <?php $total_kilos += ($value->product_qty * $value->uom_factor) * $value->net_weight; ?>
- <?php $total_discount = $product_discount;
- $counter = $counter + 1;
- ?>
- @endforeach
- <?php
- while($counter < 25)
- {
- $counter = $counter + 1;
- echo "<tr><td class='invisible' style='height:30px;' colspan='6'>$counter</td></tr>";
- }
- ?>
- <tr>
- <td style="height:10px;"></td>
- </td>
- <tr>
- <td class="number pad" colspan="2">
- <div align="left" style="padding-left:250px;">Total Kilos: {{ number_format($total_kilos, 2) }}</div>
- </td>
- <td class="total-line pad bottomFont invisible" colspan="3">Total Sales(VAT Inclusive)</td>
- <td class="pad padLeft">
- <div class="number">₱{{ number_format($total_sales, 2) }}</div>
- </td>
- </tr>
- <tr>
- <td class="number pad" colspan="2">
- <div align="left" style="padding-left:250px;">Total Case: {{ number_format($total_case) }}</div>
- </td>
- <td class="total-line pad bottomFont invisible" colspan="3">Less: VAT</td>
- <td class="pad padLeft">
- <?php
- $vat = 0;
- $vat = $total_sales - ($total_sales/1.12);
- ?>
- <div class="number">₱{{ number_format($vat, 2) }}</div>
- </td>
- </tr>
- <tr>
- <td class="number pad" colspan="2">
- <div align="left" style="padding-left:250px;">Total Piece: {{ number_format($total_piece) }}</div>
- </td>
- <td class="total-line pad bottomFont invisible" colspan="3">Amount: Net of VAT</td>
- <td class="pad padLeft">
- <?php
- $netVat = 0;
- $netVat = ($total_sales/1.12);
- ?>
- <div class="number">₱{{ number_format($netVat, 2) }}</div>
- </td>
- </tr>
- <tr>
- <td class="total-line pad bottomFont invisible" colspan="5">Total Discount</td>
- <td class="pad padLeft">
- <div class="number">₱{{ number_format($total_discount, 2) }}</div>
- </td>
- </tr>
- <tr>
- <td class="total-line pad bottomFont invisible" colspan="5">Amount Due</td>
- <td class="pad padLeft">
- <?php
- $amountDue = 0;
- $amountDue = $netVat - $total_discount;
- ?>
- <div class="number">₱{{ number_format($amountDue, 2) }}</div>
- </td>
- </tr>
- <tr>
- <td class="total-line pad" colspan="2" style="padding-right:30px;"><b>Encoded by:</b> Clerk</td>
- <td class="total-line pad bottomFont invisible" colspan="3">Add VAT</td>
- <td class="pad padLeft">
- <div class="number">₱{{ number_format($vat, 2) }}</div>
- </td>
- </tr>
- <tr>
- <?php
- $salesmen = DB::table('salesmen')
- ->where('id', $customer_info->salesman_id)
- ->first();
- $warehouses = DB::table('warehouses')
- ->where('id', $salesmen->warehouse_id)
- ->first();
- ?>
- <td class="total-line pad" colspan="2" style="padding-right:30px;"><b>Warehouse:</b> {{ $warehouses->warehouse }}</td>
- <td class="total-line pad invisible" colspan="3"><b>Total Amount Due</b></td>
- <td class="pad padLeft">
- <?php
- $total = 0;
- $total = $amountDue + $vat;
- ?>
- <div class="number">₱{{ number_format($total, 2) }}</div>
- </td>
- </tr>
- </table>
- </div>
- <table class="table invisible">
- <tr>
- <td>
- <div class="input-blank-2">
- <p class="p">Prepared by :</p>
- <span class="span" />
- </div>
- </td>
- <td>
- <div class="input-blank-2">
- <p class="p">Checked by :</p>
- <span class="span" />
- </div>
- </td>
- <td>
- <p class="text-center" style="margin-bottom: 15px !important;">Received the above items in good order and
- condition:</p>
- <div class="input-blank-1">
- <p class="p">By :</p>
- <span class="span" />
- </div>
- <p class="text-center">Authorized Signature</p>
- </td>
- </tr>
- </table>
- </div>
- </section>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement