تاريخ إنشاء الفاتورة: {{ shipment.created_at.strftime('%Y-%m-%d %H:%M') if shipment else '2025-06-28 10:30' }}
مرسال
M

مرسال إكسبرس للاستيراد والتصدير

فاتورة شحن

رقم الفاتورة: {{ shipment.tracking_number if shipment else 'SHIP-20250627-001' }}
{% if shipment and shipment.package_type == 'document' and shipment.status == 'delivered' %}
اسم المرسل: {{ shipment.sender_name if shipment else 'أحمد محمد علي' }}
رقم الهاتف: {{ shipment.sender_phone if shipment else '+965 1234 5678' }}
اسم المستلم: {{ shipment.receiver_name if shipment else 'فاطمة أحمد حسن' }}
نوع الشحنة: {{ get_document_type_arabic(shipment.document_type) if shipment.document_type else 'مستندات' }}
الإجراء: {{ shipment.package_contents if shipment.package_contents else 'غير محدد' }}
رقم التتبع: {{ shipment.tracking_number if shipment else 'SHIP-20250627-001' }}
حالة المستند: تم التسليم
{% else %}
اسم المرسل: {{ shipment.sender_name if shipment else 'أحمد محمد علي' }}
رقم هاتف المرسل: {{ shipment.sender_phone if shipment else '+965 1234 5678' }}
اسم المستلم: {{ shipment.receiver_name if shipment else 'فاطمة أحمد حسن' }}
رقم هاتف المستلم: {{ shipment.receiver_phone if shipment else '+249 123 456 789' }}
📍 عنوان المستلم: {{ shipment.receiver_address if shipment and shipment.receiver_address else '—' }}
{% endif %} {% if not (shipment and shipment.package_type == 'document' and shipment.status == 'delivered') %}

تفاصيل الشحنة

{% if shipment and shipment.package_type == 'document' %} {% endif %} {% if not shipment or shipment.package_type != 'document' %} {% endif %} {% if not shipment or shipment.package_type != 'document' %} {% endif %}
نوع الشحنة {% if shipment %} {% if shipment.package_type == 'document' %} {{ get_document_type_arabic(shipment.document_type) if shipment.document_type else 'مستندات' }} {% else %} {{ get_text('shipment_types')[shipment.package_type] if shipment.package_type in get_text('shipment_types') else shipment.package_type }} {% endif %} {% else %} إلكترونيات {% endif %}
{% if shipment and shipment.package_type == 'document' %} الإجراء {% else %} المحتويات {% endif %} {% if shipment %} {% if shipment.package_type == 'document' %} {{ shipment.package_contents if shipment.package_contents else 'غير محدد' }} {% else %} {{ shipment.package_contents if shipment.package_contents else 'غير محدد' }} {% endif %} {% else %} هاتف ذكي جديد {% endif %}
رقم التتبع {{ shipment.tracking_number if shipment else 'SHIP-20250627-001' }}
حالة المستند {% if shipment.status == 'created' %} تم الإنشاء {% elif shipment.status == 'under_review' %} قيد المراجعة {% elif shipment.status == 'documents_received' %} تم استلام المستندات {% elif shipment.status == 'authentication_in_progress' %} التوثيق جاري {% elif shipment.status == 'authentication_completed' %} تم التوثيق {% elif shipment.status == 'sending_after_auth' %} الإرسال بعد التوثيق {% elif shipment.status == 'in_transit' %} في الطريق {% elif shipment.status == 'delivered' %} تم التسليم {% elif shipment.status == 'cancelled' %} ملغاة {% else %} {{ shipment.status }} {% endif %}
الوزن {{ "%.2f" | format(shipment.weight) if shipment and shipment.weight else "0.00" }} كيلو
الخصم {{ "%.3f" | format(shipment.discount) if shipment and shipment.discount else "0.000" }} د.ك
البوليصة {{ "%.3f" | format(shipment.waybill_price) if shipment and shipment.waybill_price else "0.000" }} د.ك
المبلغ المدفوع {{ "%.3f" | format(shipment.paid_amount) if shipment and shipment.paid_amount else "0.000" }} د.ك
المبلغ المتبقي {{ "%.3f" | format(shipment.remaining_amount if shipment and shipment.remaining_amount is not none else 0.000) }} د.ك
{% endif %}
{% if shipment and shipment.package_type == 'document' and shipment.status == 'delivered' %}
توقيع المرسل
____________________
{% else %}
توقيع الموظف
{{ current_user.username }}
{% endif %}