refactor sales items and customer pdfs

This commit is contained in:
Jay Makwana
2020-05-05 20:49:51 +05:30
parent d4f1428d5f
commit 2fd66bf748
2 changed files with 27 additions and 77 deletions

View File

@ -128,7 +128,7 @@
color: #595959; color: #595959;
} }
.profit-money { .profit-amount {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
text-align: right; text-align: right;
@ -200,7 +200,7 @@
<p class="profit-title">TOTAL SALES</p> <p class="profit-title">TOTAL SALES</p>
</td> </td>
<td> <td>
<p class="profit-money"> <p class="profit-amount">
{!! format_money_pdf($totalAmount) !!} {!! format_money_pdf($totalAmount) !!}
</p> </p>
</td> </td>

View File

@ -13,10 +13,6 @@
padding: 0px; padding: 0px;
} */ } */
table {
border-collapse: collapse;
}
.main-container { .main-container {
/* padding: 30px 80px; */ /* padding: 30px 80px; */
} }
@ -25,12 +21,15 @@
padding: 0px 20px; padding: 0px 20px;
} }
table {
border-collapse: collapse;
}
.header { .header {
width: 100%; width: 100%;
} }
.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 +40,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 +50,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 +59,55 @@
margin-top: 30px; margin-top: 30px;
} }
.income-table { .sales-items-title {
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 { .items-table-container {
padding-left: 10px; padding-left: 10px;
} }
.expenses-table { .items-table {
width: 100%; width: 100%;
padding-bottom: 10px; padding-bottom: 10px;
} }
.expense-title { .item-title {
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 { .item-sales-amount {
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-cell {
padding-top: 10px; padding-top: 10px;
} }
.expense-total { .sales-total-amount {
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 +115,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,18 +127,16 @@
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;
color: #595959; color: #595959;
} }
.profit-money { .profit-amount {
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,28 +166,18 @@
</tr> </tr>
</table> </table>
{{-- <table class="income-table"> <p class="sales-items-title">Items</p>
<tr>
<td>
<p class="income-title">Income</p>
</td>
<td>
<p class="income-money">{{ $income }}</p>
</td>
</tr>
</table> --}}
<p class="expenses-title">Items</p>
@foreach ($items as $item) @foreach ($items as $item)
<div class="expenses-table-container"> <div class="items-table-container">
<table class="expenses-table"> <table class="items-table">
<tr> <tr>
<td> <td>
<p class="expense-title"> <p class="item-title">
{{ $item->name }} {{ $item->name }}
</p> </p>
</td> </td>
<td> <td>
<p class="expense-money"> <p class="item-sales-amount">
{!! format_money_pdf($item->total_amount) !!} {!! format_money_pdf($item->total_amount) !!}
</p> </p>
</td> </td>
@ -236,10 +186,10 @@
</div> </div>
@endforeach @endforeach
<table class="expense-total-table"> <table class="sales-total-indicator-table">
<tr> <tr>
<td class="expense-total-cell"> <td class="sales-total-cell">
<p class="expense-total"> <p class="sales-total-amount">
{!! format_money_pdf($totalAmount) !!} {!! format_money_pdf($totalAmount) !!}
</p> </p>
</td> </td>
@ -248,13 +198,13 @@
</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>
</td> </td>
<td> <td>
<p class="profit-money"> <p class="profit-amount">
{!! format_money_pdf($totalAmount) !!} {!! format_money_pdf($totalAmount) !!}
</p> </p>
</td> </td>