fix(shayegan): save customer accounting codes and align the document table

Shayegan was rejected as inactive when editing moshtari_code. The document list now uses the shared table format.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-02 13:24:02 +03:30
co-authored by Cursor
parent ec92e288ad
commit 29904adf02
3 changed files with 170 additions and 96 deletions
@@ -97,7 +97,9 @@ const visibleProxy = computed({
function currentCodeOf(customer: Customer | null): string {
if (!customer) return ''
if (props.provider === 'pargar') return displayAccountingCode(customer.pargar_account_id)
if (props.provider === 'tahesab' || props.provider === 'zarin') return displayAccountingCode(customer.moshtari_code)
if (props.provider === 'tahesab' || props.provider === 'zarin' || props.provider === 'shayegan') {
return displayAccountingCode(customer.moshtari_code)
}
return ''
}
@@ -163,7 +165,7 @@ async function onDecide(mode: 'overwrite' | 'keep' | 'push') {
async function submit() {
if (!props.customer?.id) return
if (props.provider !== 'pargar' && props.provider !== 'tahesab' && props.provider !== 'zarin') {
if (props.provider !== 'pargar' && props.provider !== 'tahesab' && props.provider !== 'zarin' && props.provider !== 'shayegan') {
message.error('حسابداری فعال نیست.')
return
}