update pos

This commit is contained in:
Flatlogic Bot 2026-03-20 18:25:54 +00:00
parent 6f7b57b235
commit d230ce890d
4 changed files with 48 additions and 8 deletions

View File

@ -93,7 +93,7 @@ if (empty($slides)) {
} }
.item-name { .item-name {
font-size: 2.5vmin; font-size: 2.5vmin;
font-weight: 600; font-weight: normal;
color: var(--text); color: var(--text);
} }
.item-details { .item-details {

View File

@ -111,3 +111,15 @@
2026-03-20 04:58:13 - Test write from web server 2026-03-20 04:58:13 - Test write from web server
2026-03-20 09:01:08 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true} 2026-03-20 09:01:08 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 09:01:47 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true} 2026-03-20 09:01:47 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 21:46:17 - Items case hit
2026-03-20 21:46:35 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 21:46:43 - Items case hit
2026-03-20 21:46:56 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 21:47:03 - Items case hit
2026-03-20 21:47:15 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 21:47:23 - Items case hit
2026-03-20 21:56:20 - Items case hit
2026-03-20 21:56:30 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 21:56:39 - Items case hit
2026-03-20 21:56:47 - Requesting AI. UUID: [e1f9b5b3-fcef-4c8d-87d2-8630b1f72491] CFG: {"base_url":"https:\/\/flatlogic.com","responses_path":"\/projects\/38471\/ai-request","project_id":"38471","project_uuid":"e1f9b5b3-fcef-4c8d-87d2-8630b1f72491","project_header":"Project-UUID","default_model":"gpt-4o-mini","timeout":30,"verify_tls":true}
2026-03-20 21:56:51 - Items case hit

View File

