added pargar accounting
This commit is contained in:
@@ -323,7 +323,7 @@ const visibleSettingGroups = computed(() =>
|
||||
const defaultOpenGroupId = computed(() => {
|
||||
const visibleIds = visibleSettingGroups.value.map((g) => g.id)
|
||||
const preferred = isSystemMode.value
|
||||
? ['chart', 'pricing', 'payping', 'tahesab', 'store', 'general']
|
||||
? ['chart', 'pricing', 'payping', 'accounting', 'store', 'general']
|
||||
: ['general', 'content', 'pricing', 'price_source', 'referral']
|
||||
const fromPreferred = preferred.find((id) => visibleIds.includes(id))
|
||||
return fromPreferred ?? visibleIds[0]
|
||||
|
||||
@@ -142,10 +142,15 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [
|
||||
match: (k) => k.startsWith('payping_')
|
||||
},
|
||||
{
|
||||
id: 'tahesab',
|
||||
title: 'تهحساب',
|
||||
id: 'accounting',
|
||||
title: 'حسابداری',
|
||||
icon: 'vuesax-linear:receipt-2',
|
||||
match: (k) => k.startsWith('tahesab_') || k === 'send_to_tahesab'
|
||||
match: (k) =>
|
||||
k === 'accounting_provider'
|
||||
|| k.startsWith('tahesab_')
|
||||
|| k.startsWith('pargar_')
|
||||
|| k === 'send_to_tahesab'
|
||||
|| k === 'send_to_pargar'
|
||||
},
|
||||
{
|
||||
id: 'infra',
|
||||
|
||||
@@ -115,6 +115,7 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
endDay: 'time',
|
||||
show_last_price: 'switch',
|
||||
send_to_tahesab: 'switch',
|
||||
accounting_provider: 'select',
|
||||
profit_gold_api_enabled: 'switch',
|
||||
payping_round_toman: 'switch',
|
||||
payping_strict_failed_withdraw: 'switch',
|
||||
@@ -136,6 +137,9 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
tahesab_token: 'text',
|
||||
tahesab_db: 'text',
|
||||
tahesab_bank_account: 'text',
|
||||
pargar_username: 'text',
|
||||
pargar_password: 'text',
|
||||
pargar_api_token: 'text',
|
||||
support_messenger_id: 'text',
|
||||
support_messenger_text: 'longtext',
|
||||
invite_link_text: 'longtext',
|
||||
@@ -145,6 +149,11 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
}
|
||||
|
||||
const SELECT_LABELS_BY_KEY: Record<string, Record<string, string>> = {
|
||||
accounting_provider: {
|
||||
none: 'هیچکدام',
|
||||
pargar: 'پرگار',
|
||||
tahesab: 'تهحساب'
|
||||
},
|
||||
support_messenger: {
|
||||
bale: 'بله',
|
||||
telegram: 'تلگرام',
|
||||
@@ -156,6 +165,7 @@ const SELECT_LABELS_BY_KEY: Record<string, Record<string, string>> = {
|
||||
}
|
||||
|
||||
const SELECT_OPTIONS_BY_KEY: Record<string, string> = {
|
||||
accounting_provider: 'none,pargar,tahesab',
|
||||
price_provider: 'montzar,zaarbox,main_product',
|
||||
payping_gateway_name: 'sepal,',
|
||||
unit: 'گرم,کیلوگرم',
|
||||
@@ -400,7 +410,17 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
payping_strict_failed_withdraw:
|
||||
'روشن: در صورت برداشت ناموفق قبلی، تسویه جدید با احتیاط بیشتر انجام میشود.',
|
||||
send_to_tahesab:
|
||||
'روشن: واریز و برداشت مشتریان بهصورت خودکار به تهحساب ارسال میشود.',
|
||||
'تنظیم قدیمی — از «سیستم حسابداری» استفاده کنید.',
|
||||
accounting_provider:
|
||||
'سیستم حسابداری متصل: پرگار (API ورودی)، تهحساب (ارسال خودکار)، یا هیچکدام.',
|
||||
send_to_pargar:
|
||||
'تنظیم قدیمی — از «سیستم حسابداری» استفاده کنید.',
|
||||
pargar_username:
|
||||
'نام کاربری که نرمافزار پرگار برای login به /pargar/login استفاده میکند.',
|
||||
pargar_password:
|
||||
'رمز عبور login API پرگار — در پنل ثبت میشود و به پرگار داده میشود.',
|
||||
pargar_api_token:
|
||||
'توکن ثابت اختیاری برای احراز API پرگار (جایگزین توکن login).',
|
||||
tahesab_host:
|
||||
'آدرس سرور نرمافزار تهحساب در شبکه.',
|
||||
tahesab_port:
|
||||
@@ -450,7 +470,9 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
|
||||
montzar_open_sell: 'فروش از همکار',
|
||||
external_order_api_enabled: 'API سفارش خارجی',
|
||||
payping_fin_sync_enabled: 'همگامسازی با حسابداری مالی',
|
||||
send_to_tahesab: 'ارسال خودکار به تهحساب',
|
||||
accounting_provider: 'سیستم حسابداری',
|
||||
send_to_tahesab: 'ارسال خودکار به تهحساب (قدیمی)',
|
||||
send_to_pargar: 'ارسال خودکار به پرگار (قدیمی)',
|
||||
support_messenger: 'پیامرسان پشتیبانی',
|
||||
deposit_sms_support_number: 'شماره پشتیبانی واریز'
|
||||
}
|
||||
@@ -477,9 +499,10 @@ export const SETTING_LOCKED_KEYS = new Set([
|
||||
'payping_gateway_items', 'payping_gateway_name',
|
||||
'payping_round_toman', 'payping_start_url', 'payping_strict_failed_withdraw', 'payping_verify_url',
|
||||
'price_extreme_date', 'price_provider', 'profit_gold_api_enabled',
|
||||
'send_to_tahesab', 'service_charge_percentage',
|
||||
'send_to_tahesab', 'send_to_pargar', 'accounting_provider', 'service_charge_percentage',
|
||||
'sse_path',
|
||||
'tahesab_bank_account', 'tahesab_db', 'tahesab_host', 'tahesab_port', 'tahesab_token',
|
||||
'pargar_api_token', 'pargar_password', 'pargar_username',
|
||||
'telegram_bot_token',
|
||||
'unit',
|
||||
'up_price', 'down_price',
|
||||
|
||||
Reference in New Issue
Block a user