备货单&审批流程

This commit is contained in:
mzl
2025-09-04 10:26:28 +08:00
parent 6a1ab1f5c3
commit 249b61ddb8
20 changed files with 1783 additions and 110 deletions
+18 -5
View File
@@ -37,13 +37,26 @@ class VehMoneyValue extends Model
protected $dateFormat = 'U';
/**
* 允许自动填充模型字段
*/
protected $fillable = ['id', 'currency', 'amount', 'exchange_rate', 'remark', 'created_at', 'updated_at'];
/**
* 不允许自动填充模型字段
*/
protected $guarded = [];
protected $fillable = [
'object_scene','object_id','field','currency','amount','exchange_rate',
'remark','created_at','updated_at'
];
protected $casts = [
'amount' => 'string',
'exchange_rate' => 'string',
];
/** 按本行汇率换到结算币;无汇率返回 null */
public function amountInSettlement(int $scale = 2): ?string
{
if ($this->exchange_rate === null) return null;
return (string) bcmul((string)$this->amount, (string)$this->exchange_rate, $scale);
}
}