refactor sales customers pdf template

This commit is contained in:
Jay Makwana
2020-05-05 20:03:51 +05:30
parent 9a7c926d53
commit d4f1428d5f

View File

@ -8,15 +8,6 @@
font-family: "DejaVu Sans"; font-family: "DejaVu Sans";
} }
/* html {
margin: 0px;
padding: 0px;
} */
table {
border-collapse: collapse;
}
.main-container { .main-container {
/* padding: 30px 80px; */ /* padding: 30px 80px; */
} }
@ -29,8 +20,11 @@
width: 100%; width: 100%;
} }
table {
border-collapse: collapse;
}
.heading-text { .heading-text {
font-style: normal;
font-weight: 600; font-weight: 600;
font-size: 24px; font-size: 24px;
color: #5851D8; color: #5851D8;
@ -41,7 +35,6 @@
} }
.heading-date-range { .heading-date-range {
font-style: normal;
font-weight: 600; font-weight: 600;
font-size: 15px; font-size: 15px;
color: #A5ACC1; color: #A5ACC1;
@ -52,7 +45,6 @@
} }
.sub-heading-text { .sub-heading-text {
font-style: normal;
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
line-height: 21px; line-height: 21px;
@ -62,90 +54,55 @@
margin-top: 30px; margin-top: 30px;
} }
.income-table { .sales-cusutomer-name {
margin-top: 53px;
width: 100%;
}
.income-title {
padding: 0px;
margin: 0px;
font-style: normal;
font-weight: normal;
font-size: 16px;
line-height: 21px;
color: #040405;
text-align: left;
}
.income-money {
padding: 0px;
margin: 0px;
font-style: normal;
font-weight: 500;
font-size: 16px;
line-height: 21px;
text-align: right;
color: #040405;
text-align: right;
}
.expenses-title {
margin-top: 20px; margin-top: 20px;
padding-left: 3px; padding-left: 3px;
font-style: normal;
font-weight: normal;
font-size: 16px; font-size: 16px;
line-height: 21px; line-height: 21px;
color: #040405; color: #040405;
} }
.expenses-table-container { .sales-table-container {
padding-left: 10px; padding-left: 10px;
} }
.expenses-table { .sales-table {
width: 100%; width: 100%;
padding-bottom: 10px; padding-bottom: 10px;
} }
.expense-title { .sales-information-text {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
font-style: normal;
font-weight: normal;
font-size: 14px; font-size: 14px;
line-height: 21px; line-height: 21px;
color: #595959; color: #595959;
} }
.expense-money { .sales-money {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
font-style: normal;
font-weight: normal;
font-size: 14px; font-size: 14px;
line-height: 21px; line-height: 21px;
text-align: right; text-align: right;
color: #595959; color: #595959;
} }
.expense-total-table { .sales-total-indicator-table {
border-top: 1px solid #EAF1FB; border-top: 1px solid #EAF1FB;
width: 100%; width: 100%;
} }
.expense-total-cell { .sales-total-container {
padding-top: 10px; padding-top: 10px;
} }
.expense-total { .sales-total-text {
padding-top: 10px; padding-top: 10px;
padding-right: 30px; padding-right: 30px;
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
text-align: right; text-align: right;
font-style: normal;
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
line-height: 21px; line-height: 21px;
@ -153,7 +110,7 @@
color: #040405; color: #040405;
} }
.profit-table { .profit-indicator-table {
width: 100%; width: 100%;
margin-top: 40px; margin-top: 40px;
padding: 15px 20px; padding: 15px 20px;
@ -165,7 +122,6 @@
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
text-align: left; text-align: left;
font-style: normal;
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
line-height: 21px; line-height: 21px;
@ -176,7 +132,6 @@
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
text-align: right; text-align: right;
font-style: normal;
font-weight: 500; font-weight: 500;
font-size: 20px; font-size: 20px;
line-height: 21px; line-height: 21px;
@ -206,29 +161,19 @@
</tr> </tr>
</table> </table>
{{-- <table class="income-table">
<tr>
<td>
<p class="income-title">Income</p>
</td>
<td>
<p class="income-money">{{ $income }}</p>
</td>
</tr>
</table> --}}
@foreach ($customers as $customer) @foreach ($customers as $customer)
<p class="expenses-title">{{ $customer->name }}</p> <p class="sales-cusutomer-name">{{ $customer->name }}</p>
<div class="expenses-table-container"> <div class="sales-table-container">
<table class="expenses-table"> <table class="sales-table">
@foreach ($customer->invoices as $invoice) @foreach ($customer->invoices as $invoice)
<tr> <tr>
<td> <td>
<p class="expense-title"> <p class="sales-information-text">
{{ $invoice->formattedInvoiceDate }} ({{ $invoice->invoice_number }}) {{ $invoice->formattedInvoiceDate }} ({{ $invoice->invoice_number }})
</p> </p>
</td> </td>
<td> <td>
<p class="expense-money"> <p class="sales-money">
{!! format_money_pdf($invoice->total) !!} {!! format_money_pdf($invoice->total) !!}
</p> </p>
</td> </td>
@ -236,10 +181,10 @@
@endforeach @endforeach
</table> </table>
</div> </div>
<table class="expense-total-table"> <table class="sales-total-indicator-table">
<tr> <tr>
<td class="expense-total-cell"> <td class="sales-total-container">
<p class="expense-total"> <p class="sales-total-text">
{!! format_money_pdf($customer->totalAmount) !!} {!! format_money_pdf($customer->totalAmount) !!}
</p> </p>
</td> </td>
@ -249,7 +194,7 @@
</div> </div>
<table class="profit-table"> <table class="profit-indicator-table">
<tr> <tr>
<td> <td>
<p class="profit-title">TOTAL SALES</p> <p class="profit-title">TOTAL SALES</p>