|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/leadai/leadai.co.in/resources/views/orders/invoice/ |
Upload File : |
@extends('layout')
@section('content')
<style>
.invoice {
padding: 30px;
}
.invoice h2 {
margin-bottom: 20px;
}
.table-invoice th, .table-invoice td {
padding: 12px;
}
.total {
font-size: 1.25rem;
font-weight: bold;
}
/* invoice code */
.invoice-box table {
border-spacing: 0;
width: 100%;
max-width: 900px;
margin: 0 auto;
background-color: #ffffff;
border-radius: 8px;
}
.invoice-box img {
display: block;
max-width: 200px;
}
.invoice-box h1 {
color: #333;
font-size: 24px;
text-align: center;
}
.invoice-box p {
color: #666;
font-size: 12px;
line-height: 1.6;
padding: 0 10px;
}
.invoice-box .invoice-header {
background-color: #2a6282;
color: white;
text-align: center;
padding: 20px 0;
}
.invoice-box .invoice-details {
padding: 20px;
background-color: #f7f7f7;
}
.invoice-details h3 {
margin: 0;
color: #2a6282;
font-size: 18px;
}
.invoice-box .invoice-table {
width: 100%;
padding: 20px;
}
.invoice-box .invoice-table th, .invoice-table td {
padding: 10px;
text-align: left;
border-bottom: 1px solid #ddd;
}
.invoice-box .invoice-table th {
background-color: #2a6282;
color: white;
}
.invoice-box .total-row {
font-size: 14px;
font-weight: bold;
text-align: right;
}
.invoice-box .footer {
background-color: #2a6282;
color: white;
padding: 20px;
text-align: center;
font-size: 12px;
border-radius: 0 0 8px 8px;
}
tr{
cursor:pointer;
}
.invoice-box h4{
font-size:13px;
}
.invoice-box h3{
font-size:15px;
font-weight:bold;
}
.btn-color{
background-color:#e4eaec !important;
color:black;
}
.btn-color:hover{
background-color:#f5f5f5 !important;
}
</style>
<main class="main-content">
<div class="page-header m-0 border-0">
<h3> {{__('message.sales')}}</h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ asset('dashboard') }}">{{__('message.dashboard')}}</a></li>
<li class="breadcrumb-item" aria-current="page"><a href="{{ asset('order-history') }}">Orders</a></li>
<li class="breadcrumb-item active" aria-current="page">{{__('message.add')}}</li>
</ol>
</nav>
</div>
<!-- get total and gst -->
@php
$t_gst = 0;
$t_total = 0;
@endphp
@if(isset($sell_details->order))
@foreach($sell_details->order as $value)
@php
$t_total += $value->licence_details ? $value->licence_details->price : 0 ;
$cr_type = $value->licence_details ? $value->licence_details->currence : ₹;
@endphp
@endforeach
@php
$gst = $sell_details->distributor_details ? $sell_details->distributor_details->gst : '';
$t_gst = ($t_total*$gst)/100;
@endphp
@endif
<div class="row">
@if(isset($edit_invoice))
@php
$client_name = $edit_invoice->client_name;
$billing_address = $edit_invoice->billing_address;
$place_of_supply = $edit_invoice->place_of_supply;
$invoice_generate_no = $edit_invoice->invoice_generate_no;
$pending_amount = $edit_invoice->pending_amount;
$gstin = $edit_invoice->gsttin;
$invoice_date = $edit_invoice->invoice_date;
$due_date = $edit_invoice->due_date;
$po_no = $edit_invoice->po_no;
$po_date = $edit_invoice->po_date;
$payment_terms = $edit_invoice->payment_terms;
@endphp
@else
@php
$client_name = isset($invoice->user_details) ? $invoice->user_details->name : '';
$billing_address = isset($invoice->user_details) ? $invoice->user_details->address : '';
$gstin = 123133123;
$place_of_supply = isset($invoice->user_details) ? $invoice->user_details->city : '';
$invoice_generate_no = "EDU/";
$po_no = "";
$po_date = "";
$payment_terms = "Online";
$invoice_date = "";
$due_date = "";
@endphp
@endif
<div class="col-md-12 bg-white border-left">
<div class="row px-3">
<div class="col-md-12 d-flex justify-content-between py-3 bg-white shadow-sm border-bottom" >
<div class="">
<button class="btn btn-color print-invoice" type="button"><i class="fa fa-file"></i> Pdf Download</button>
<button class="btn btn-color payment-invoice" type="button"><i class="fa fa-money"></i> Payment</button>
</div>
<div>
<a href="{{asset('sales')}}" class="border p-2">
<i class="fa fa-times" style="font-size:16px;"></i>
</a>
</div>
</div>
</div>
<div class="invoice-box shadow-sm" id="invoice-box">
<div class="w-full">
<div class="row">
<div class="col-md-12">
<div class="main-box" style="background:white;padding:20px;margin:auto;border-radius:4px;">
<div class="row mb-2">
<div class="col-md-4">
<div>
<img src="{{asset('public/logo.png')}}" alt="logo" style="width:150px">
</div>
</div>
<div class="col-md-4">
<div style="display: flex;justify-content: center;">
<h3 style="margin-top: 15px;;">TAX INVOICE </h3>
</div>
</div>
<div class="col-md-4">
<div class="mt-2">
<p style="color:#989898; margin:0;font-weight: 500;font-size:17px;text-align: end;padding:0">Original for recipient </p>
<h4 style="color:black; margin:0;text-align: end;"> {{$invoice_no->invoice_no}}</h4>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div>
<p class="s1" style="padding-left: 5pt;text-indent: 0pt;"><b>Blurb Software Private Limited</b></p>
<p style="padding-left: 5pt;text-indent: 0pt;text-align: left;margin:0">
7th Floor, TS-01, Galaxy Blue Sapphire Plaza,
Plot No. C-03, Sector-4, Haibatpur,
Greater Noida, Ghaziabad, Uttar Pradesh 201306
</p>
<p style="padding-left: 5pt;text-align: left;margin:0">Phone : (+91-) 8851286001</p>
<p style="margin:0;padding-left: 5pt;text-indent: 0pt;text-align: left;color:black;">
Email : mail@blurb.global
</p>
<p style="margin:0;padding-left: 5pt;text-indent: 0pt;text-align: left;color:black;">
GSTIN : 09AAHCE7283K1Z1
</p>
<p style="margin:0;padding-left: 5pt;text-indent: 0pt;text-align: left;color:black;">
Website : www.blurb.global
</p>
<p></p>
<p class="s2" style="padding-top: 1pt;padding-left: 5pt;text-indent: 0pt;text-align: left;">Contact Name: <span class="p">Abhishek Shahu</span></p>
</div>
</div>
<div class="col-md-6 mt-3">
<div class="amount-due d-flex justify-content-between" style="background:#2a6282;padding:3px 20px 3px 20px">
<p style="font-size: 17px;font-weight: 300;margin:0;padding:0;color:white;">Amount Due : </p>
<p style="font-size: 17px;font-weight: 300;margin:0;padding:0;color:white;">₹ {{$invoice->amount + $t_gst}} </p>
</div>
<div class="row mt-4">
<div class="col-md-6">
<div>
<p class="s4" style="padding-left: 1pt;text-indent: 18pt;line-height: 138%;text-align: right;margin:0">Issue Date:</p>
<p class="s4" style="padding-left: 1pt;text-indent: 18pt;line-height: 138%;text-align: right;margin:0">Issue Date:</p>
<p class="s4" style="padding-left: 1pt;text-indent: 18pt;line-height: 138%;text-align: right;margin:0"> <p class="s4" style="padding-left: 1pt;text-indent: 18pt;line-height: 138%;text-align: right;margin:0">Place of Supply:</p> </p>
</div>
</div>
<div class="col-md-6">
<div>
<p style="padding-left: 56pt;text-indent: 0pt;margin:0;text-align: end;">{{ \Carbon\Carbon::now()->format('d-m-Y') }}</p>
<p style="padding-left: 56pt;text-indent: 0pt;margin:0;text-align: end;">{{ \Carbon\Carbon::now()->addDays(2)->format('d-m-Y') }}</p>
<p style="text-indent: 0pt;text-align: right;margin:0;text-align: end;text-transform:capitalize;">{{Auth::user()->city}}</p>
</div>
</div>
</div>
</div>
<table class="mb-3">
<tr >
<td class="px-4">
<h3 ><strong>Bill To.</strong> </h3>
<p class="py-0 my-0"><strong>{{$client_name}}</strong> </p>
<p class="m-0">{{$billing_address}} </p>
</td>
<td class="px-4">
<h3><strong>Ship To. </strong> </h3>
<p> {{isset($invoice->user_details) ? $invoice->user_details->city : ''}} </p>
</td>
</tr>
</table>
</div>
<table class="table" >
<tr style="background:#2a6282; ">
<th style="color:white; font-size: 14px;;">S.No </th>
<th style="color:white; font-size: 14px;">Purchase Order Id</th>
<th style="color:white; font-size: 14px;">Plan Name</th>
<th style="color:white; font-size: 14px;">Quantity</th>
<th style="color:white; font-size: 14px;">Price</th>
<th style="color:white; font-size: 14px;">Taxbale</th>
<th style="color:white; font-size: 14px;">Amount</th>
</tr>
@php
$total = 0 ;
$cr_type = "";
@endphp
@if(isset($invoice))
@php
$total += $invoice->amount ;
@endphp
<tr>
<td>1</td>
<td>{{$invoice->slug}}</td>
<td>{{isset($invoice->plan_details) ? $invoice->plan_details->plan_name : ''}}</td>
<td>1</td>
<td>
{{$invoice->amount}}
</td>
<td>
{{0}}
</td>
<td>
{{$invoice->amount}}
</td>
</tr>
@endif
</tr>
<tr style="height:19pt">
<td colspan="3" style="width:35pt;border-top-style:solid;border-top-width:1pt;border-top-color:#E2E5E9">
<p class="s18" style="padding-top: 2pt;padding-left: 6pt;text-indent: 0pt;text-align: left;font-weight: 600;;">Total</p>
</td>
<td
style="width:34pt;border-top-style:solid;border-top-width:1pt;border-top-color:#E2E5E9;border-right-style:solid;border-right-width:1pt;border-right-color:#E2E5E9">
<p class="s18" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: left;font-weight: 600;;"> {{isset($invoice->user_details) ? $invoice->user_details->gst : '' }} %</p>
</td>
<td style="width:81pt;border-top-style:solid;border-top-width:1pt;border-top-color:#E2E5E9;border-left-style:solid;border-left-width:1pt;border-left-color:#E2E5E9;border-bottom-style:solid;border-bottom-width:1pt;border-bottom-color:#E2E5E9;border-right-style:solid;border-right-width:1pt;border-right-color:#E2E5E9"
bgcolor="#F9F9F9">
<p class="s18" style="padding-top: 2pt;padding-right: 2pt;text-indent: 0pt;text-align: right;font-weight: 600;;">₹ {{$invoice->amount}}
</p>
</td>
<td style="width:69pt;border-top-style:solid;border-top-width:1pt;border-top-color:#E2E5E9;border-left-style:solid;border-left-width:1pt;border-left-color:#E2E5E9;border-bottom-style:solid;border-bottom-width:1pt;border-bottom-color:#E2E5E9;border-right-style:solid;border-right-width:1pt;border-right-color:#E2E5E9"
bgcolor="#F9F9F9">
<p class="s18" style="padding-top: 2pt;padding-left: 37pt;text-indent: 0pt;text-align: left;font-weight: 600;;">₹ {{$t_gst}} </p>
</td>
<td style="width:85pt;border-top-style:solid;border-top-width:1pt;border-top-color:#E2E5E9;border-left-style:solid;border-left-width:1pt;border-left-color:#E2E5E9;border-bottom-style:solid;border-bottom-width:1pt;border-bottom-color:#E2E5E9"
bgcolor="#F9F9F9">
<p class="s18" style="padding-top: 2pt;padding-right: 5pt;text-indent: 0pt;text-align: right;font-weight: 600;;">₹ {{$invoice->amount+$t_gst}}
</p>
</td>
</tr>
</table>
<div class="row mt-4">
<div class="col-md-4">
<div>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: left;margin:0"><b>URT/Transfer Details:</b> <span></span>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: left;margin:0"><b>Account Number :</b> <span></span>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: left;margin:0"><b>Branch Name:</b> <span></span>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: left;margin:0"><b>IFSC Code:</b> <span></span>
</div>
</div>
<div class="col-md-4">
<div>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: end;margin:0"><b>Total Taxable Value</b></p>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: end;margin:0"><b>Rounded Off</b></p>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: end;margin:0"><b>Total Value (in figure)</b></p>
</div>
</div>
<div class="col-md-4">
<div>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: end;margin:0"><b>₹ {{$invoice->amount}}</b> </p>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: end;margin:0"><b>(-) ₹0.01</b> </p>
<p class="s2" style="padding-top: 2pt;padding-left: 5pt;text-indent: 0pt;text-align: end;margin:0"><b>₹ {{$invoice->amount}}</b> </p>
</b> </p>
</div>
</div>
</div>
</div>
<hr>
<p style="padding-left: 430pt;text-indent: 0pt;line-height: 1pt;text-align: left;"></p>
<p class="s22" style="padding-top: 8pt;text-indent: 0pt;text-align: right;">Provider Signature</p>
</div>
</div>
</div>
</div>
</div>
<!-- The Modal -->
<div class="modal" id="shareModal">
<div class="modal-dialog rounded-none modal-dialog-centered" >
<div class="modal-content ">
<!-- Modal Header -->
<div class="modal-header bg-success">
<h4 class="modal-title">Share Invoice Link</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<form>
<div class="mb-3">
<h5>Visibility: PUBLIC</h5>
<label>Share this invoice using this link:</label>
<div class="d-flex">
<input type="text" class="form-control">
<button class="btn"><i class="fa fa-copy"></i></button>
</div>
</div>
<p>
<b class="rounded-circle bg-dark px-1">i</b> This link can be shared with your client.
They will see this document in a separate interface.
The link will remain valid and can be viewed by anyone who has the above URL.
</p>
</form>
</div>
<!-- Modal footer -->
</div>
</div>
</div>
</main>
@endsection
@push('footer-script')
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.min.js"></script>
<script>
$(document).ready(function(){
//filter company code
$(".filter-company-btn").click(function(){
if($(".filter-form-box").hasClass("d-none"))
{
$(".filter-form-box").removeClass("d-none");
}
else
{
$(".filter-form-box").addClass("d-none");
}
});
//share invoice link btn
$(".share-link-btn").click(function(){
$("#shareModal").modal("show");
});
$(".print-invoice").click(function(){
var element = document.querySelector(".invoice-box");
var opt = {
margin: 0.3,
filename: 'invoice.pdf',
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 2 },
jsPDF: { unit: 'in', format: 'a4', orientation: 'landscape' }
};
html2pdf().set(opt).from(element).save();
});
});
</script>
@endpush