{{ ++$sl }} |
{{ $SAPEntry->item_name }} |
{{ $SAPEntry->description }} |
{{ $SAPEntry->order_no }} |
{{ $SAPEntry->wo_no }} |
{{ number_format($SAPEntry->budget_cons_dzn, 2) }} |
{{ $SAPEntry->uom }} |
{{ number_format($SAPEntry->required_qty, 2) }} |
{{ $SAPEntry->remarks }} |
@php
if ($SAPEntry->uom == 'Dzn') {
// Round up to the next integer
$required_qty_pcs = ceil($SAPEntry->required_qty * 12);
$total = $required_qty_pcs / 12;
$dzn = floor($total);
$pcs = round(($total - $dzn) * 12);
$labelmessage = $dzn . ' DZN ' . $pcs . ' PCS';
} elseif ($SAPEntry->uom == 'Cone') {
// Round up to the next integer
$required_qty_pcs = ceil($SAPEntry->required_qty * 1);
$labelmessage = '1 Cone = 1 PCS';
} elseif ($SAPEntry->uom == 'GG') {
// Round up to the next integer
$required_qty_pcs = ceil($SAPEntry->required_qty * 1728);
$total = $required_qty_pcs / 1728;
$gg = floor($total);
$pcs = round(($total - $gg) * 1728);
$labelmessage = $gg . ' GG ' . $pcs . ' PCS';
} else {
$required_qty_pcs = ceil($SAPEntry->required_qty * 1);
}
@endphp
|
@endforeach