mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 22:44:03 +00:00
list supplier purchase order items
This commit is contained in:
+7
-11
@@ -202,17 +202,13 @@ Route::get('/supplier/pi/export', function(){
|
||||
foreach ($groups as $group){
|
||||
foreach ($group->transactions as $transaction){
|
||||
$purchaseOrder = $transaction->owner->owner->transactions()->where('type', TransactionType::PURCHASE_ORDER)->where('status', ApprovalStatus::APPROVED)->first();
|
||||
foreach ($purchaseOrder->transactionDetails as $items){
|
||||
|
||||
foreach ($items as $item){
|
||||
dd($item);
|
||||
echo '<tr>';
|
||||
echo '<td>'.$item->product_name.'</td>';
|
||||
echo '<td>'.$item->quanitity.'</td>';
|
||||
echo '<td>'.$item->price * (1/$group->currency_rate).'</td>';
|
||||
echo '<td>'.($item->price * $item->quanitity) * (1/$group->currency_rate).'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
foreach ($purchaseOrder->transactionDetails as $item){
|
||||
echo '<tr>';
|
||||
echo '<td>'.$item->product_name.'</td>';
|
||||
echo '<td>'.$item->quanitity.'</td>';
|
||||
echo '<td>'.$item->price * (1/$group->currency_rate).'</td>';
|
||||
echo '<td>'.($item->price * $item->quanitity) * (1/$group->currency_rate).'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user