fix(accounting): zarrin copy and sign notes match verified install
Zarrin v228 was tested on the real install (test account 953): negative balance = owes, and temporary documents move the balance at once. Update the admin copy and provider comments to match what was verified. پنل: متن راهنمای زرین بهروز شد: علامت مانده روی نصب واقعی بررسی شده است، و هشدار مربوط به ثبت سند موقت در «ثبت سفارش» اضافه شد. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 5.5
parent
5b6207cd4f
commit
ea987b708f
@@ -44,7 +44,6 @@
|
||||
<span class="choice__dot" />
|
||||
<span class="choice__name">
|
||||
{{ c.label }}
|
||||
<a-tag v-if="c.value === 'zarrin'" color="gold" class="choice__tag">آزمودهنشده</a-tag>
|
||||
</span>
|
||||
<span class="choice__desc">{{ c.desc }}</span>
|
||||
</button>
|
||||
@@ -78,7 +77,7 @@
|
||||
<a-select-option value="negative">منفی یعنی بدهکار</a-select-option>
|
||||
<a-select-option value="positive">مثبت یعنی بدهکار</a-select-option>
|
||||
</a-select>
|
||||
<div class="help">در دورهی آزمایشی با یک حساب نمونه بررسی شود.</div>
|
||||
<div class="help">در زرین منفی یعنی بدهکار (روی نصب واقعی بررسی شد)؛ تغییرش ندهید مگر نصب شما خلاف این باشد.</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="توکن وبسرویس" required class="grid__full">
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
type="info"
|
||||
show-icon
|
||||
class="mb-4"
|
||||
message="درایور زرین روی نصب واقعی تست نشده است"
|
||||
description="طبق تصمیم مالک، پیش از استفادهی واقعی یک دورهی آزمایشی با اسناد موقت لازم است (علامت مانده و فیلد هزینهی سنگ را بررسی کنید)."
|
||||
message="در زرین سند موقت همان لحظه روی ماندهی مشتری اثر دارد"
|
||||
description="برخلاف تهحساب. اگر سند در «ثبت سفارش» ثبت شود، مشتری در زرین پیش از تحویل بدهکار میشود؛ برای زرین «تحویل مسئول فروش» پیشنهاد میشود."
|
||||
/>
|
||||
<a-alert
|
||||
v-if="active && overview?.config?.provider && (form.features.balances || form.features.products)"
|
||||
|
||||
@@ -32,9 +32,10 @@ import {
|
||||
* ACC-01: negative balance = owes; a «فاکتور موقت» moves the balance at once
|
||||
* (unlike Tahesab); listKarSakhte pages by 100 (pageNum); parvande opens with
|
||||
* a «مانده از قبل» row that is not a movement; goroohSakhte answers HTTP 400
|
||||
* with a good body; infogardeshsakhte answers malformed JSON. The writing
|
||||
* calls (addAccount, edithesab, foroushSakhte, hazfRadifSanad,
|
||||
* addFelezsakhteModel) are still unverified.
|
||||
* with a good body; infogardeshsakhte answers malformed JSON. Writes verified
|
||||
* the same day on test account 953 (addAccount, edithesab, foroushSakhte,
|
||||
* hazfRadifSanad); only addFelezsakhteModel is untested. Re-test with
|
||||
* scripts/test-accounting-zarrin.ts; the full list is in plan §13.
|
||||
*
|
||||
* Differences from Tahesab that shape the sync:
|
||||
* * No idempotency key on foroushSakhte. A timed-out document call cannot be
|
||||
@@ -270,7 +271,7 @@ function owesDelta(r: Record<string, unknown>) {
|
||||
}
|
||||
|
||||
function signed(s: ProviderSettings, v: Prisma.Decimal) {
|
||||
// Until checked on a real installation (plan §9) the sign is a setting.
|
||||
// v228: negative = owes (the default). Kept a setting in case another install differs.
|
||||
return (s.balanceOwesWhen ?? 'negative') === 'negative' ? v.negated() : v;
|
||||
}
|
||||
|
||||
@@ -375,7 +376,7 @@ export const zarrinProvider: AccountingProvider = {
|
||||
async getChanges(s, cursor) {
|
||||
// parLastTenRadif without an account is the newest rows of the whole
|
||||
// journal; each row names its account (idHesab) and has an ascending idRadif.
|
||||
// Not yet seen on a real install (ACC-01).
|
||||
// Seen working on v228 (plan §13).
|
||||
const rows = listOf(await call(s, 'parLastTenRadif', { limit: CHANGE_WINDOW }));
|
||||
let maxId = 0;
|
||||
for (const r of rows) maxId = Math.max(maxId, Number(r.idRadif) || 0);
|
||||
|
||||
Reference in New Issue
Block a user