update perbaikan pos, return, dan report profit nlost
All checks were successful
All checks were successful
This commit is contained in:
@@ -790,3 +790,12 @@ function transaction_types($transactions): string
|
||||
->unique()
|
||||
->implode(', ');
|
||||
}
|
||||
|
||||
if (!function_exists('extractTemplateVariables')) {
|
||||
function extractTemplateVariables($message)
|
||||
{
|
||||
preg_match_all('/\[(.*?)\]/', $message, $matches);
|
||||
return $matches[1] ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ class PurchaseDetails extends Model
|
||||
'stock_id',
|
||||
'mfg_date',
|
||||
'expire_date',
|
||||
'serial_numbers',
|
||||
'price_without_tax',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -61,5 +63,7 @@ public function stock(): BelongsTo
|
||||
'productWholeSalePrice' => 'double',
|
||||
'quantities' => 'double',
|
||||
'profit_percent' => 'double',
|
||||
'serial_numbers' => 'json',
|
||||
'price_without_tax' => 'double',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class PurchaseReturnDetail extends Model
|
||||
'purchase_detail_id',
|
||||
'return_amount',
|
||||
'return_qty',
|
||||
'serial_numbers',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -44,5 +45,6 @@ public function purchaseDetail()
|
||||
'purchase_detail_id' => 'integer',
|
||||
'return_amount' => 'double',
|
||||
'return_qty' => 'double',
|
||||
'serial_numbers' => 'json',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class SaleDetails extends Model
|
||||
'mfg_date',
|
||||
'productPurchasePrice',
|
||||
'warranty_guarantee_info',
|
||||
'serial_numbers',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -61,5 +62,6 @@ public function sale(): BelongsTo
|
||||
'quantities' => 'double',
|
||||
'productPurchasePrice' => 'double',
|
||||
'warranty_guarantee_info' => 'json',
|
||||
'serial_numbers' => 'json',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class SaleReturnDetails extends Model
|
||||
'sale_detail_id',
|
||||
'return_amount',
|
||||
'return_qty',
|
||||
'serial_numbers',
|
||||
];
|
||||
|
||||
public function saleReturn()
|
||||
@@ -45,5 +46,6 @@ public function saleDetail()
|
||||
'sale_detail_id' => 'integer',
|
||||
'return_amount' => 'double',
|
||||
'return_qty' => 'double',
|
||||
'serial_numbers' => 'json',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -17,6 +17,11 @@ class TransferProduct extends Model
|
||||
'unit_price',
|
||||
'discount',
|
||||
'tax',
|
||||
'serial_numbers',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'serial_numbers' => 'json',
|
||||
];
|
||||
|
||||
public function transfer()
|
||||
|
||||
Reference in New Issue
Block a user