fix profit value after each order

This commit is contained in:
2026-07-18 16:38:46 +03:30
parent 45f2d8bf70
commit b66cd5e8f9
5 changed files with 56 additions and 6 deletions
+22
View File
@@ -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();