BR-KSA-06: رمز معاملة الفاتورة (السمة name) يجب أن يتبع الصيغة NNPNESB
يتحقق من أن السمة @name في cbc:InvoiceTypeCode (KSA-2) تبدأ بـ x27;01'; (فاتورة ضريبية) أو x27;02'; (مبسطة)، تليها علامات 0/1: طرف ثالث، اسمية، تصدير، ملخصة، فوترة ذاتية (المواضع 3–7). الفحص الفعلي يقبل 7 أو 8 أو 9 خانات (الموضعان 8–9: توريد مستمر وB2G، وقيمتهما 0/1 أيضاً)؛ ونص الاختبار المدرج يسمح بـ 7 خانات فقط.
كيف تحلها
اضبط السمة name، مثل <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode> للفاتورة الضريبية العادية، أو name="0200000" للفاتورة المبسطة.
نص الهيئة الرسمي
[BR-KSA-06]-The invoice transaction code (KSA-2) must exist and respect the following structure: NNPNESBCG where NN (positions 1 and 2) = invoice subtype: - 01 for tax invoice - 02 for simplified tax invoice P (position 3) = 3rd Party invoice transaction, 0 for false, 1 for true; N (position 4) = Nominal invoice transaction, 0 for false, 1 for true; E (position 5) = Exports invoice transaction, 0 for false, 1 for true; S (position 6) = Summary invoice transaction, 0 for false, 1 for true; B (position 7) = Self billed invoice transaction, 0 for false, 1 for true; C (position 8) = Continuous Supply invoice transaction, 0 for false, 1 for true; G (position 9) = B2G invoice transaction, 0 for false, 1 for true
المصدر: ZATCA SDK 3.4.8 · ZATCA KSA rules
متى تفشل (الشرط اللي ينفّذه SDK الهيئة)
not( ( ( (string-length(@name) = 7 and (substring(@name,1,2) = '01' or substring(@name,1,2) = '02') and (substring(@name,3,1) = '0' or substring(@name,3,1) = '1') and (substring(@name,4,1) = '0' or substring(@name,4,1) = '1') and (substring(@name,5,1) = '0' or substring(@name,5,1) = '1') and (substring(@name,6,1) = '0' or substring(@name,6,1) = '1') and (substring(@name,7,1) = '0' or substring(@name,7,1) = '1') ) or (string-length(@name) = 9 and (substring(@name,1,2) = '01' or substring(@name,1,2) = '02') and (substring(@name,3,1) = '0' or substring(@name,3,1) = '1') and (substring(@name,4,1) = '0' or substring(@name,4,1) = '1') and (substring(@name,5,1) = '0' or substring(@name,5,1) = '1') and (substring(@name,6,1) = '0' or substring(@name,6,1) = '1') and (substring(@name,7,1) = '0' or substring(@name,7,1) = '1') and (substring(@name,8,1) = '0' or substring(@name,8,1) = '1') and (substring(@name,9,1) = '0' or substring(@name,9,1) = '1') ) or (string-length(@name) = 8 and (substring(@name,1,2) = '01' or substring(@name,1,2) = '02') and (substring(@name,3,1) = '0' or substring(@name,3,1) = '1') and (substring(@name,4,1) = '0' or substring(@name,4,1) = '1') and (substring(@name,5,1) = '0' or substring(@name,5,1) = '1') and (substring(@name,6,1) = '0' or substring(@name,6,1) = '1') and (substring(@name,7,1) = '0' or substring(@name,7,1) = '1') and (substring(@name,8,1) = '0' or substring(@name,8,1) = '1') ) ) ) )
قواعد قريبة
- BR-KSA-07 · فواتير التصدير لا يجوز أن تكون فوترة ذاتية
- BR-KSA-10 · الفواتير الضريبية تحتاج شارع المشتري ومدينته ورمز دولته
- BR-KSA-15 · الفاتورة الضريبية (388) تحتاج تاريخ التوريد
- BR-KSA-25 · الفاتورة المبسطة بإعفاء EDU/HEA تتطلب اسم المشتري
- BR-KSA-31 · الفاتورة المبسطة لا تكون فوترة ذاتية (الخانة 7 = 0)
- BR-KSA-42 · الفاتورة الضريبية وإشعاراتها تتطلب اسم المشتري (BT-44)
افحص فاتورتك على قواعد الهيئة
الصق الـ XML وتشوف كل الأخطاء والتحذيرات، والفحص يصير في متصفحك وما ترسل الفاتورة لأي مكان.
افحص فاتورة أو جرّب ماثل