Skip to content

fix: invoice issue time - #34

Merged
Saleh7 merged 1 commit into
Saleh7:mainfrom
habibalkhabbaz:fix/invoice-issue-time
Apr 5, 2026
Merged

Saleh7 merged 1 commit into
Saleh7:mainfrom
habibalkhabbaz:fix/invoice-issue-time

Conversation

@habibalkhabbaz

@habibalkhabbaz habibalkhabbaz commented Apr 5, 2026 •

Copy link
Copy Markdown
Contributor

hi @Saleh7

in InvoiceExtension we have this line:

$issueTime = stripos($issueTime, 'Z') === false ? $issueTime . 'Z' : $issueTime;

so as I understand we always expect UTC time from the user and we add Z when it's not there.
however in Invoice we are not adding Z to the IssueTime which causes the compliance check to fail for the simplified invoices with the following warning:

{
    "type": "WARNING",
    "code": "invoiceTimeStamp_QRCODE_INVALID",
    "category": "QRCODE_VALIDATION",
    "message": "Time on QR Code does not match with Invoice Issue Time (KSA-25). If ZATCA's SDK was used to generate QR Code, kindly use the latest version of SDK",
     "status": "WARNING"
}

after i added Z, the issue is resolved

It would be nice if you can review it soon.

@sevaske I adopt your code for mapDateTime

@Saleh7

Saleh7 commented Apr 5, 2026

Copy link
Copy Markdown
Owner

@habibalkhabbaz Thanks for the fix 👍🏽

@Saleh7
Saleh7 merged commit 50d4020 into Saleh7:main Apr 5, 2026
1 check passed
@habibalkhabbaz
habibalkhabbaz deleted the fix/invoice-issue-time branch April 5, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants