|
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
6 | 6 | <title>فَوْتَرَة - نظام الفوترة الجزائري</title> |
7 | 7 | <style> |
8 | | - /* جميع الأنماط السابقة مع تحسين لون المدفوع */ |
| 8 | + /* جميع الأنماط السابقة مع تحسين لون المبلغ المدفوع */ |
9 | 9 | @font-face { |
10 | 10 | font-family: "Optimistic"; |
11 | 11 | font-style: normal; |
|
330 | 330 | height: 30px !important; |
331 | 331 | } |
332 | 332 | .paid-input { |
333 | | - width: 100px !important; |
| 333 | + width: 80px !important; |
334 | 334 | font-size: 0.9rem !important; |
335 | | - height: 34px !important; |
336 | 335 | } |
337 | 336 | } |
338 | 337 | @media (min-width: 481px) and (max-width: 768px) { |
|
1248 | 1247 | } |
1249 | 1248 | /* نهاية أنماط السلة */ |
1250 | 1249 |
|
1251 | | - /* ====== أنماط المدفوع والباقي (محسّنة) ====== */ |
| 1250 | + /* ====== تحسين أنماط المبلغ المدفوع ====== */ |
1252 | 1251 | .paid-remaining-row { |
1253 | 1252 | display: flex; |
1254 | 1253 | flex-direction: column; |
1255 | 1254 | gap: 4px; |
1256 | 1255 | } |
1257 | | - /* تحسين حقل المبلغ المدفوع: لون أسود واضح، خلفية بيضاء في الوضع الفاتح، داكنة في الوضع الداكن */ |
1258 | 1256 | .paid-input { |
1259 | | - width: 150px; |
1260 | | - height: 40px; |
1261 | | - border-radius: 10px; |
| 1257 | + width: 140px; |
| 1258 | + height: 36px; |
| 1259 | + border-radius: 8px; |
1262 | 1260 | border: 1px solid #cbd5e1; |
1263 | | - background: #ffffff; |
1264 | | - padding: 0 12px; |
| 1261 | + background: white; |
| 1262 | + padding: 0 8px; |
1265 | 1263 | text-align: left; |
1266 | 1264 | font-weight: 700; |
1267 | | - font-size: 1.05rem; |
| 1265 | + font-size: 1rem; |
1268 | 1266 | color: #000000 !important; /* أسود واضح */ |
1269 | | - transition: border-color 0.2s, box-shadow 0.2s; |
| 1267 | + caret-color: #000000; |
1270 | 1268 | outline: none; |
| 1269 | + transition: border-color 0.2s; |
1271 | 1270 | } |
1272 | 1271 | .paid-input:focus { |
1273 | 1272 | border-color: #0ea5e9; |
1274 | | - box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25); |
| 1273 | + box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); |
1275 | 1274 | } |
1276 | 1275 | .dark .paid-input { |
1277 | 1276 | background: #0f172a; |
1278 | 1277 | border-color: #475569; |
1279 | | - color: #ffffff !important; /* في الوضع الداكن يصبح أبيض للتباين */ |
| 1278 | + color: #f1f5f9 !important; /* أبيض فاتح في الوضع الداكن */ |
| 1279 | + caret-color: #f1f5f9; |
1280 | 1280 | } |
1281 | 1281 | .dark .paid-input:focus { |
1282 | 1282 | border-color: #38bdf8; |
1283 | | - box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25); |
| 1283 | + box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); |
1284 | 1284 | } |
1285 | 1285 | .remaining-amount { |
1286 | 1286 | font-weight: 900; |
|
1290 | 1290 | .remaining-amount.negative { |
1291 | 1291 | color: #ef4444; |
1292 | 1292 | } |
1293 | | - /* نهاية أنماط المدفوع */ |
| 1293 | + /* نهاية تحسينات المدفوع */ |
1294 | 1294 | </style> |
1295 | 1295 | <link rel="preconnect" href="https://fonts.googleapis.com" /> |
1296 | 1296 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
@@ -1891,6 +1891,7 @@ <h3 id="modal-title" class="font-extrabold text-lg">سلة المشتريات</h |
1891 | 1891 | } catch (e) {} |
1892 | 1892 | } |
1893 | 1893 |
|
| 1894 | + // دالة تفريغ السلة |
1894 | 1895 | function clearCart() { |
1895 | 1896 | if (cart.length === 0) { |
1896 | 1897 | showToast('السلة فارغة بالفعل', 'warning'); |
@@ -1922,6 +1923,7 @@ <h3 id="modal-title" class="font-extrabold text-lg">سلة المشتريات</h |
1922 | 1923 | state.notifications.settings = { lowStockThreshold: 5, overdueDays: 30, enableLowStock: true, |
1923 | 1924 | enableOverdue: true, enableNewInvoice: true, enableSystem: true }; |
1924 | 1925 | } |
| 1926 | + // ترقية الفواتير القديمة لإضافة paidAmount |
1925 | 1927 | let needSave = false; |
1926 | 1928 | for (const inv of state.invoices) { |
1927 | 1929 | if (inv.paidAmount === undefined) { |
@@ -3276,7 +3278,7 @@ <h3 id="modal-title" class="font-extrabold text-lg">سلة المشتريات</h |
3276 | 3278 | } |
3277 | 3279 |
|
3278 | 3280 | // ================================================================ |
3279 | | - // SETTINGS |
| 3281 | + // SETTINGS (نفس الشيء) |
3280 | 3282 | // ================================================================ |
3281 | 3283 | function loadSettings() { |
3282 | 3284 | const c = state.company; |
@@ -3419,6 +3421,7 @@ <h3 id="modal-title" class="font-extrabold text-lg">سلة المشتريات</h |
3419 | 3421 | await saveImage('stamp', data.company.stamp); |
3420 | 3422 | data.company.stamp = ''; |
3421 | 3423 | } |
| 3424 | + // إضافة paidAmount للفواتير المستوردة |
3422 | 3425 | for (const inv of data.invoices) { |
3423 | 3426 | if (inv.paidAmount === undefined) inv.paidAmount = 0; |
3424 | 3427 | } |
@@ -3748,7 +3751,7 @@ <h3 id="modal-title" class="font-extrabold text-lg">سلة المشتريات</h |
3748 | 3751 | } |
3749 | 3752 |
|
3750 | 3753 | // ================================================================ |
3751 | | - // CREATE INVOICE FROM CART |
| 3754 | + // CREATE INVOICE FROM CART (مع إضافة المدفوع صفر) |
3752 | 3755 | // ================================================================ |
3753 | 3756 | function createInvoiceFromCart(customer) { |
3754 | 3757 | if (cart.length === 0) { showToast('السلة فارغة', 'error'); return; } |
|
0 commit comments