fix profit value after each order
This commit is contained in:
@@ -476,6 +476,28 @@ class Controller extends BaseController
|
||||
return 'فروش ' . self::meltedGoldLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
* شرح معامله از دید فروشگاه برای حسابداری (پرگار و …).
|
||||
* direction اپ: 1 = خرید مشتری → فروش به مشتری | 2 = فروش مشتری → خرید از مشتری
|
||||
* اپ مشتری همچنان از productBuyTitle / productSellTitle استفاده میکند.
|
||||
*/
|
||||
public static function accountingShopTradeDesc(int $customerDirection, bool $fromCart = false): string
|
||||
{
|
||||
if ($fromCart) {
|
||||
return 'فروش سبد به مشتری';
|
||||
}
|
||||
|
||||
if ($customerDirection === 1) {
|
||||
return 'فروش به مشتری';
|
||||
}
|
||||
|
||||
if ($customerDirection === 2) {
|
||||
return 'خرید از مشتری';
|
||||
}
|
||||
|
||||
return 'معامله';
|
||||
}
|
||||
|
||||
public static function meltedGoldDepositTitle(): string
|
||||
{
|
||||
return 'موجودی ' . self::meltedGoldLabel();
|
||||
|
||||
Reference in New Issue
Block a user