{/* 1. لوحة إدخال البيانات (نفس القديم) */}
setCustomerName(e.target.value)}
placeholder=”اسم العميل” className=”w-full pr-9 pl-3 py-2 border border-gray-200 rounded-xl outline-none text-sm”
/>
setCustomerPhone(e.target.value)}
placeholder=”رقم الهاتف” className=”w-full pr-9 pl-3 py-2 border border-gray-200 rounded-xl outline-none text-sm font-mono”
/>
إضافة للقائمة الشهرية (آجل)
setIsCredit(!isCredit)} className=”w-5 h-5 cursor-pointer” />
{/* 2. اختيار الخدمات (البحث) */}
setSearch(e.target.value)}
placeholder=”🔍 ابحث عن قطعة (ثوب، عباية…)”
className=”w-full pr-10 pl-3 py-3 border-2 border-blue-100 rounded-2xl outline-none focus:border-blue-400″
/>
{/* 3. عرض الخدمات المفلترة (أزرار إضافة سريعة) */}
setDiscountInput(e.target.value)}
placeholder=”قيمة الخصم BHD” className=”flex-1 p-2 bg-gray-50 border border-gray-200 rounded-lg text-sm outline-none”
/>
);
}
إنشاء فاتورة | POS
{search && services.filter(s => s.name_ar.includes(search)).map(service => (
))}
{/* 4. عرض معاينة الفاتورة (Invoice Preview) */}
))
)}
{/* 5. الإجماليات وأزرار الحفظ (الثابتة بالأسفل) */}
{service.name_ar}
{service.name_en}
محتويات الفاتورة:
{cart.length === 0 ? (السلة فارغة.. ابحث عن خدمات لإضافتها
) : (
cart.map(item => (
{item.service_name_ar} ({item.service_type === ‘wash_iron’ ? ‘غسيل’ : ‘كوي’})
{formatPrice(item.total_price)} BHD
الإجمالي النهائي
{formatPrice(total)} BHD