mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
shipping sales report
This commit is contained in:
+2
-2
@@ -461,7 +461,7 @@ Route::get('/container/billing/{month}/{year}', function($month, $year){
|
|||||||
foreach($containers as $container) {
|
foreach($containers as $container) {
|
||||||
$packingLists = $container->packingLists;
|
$packingLists = $container->packingLists;
|
||||||
$totalBillable += count($packingLists);
|
$totalBillable += count($packingLists);
|
||||||
echo '<h3>'.$container->reference.'</h3>';
|
echo '<h3>'.$container->reference.' ('.$container->loading_date->format('d-m-Y').')</h3>';
|
||||||
|
|
||||||
foreach ($packingLists as $packingList) {
|
foreach ($packingLists as $packingList) {
|
||||||
$invoice = $packingList->transactions()
|
$invoice = $packingList->transactions()
|
||||||
@@ -481,7 +481,7 @@ Route::get('/container/billing/{month}/{year}', function($month, $year){
|
|||||||
$totalBilled += $invoice->amount;
|
$totalBilled += $invoice->amount;
|
||||||
$totalPaid += $payments->sum('amount');
|
$totalPaid += $payments->sum('amount');
|
||||||
|
|
||||||
echo '<span style="color: '.(($invoice->amount - $payments->sum('amount')) < 0.01 ? 'green' : 'red').'">'.$packingList->reference.' | Amount: '.$invoice->amount.' | Paid: '.$payments->sum('amount').' | Invoice Date: '.$invoice->created_at. (($invoice->amount - $payments->sum('amount')) < 0.01 ? '' : '('.$invoice->created_at->diffForHumans().')').'</span>';
|
echo '<span style="color: '.(($invoice->amount - $payments->sum('amount')) < 0.01 ? 'green' : 'red').'">'.$packingList->reference.' | Amount: '.$invoice->amount.' | Paid: '.$payments->sum('amount').' | Invoice Date: '.$invoice->created_at->format('d-m-Y'). (($invoice->amount - $payments->sum('amount')) < 0.01 ? '' : '('.$invoice->created_at->diffForHumans().')').'</span>';
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user