update bug daashboards
This commit is contained in:
@@ -34,7 +34,7 @@ protected static function boot()
|
||||
static::creating(function ($transfer) {
|
||||
$lastNumber = (int) self::whereNotNull('invoice_no')
|
||||
->orderByDesc('id')
|
||||
->value(DB::raw("CAST(SUBSTRING(invoice_no, 4) AS UNSIGNED)")) ?? 0;
|
||||
->value(DB::raw("CAST(SUBSTRING(invoice_no, 4) AS INTEGER)")) ?? 0;
|
||||
|
||||
$transfer->invoice_no = str_pad($lastNumber + 1, 5, '0', STR_PAD_LEFT);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user