@ -476,8 +476,14 @@ if (isset($_GET['action']) || isset($_POST['action'])) {
<i class="bi bi-box-seam text-muted" style="font-size: 3rem;"></i> <i class="bi bi-box-seam text-muted" style="font-size: 3rem;"></i>
</div> </div>
<?php endif; ?> <?php endif; ?>
<div class="fw-bold mb-1 product-name" data-en="<?= htmlspecialchars($p['name_en']) ?>" data-ar="<?= htmlspecialchars($p['name_ar']) ?>"><?= htmlspecialchars($p['name_en'] ?: $p['name_ar']) ?></div> <div class="mb-1 product-name" data-en="<?= htmlspecialchars($p['name_en']) ?>" data-ar="<?= htmlspecialchars($p['name_ar']) ?>">
<div class="small text-muted mb-2"><?= htmlspecialchars($p['sku']) ?></div> <?php if(!empty($p['name_ar'])): ?>
<div><?= htmlspecialchars($p['name_ar']) ?></div>
<div class="small text-secondary" style="font-size: 0.75rem; line-height: 1.1;"><?= htmlspecialchars($p['name_en']) ?></div>
<?php else: ?>
<div><?= htmlspecialchars($p['name_en']) ?></div>
<?php endif; ?>
</div>
<div class="d-flex justify-content-between align-items-center mt-auto"> <div class="d-flex justify-content-between align-items-center mt-auto">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<?php if ($p['sale_price'] < $p['original_price']): ?> <?php if ($p['sale_price'] < $p['original_price']): ?>
@ -5417,8 +5423,14 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System';
<i class="bi bi-box-seam text-muted" style="font-size: 3rem;"></i> <i class="bi bi-box-seam text-muted" style="font-size: 3rem;"></i>
</div> </div>
<?php endif; ?> <?php endif; ?>
<div class="fw-bold mb-1 product-name" data-en="<?= htmlspecialchars($p['name_en']) ?>" data-ar="<?= htmlspecialchars($p['name_ar']) ?>"><?= htmlspecialchars($p['name_en'] ?: $p['name_ar']) ?></div> <div class="mb-1 product-name" data-en="<?= htmlspecialchars($p['name_en']) ?>" data-ar="<?= htmlspecialchars($p['name_ar']) ?>">
<div class="small text-muted mb-2"><?= htmlspecialchars($p['sku']) ?></div> <?php if(!empty($p['name_ar'])): ?>
<div><?= htmlspecialchars($p['name_ar']) ?></div>
<div class="small text-secondary" style="font-size: 0.75rem; line-height: 1.1;"><?= htmlspecialchars($p['name_en']) ?></div>
<?php else: ?>
<div><?= htmlspecialchars($p['name_en']) ?></div>
<?php endif; ?>
</div>
<div class="d-flex justify-content-between align-items-center mt-auto"> <div class="d-flex justify-content-between align-items-center mt-auto">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<?php if ($p['sale_price'] < $p['original_price']): ?> <?php if ($p['sale_price'] < $p['original_price']): ?>
@ -5573,7 +5585,7 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System';
const vatRate = (i.vatRate !== undefined && i.vatRate !== null) ? i.vatRate : 0; const vatRate = (i.vatRate !== undefined && i.vatRate !== null) ? i.vatRate : 0;
const vatAmount = price * qty * (vatRate / (100 + vatRate)); const vatAmount = price * qty * (vatRate / (100 + vatRate));
return { return {
name: (document.documentElement.lang === 'ar' ? (i.nameAr || i.nameEn) : (i.nameEn || i.nameAr)) || 'Unknown Item', name: (function(){ let n = ''; if(i.nameAr) n += '<div>'+i.nameAr+'</div>'; if(i.nameEn) n += '<div>'+i.nameEn+'</div>'; return n || 'Unknown Item'; })(),
price: price, price: price,
qty: qty, qty: qty,
vat: vatAmount vat: vatAmount
@ -5858,12 +5870,16 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System';
const vatRate = (item.vatRate !== undefined && item.vatRate !== null) ? item.vatRate : 0; const vatRate = (item.vatRate !== undefined && item.vatRate !== null) ? item.vatRate : 0;
const itemVat = itemTotal * (vatRate / (100 + vatRate)); const itemVat = itemTotal * (vatRate / (100 + vatRate));
totalVat += itemVat; totalVat += itemVat;
const displayName = (lang === 'ar' ? (item.nameAr || item.nameEn) : (item.nameEn || item.nameAr)) || 'Unknown Item';
let nameHtml = '';
if (item.nameAr) nameHtml += `<div>${item.nameAr}</div>`;
if (item.nameEn) nameHtml += `<div>${item.nameEn}</div>`;
if (!nameHtml) nameHtml = '<div>' + (item.nameAr || item.nameEn || 'Unknown Item') + '</div>';
return ` return `
<div class="cart-item"> <div class="cart-item">
<div class="flex-grow-1"> <div class="flex-grow-1">
<div class="fw-bold small">${displayName}</div> <div class="small">${nameHtml}</div>
<div class="text-muted smaller"><?= __('currency') ?> ${price.toFixed(3)} <span class="badge bg-light text-dark smaller">VAT ${parseFloat(vatRate || 0).toFixed(2)}%</span></div> <div class="text-muted smaller"><?= __('currency') ?> ${price.toFixed(3)} <span class="badge bg-light text-dark smaller">VAT ${parseFloat(vatRate || 0).toFixed(2)}%</span></div>
</div> </div>
<div class="qty-controls mx-3"> <div class="qty-controls mx-3">

View File

@ -129,3 +129,15 @@
2026-03-20 05:25:59 - POST: {"action":"save_theme","theme":"dark"} 2026-03-20 05:25:59 - POST: {"action":"save_theme","theme":"dark"}
2026-03-20 05:26:01 - POST: {"action":"save_theme","theme":"ocean"} 2026-03-20 05:26:01 - POST: {"action":"save_theme","theme":"ocean"}
2026-03-20 05:26:03 - POST: {"action":"save_theme","theme":"default"} 2026-03-20 05:26:03 - POST: {"action":"save_theme","theme":"default"}
2026-03-20 17:46:35 - POST: {"action":"translate","text":"LAMING TOMATO PASTE 800G","target":"ar"}
2026-03-20 17:46:43 - POST: {"id":"57","name_en":"LAMING TOMATO PASTE 800G","name_ar":"\u0645\u0639\u062c\u0648\u0646 \u0637\u0645\u0627\u0637\u0645 \u0644\u0627\u0645\u064a\u0646\u062c 800 \u062c\u0631\u0627\u0645","sku":"000023071476","category_id":"","unit_id":"","supplier_id":"","sale_price":"0.5","purchase_price":"0.392","stock_quantity":"0","min_stock_level":"0","vat_rate":"0.00","promotion_start":"","promotion_end":"","promotion_percent":"0","edit_item":""}
2026-03-20 17:46:56 - POST: {"action":"translate","text":"TOMATO PASTE","target":"ar"}
2026-03-20 17:47:03 - POST: {"id":"56","name_en":"TOMATO PASTE","name_ar":"\u0645\u0639\u062c\u0648\u0646 \u0627\u0644\u0637\u0645\u0627\u0637\u0645","sku":"000023071469","category_id":"","unit_id":"","supplier_id":"","sale_price":"0.2","purchase_price":"0.11","stock_quantity":"0","min_stock_level":"0","vat_rate":"0.00","promotion_start":"","promotion_end":"","promotion_percent":"0","edit_item":""}
2026-03-20 17:47:15 - POST: {"action":"translate","text":"\u0646\u0634\u0627 400\u062c\u0645","target":"en"}
2026-03-20 17:47:23 - POST: {"id":"55","name_en":"Starch 400g","name_ar":"\u0646\u0634\u0627 400\u062c\u0645","sku":"000023028982","category_id":"","unit_id":"","supplier_id":"","sale_price":"0.35","purchase_price":"0.263","stock_quantity":"0","min_stock_level":"0","vat_rate":"0.00","promotion_start":"","promotion_end":"","promotion_percent":"0","edit_item":""}
2026-03-20 17:56:30 - POST: {"action":"translate","text":"\u0644\u064a\u0641 \u062d\u062f\u064a\u062f 3*1","target":"en"}
2026-03-20 17:56:38 - POST: {"id":"14","name_en":"Iron Wool 3*1","name_ar":"\u0644\u064a\u0641 \u062d\u062f\u064a\u062f 3*1","sku":"000001404159","category_id":"","unit_id":"","supplier_id":"","sale_price":"0.2","purchase_price":"0.125","stock_quantity":"-1","min_stock_level":"0","vat_rate":"0.00","promotion_start":"","promotion_end":"","promotion_percent":"0","edit_item":""}
2026-03-20 17:56:47 - POST: {"action":"translate","text":"\u0644\u064a\u0641 \u062d\u062f\u064a\u062f \u0630\u0647\u0628\u064a 3*1","target":"en"}
2026-03-20 17:56:51 - POST: {"id":"13","name_en":"Gold Iron Sponge 3*1","name_ar":"\u0644\u064a\u0641 \u062d\u062f\u064a\u062f \u0630\u0647\u0628\u064a 3*1","sku":"000001404142","category_id":"","unit_id":"","supplier_id":"","sale_price":"0.2","purchase_price":"0.125","stock_quantity":"-1","min_stock_level":"0","vat_rate":"0.00","promotion_start":"","promotion_end":"","promotion_percent":"0","edit_item":""}
2026-03-20 18:02:45 - POST: {"action":"save_pos_transaction","customer_id":"","payments":"[{\"method\":\"cash\",\"amount\":0.7}]","total_amount":"0.7","tax_amount":"0.023809523809523808","discount_code_id":"","discount_amount":"0","loyalty_redeemed":"0","items":"[{\"id\":56,\"qty\":1,\"price\":0.2,\"vat_rate\":0,\"vat_amount\":0},{\"id\":62,\"qty\":2,\"price\":0.25,\"vat_rate\":5,\"vat_amount\":0.023809523809523808}]"}
2026-03-20 18:25:38 - POST: {"action":"save_pos_transaction","customer_id":"","payments":"[{\"method\":\"cash\",\"amount\":3.15}]","total_amount":"3.15","tax_amount":"0","discount_code_id":"","discount_amount":"0","loyalty_redeemed":"0","items":"[{\"id\":36,\"qty\":1,\"price\":1.45,\"vat_rate\":0,\"vat_amount\":0},{\"id\":18,\"qty\":1,\"price\":0.6,\"vat_rate\":0,\"vat_amount\":0},{\"id\":30,\"qty\":1,\"price\":1.1,\"vat_rate\":0,\"vat_amount\":0}]"}