BR-CO-16: المستحق = الإجمالي مع الضريبة - المدفوع مقدماً + التقريب

الشرح من فريق ماثل، مبني على نص قواعد الهيئة والشرط اللي ينفّذه SDK 3.4.8 · آخر تحديث

تحذير: الفاتورة تنقبل مع تحذيركل الفواتيرالحقول: BT-115, BT-112, BT-113, BT-114

يتحقق من أن cac:LegalMonetaryTotal/cbc:PayableAmount (BT-115) يساوي cbc:TaxInclusiveAmount (BT-112) ناقص cbc:PrepaidAmount (BT-113) زائد cbc:PayableRoundingAmount (BT-114)، ولا يُحتسب المبلغ المدفوع مقدماً ومبلغ التقريب إلا عند وجودهما؛ وتتم المقارنة بعد التقريب إلى منزلتين عشريتين.

كيف تحلها

اجعل cbc:PayableAmount = cbc:TaxInclusiveAmount − cbc:PrepaidAmount + cbc:PayableRoundingAmount (مع إسقاط أي حد لا يوجد عنصره).

نص الهيئة الرسمي

[BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114).
المصدر: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules

متى تفشل (الشرط اللي ينفّذه SDK الهيئة)

not(( not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount))))

قواعد قريبة

افحص فاتورتك على قواعد الهيئة

الصق الـ XML وتشوف كل الأخطاء والتحذيرات، والفحص يصير في متصفحك وما ترسل الفاتورة لأي مكان.

افحص فاتورة أو جرّب ماثل