ranjith-dev #644
@@ -36,6 +36,15 @@ class InvoiceValidationExporter extends Exporter
|
|||||||
->label('ITEM DESCRIPTION'),
|
->label('ITEM DESCRIPTION'),
|
||||||
ExportColumn::make('stickerMaster.item.uom')
|
ExportColumn::make('stickerMaster.item.uom')
|
||||||
->label('UNIT OF MEASURE'),
|
->label('UNIT OF MEASURE'),
|
||||||
|
ExportColumn::make('stickerMaster.material_type')
|
||||||
|
->label('MATERIAL TYPE')
|
||||||
|
->formatStateUsing(fn ($state) => match ($state) {
|
||||||
|
1 => 'Individual',
|
||||||
|
2 => 'Bundle',
|
||||||
|
3 => 'Quantity',
|
||||||
|
4 => 'Bundle Individual',
|
||||||
|
default => '-',
|
||||||
|
}),
|
||||||
ExportColumn::make('motor_scanned_status')
|
ExportColumn::make('motor_scanned_status')
|
||||||
->label('MOTOR SCANNED STATUS'),
|
->label('MOTOR SCANNED STATUS'),
|
||||||
ExportColumn::make('pump_scanned_status')
|
ExportColumn::make('pump_scanned_status')
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -581,7 +581,7 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
$materialType = $sticker->material_type;
|
$materialType = $sticker->material_type;
|
||||||
// $sticker = StickerMaster::where('plant_id', $plantId)->whereHas('item', function ($query) use ($code) { $query->where('plant_id', $this->plantId)->where('code', $code); })->first();
|
// $sticker = StickerMaster::where('plant_id', $plantId)->whereHas('item', function ($query) use ($code) { $query->where('plant_id', $this->plantId)->where('code', $code); })->first();
|
||||||
|
|
||||||
if ($materialType == 1) {
|
if ($materialType == 1 || $materialType == 4) {
|
||||||
$totalExcelQty = 0;
|
$totalExcelQty = 0;
|
||||||
|
|
||||||
foreach ($rows as $index => $row) {
|
foreach ($rows as $index => $row) {
|
||||||
@@ -1765,7 +1765,7 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
$materialType = $sticker->material_type;
|
$materialType = $sticker->material_type;
|
||||||
// $sticker = StickerMaster::where('plant_id', $plantId)->whereHas('item', function ($query) use ($code) { $query->where('plant_id', $this->plantId)->where('code', $code); })->first();
|
// $sticker = StickerMaster::where('plant_id', $plantId)->whereHas('item', function ($query) use ($code) { $query->where('plant_id', $this->plantId)->where('code', $code); })->first();
|
||||||
|
|
||||||
if ($materialType == 1) {
|
if ($materialType == 1 || $materialType == 4) {
|
||||||
$totalExcelQty = 0;
|
$totalExcelQty = 0;
|
||||||
|
|
||||||
foreach ($rows as $index => $row) {
|
foreach ($rows as $index => $row) {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class InvoiceDataTable extends Component
|
|||||||
'refreshEmptyInvoice' => 'loadEmptyData',
|
'refreshEmptyInvoice' => 'loadEmptyData',
|
||||||
'refreshInvoiceData' => 'loadData',
|
'refreshInvoiceData' => 'loadData',
|
||||||
'refreshMaterialInvoiceData' => 'loadMaterialData',
|
'refreshMaterialInvoiceData' => 'loadMaterialData',
|
||||||
|
'refreshMaterialInvoiceData1' => 'loadMaterialData1',
|
||||||
'openCapacitorModal' => 'showCapacitorInputBox',
|
'openCapacitorModal' => 'showCapacitorInputBox',
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -602,6 +603,8 @@ class InvoiceDataTable extends Component
|
|||||||
$row['material_type'] = 'Bundle';
|
$row['material_type'] = 'Bundle';
|
||||||
} elseif ($matType === 3) {
|
} elseif ($matType === 3) {
|
||||||
$row['material_type'] = 'Quantity';
|
$row['material_type'] = 'Quantity';
|
||||||
|
} elseif ($matType === 4) {
|
||||||
|
$row['material_type'] = 'Bundle Individual';
|
||||||
} else {
|
} else {
|
||||||
$row['material_type'] = 'N/A';
|
$row['material_type'] = 'N/A';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
<td class="border px-4 py-2">{{ $row['code'] ?? 'N/A' }}</td>
|
<td class="border px-4 py-2">{{ $row['code'] ?? 'N/A' }}</td>
|
||||||
<td class="border px-4 py-2">{{ $row['material_type'] ?? 'N/A' }}</td>
|
<td class="border px-4 py-2">{{ $row['material_type'] ?? 'N/A' }}</td>
|
||||||
<td class="border px-4 py-2">
|
<td class="border px-4 py-2">
|
||||||
@if(($row['material_type'] ?? '') === 'Individual' || ($row['material_type'] ?? '') === 'Bundle')
|
@if(($row['material_type'] ?? '') == 'Individual' || ($row['material_type'] ?? '') == 'Bundle' || ($row['material_type'] ?? '') == 'Bundle Individual')
|
||||||
{{ number_format((float)($row['quantity'] ?? 0), 0) }}
|
{{ number_format((float)($row['quantity'] ?? 0), 0) }}
|
||||||
@else
|
@else
|
||||||
{{ $row['quantity'] ?? 'N/A' }}
|
{{ $row['quantity'] ?? 'N/A' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user