fix some bugs from tahesab
This commit is contained in:
@@ -502,7 +502,7 @@ class TahesabController extends Controller
|
||||
'amount' => $mapper->isCountDoc($product) ? $count : $vazn,
|
||||
'order_id' => $data['order']['id'] ?? null,
|
||||
'date' => $data['pay_at'] ?? Carbon::now(),
|
||||
'type' => $mapper->metalLabel($product),
|
||||
'type' => $mapper->syncTypeLabel($product),
|
||||
'created_at' => Carbon::now(),
|
||||
'data' => json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT),
|
||||
]);
|
||||
@@ -891,7 +891,7 @@ class TahesabController extends Controller
|
||||
'desc' => $sharh,
|
||||
'amount' => $mapper->isCountDoc($product) ? $count : $vazn,
|
||||
'date' => Carbon::now(),
|
||||
'type' => $mapper->metalLabel($product),
|
||||
'type' => $mapper->syncTypeLabel($product),
|
||||
'created_at' => Carbon::now(),
|
||||
'withdraw_id' => $data['withdraw_id'] ?? null,
|
||||
'data' => json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT),
|
||||
|
||||
@@ -195,11 +195,12 @@ class AccountingProductDocMapper
|
||||
}
|
||||
|
||||
/**
|
||||
* برچسب ستون type جدول sync زرین: تعدادی → سکه/شمش/کارساخته؛ وزنی → طلا/نقره.
|
||||
* برچسب ستون type جدول sync (تهحساب / زرین):
|
||||
* تعدادی → سکه / شمش / کارساخته؛ وزنی → طلا / نقره.
|
||||
*
|
||||
* @param Product|array|null $product
|
||||
*/
|
||||
public function zarinSyncTypeLabel($product): string
|
||||
public function syncTypeLabel($product): string
|
||||
{
|
||||
if ($this->isCountDoc($product)) {
|
||||
return $this->kindLabel($this->resolveKind($product));
|
||||
@@ -208,6 +209,12 @@ class AccountingProductDocMapper
|
||||
return $this->metalLabel($product);
|
||||
}
|
||||
|
||||
/** @deprecated از syncTypeLabel استفاده کنید */
|
||||
public function zarinSyncTypeLabel($product): string
|
||||
{
|
||||
return $this->syncTypeLabel($product);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve Product model from storeTrade/walletGold payload.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user