Update: 2026-05-08 14:05:50

This commit is contained in:
Hamza-Ayed
2026-05-08 14:05:50 +03:00
parent cfc330e291
commit 155c2d0fc0
13 changed files with 709 additions and 22 deletions

View File

@@ -226,7 +226,7 @@ class InvoiceDetailController extends GetxController {
AlertDialog(
title: const Text('تأكيد الإرسال'),
content: const Text(
'هل أنت متأكد من إرسال هذه الفاتورة لمنظومة جوفتورة؟\nلا يمكن التراجع عن هذا الإجراء.'),
'هل أنت متأكد من إرسال هذه الفاتورة لمنظومة جوفوترا؟\nلا يمكن التراجع عن هذا الإجراء.'),
actions: [
TextButton(
onPressed: () => Get.back(result: false),
@@ -246,21 +246,21 @@ class InvoiceDetailController extends GetxController {
if (confirmed != true) return;
try {
AppSnackbar.showInfo('جاري الإرسال', 'يتم إرسال الفاتورة لمنظومة جوفتورة...');
AppSnackbar.showInfo('جاري الإرسال', 'يتم إرسال الفاتورة لمنظومة جوفوترا...');
final res = await DioClient().client.post(
'invoices/submit-jofotara',
data: {'invoice_id': invoiceId},
);
if (res.data['success'] == true) {
AppSnackbar.showSuccess('تم الإرسال', 'تم تقديم الفاتورة لجوفتورة بنجاح');
AppSnackbar.showSuccess('تم الإرسال', 'تم تقديم الفاتورة لجوفوترا بنجاح');
fetchInvoiceDetails();
} else {
AppSnackbar.showError('خطأ', res.data['message'] ?? 'فشل الإرسال');
}
} catch (e) {
AppLogger.error('Failed to submit to JoFotara', e);
AppSnackbar.showError('خطأ', 'فشل إرسال الفاتورة لجوفتورة');
AppSnackbar.showError('خطأ', 'فشل إرسال الفاتورة لجوفوترا');
}
}
}

View File

@@ -135,7 +135,7 @@ class InvoiceDetailView extends StatelessWidget {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
),
icon: const Icon(Icons.send_rounded),
label: const Text('إرسال لجوفتورة', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16)),
label: const Text('إرسال لجوفوترا', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16)),
),
),
],
@@ -268,7 +268,7 @@ class InvoiceDetailView extends StatelessWidget {
const Icon(Icons.verified, color: Color(0xFF10B981), size: 20),
const SizedBox(width: 8),
const Text(
'مُقدَّمة لجوفتورة',
'مُقدَّمة لجوفوترا',
style: TextStyle(fontWeight: FontWeight.bold, color: Color(0xFF10B981)),
),
],
@@ -489,7 +489,7 @@ class InvoiceDetailView extends StatelessWidget {
break;
case 'submitted':
color = const Color(0xFF6366F1);
text = 'مُقدَّمة لجوفتورة';
text = 'مُقدَّمة لجوفوترا';
break;
default:
color = const Color(0xFFF59E0B);