Getting Different Invoice Hash

I m getting different hash when generating from CLI and .Net Application.
Pls check the attachment for your reference and request you to kindly help.

Try cleaning your xml from unnecessary comments, and reformat your xml in Pretty XML. This should help.

below is my xml, i dont have any unwanted stuff

<?xml version="1.0" encoding="UTF-8"?> reporting:1.0 KSAIS-123456 981ed174-151e-4d71-86a1-c5bba64fb8f2 2025-02-05 12:14:57 388 SAR SAR ICV 1 PIH NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ== 1010010000 Prince Aziz Stree 2322 Al-Murabba Riyadh 23333 SA 399999999900003 VAT شركة توريد التكنولوجيا بأقصى سرعة المحدودة | Maximum Speed Tech Supply LTD صلاح الدين | Salah Al-Din 1111 المروج | Al-Murooj الرياض | Riyadh 12222 SA 300000776200003 VAT شركة نماذج فاتورة المحدودة | Fatoora Samples LTD 2025-02-05 10 false discount 0.00 S 15 VAT 45.00 45.00 300.00 45.00 S 15.00 VAT 300.00 300.00 345.00 0.00 0.00 345.00 1 1 300.00 45.00 345.00 قلم رصاص S 15.00 VAT 300.00 true discount 0.00

Dear @sohrabus

Thank you for reaching out & welcome to the community.

Kindly share the details through below email:
sp_support@zatca.gov.sa

Thanks

@sohrabus
Try change your code for Create New xmlDocument

image

from
var doc = new xmlDocument();

to

var doc = new xmlDocument();
doc.PreserveWhitespace = true;