修复状态机库存减扣
This commit is contained in:
parent
d35aeeb86d
commit
5566633370
|
|
@ -28,7 +28,7 @@ class OrderProduct extends Base
|
||||||
|
|
||||||
public function productSku(): BelongsTo
|
public function productSku(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(ProductSku::class, 'product_sku', 'id');
|
return $this->belongsTo(ProductSku::class, 'product_sku', 'sku');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPriceFormatAttribute()
|
public function getPriceFormatAttribute()
|
||||||
|
|
|
||||||
|
|
@ -229,9 +229,14 @@ class StateMachineService
|
||||||
*/
|
*/
|
||||||
private function getMachines()
|
private function getMachines()
|
||||||
{
|
{
|
||||||
$machines = self::MACHINES;
|
$data = [
|
||||||
|
'order' => $this->order,
|
||||||
|
'machines' => self::MACHINES,
|
||||||
|
];
|
||||||
|
|
||||||
return hook_filter('service.state_machine.machines', $machines);
|
$data = hook_filter('service.state_machine.machines', $data);
|
||||||
|
|
||||||
|
return $data['machines'] ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue