<html lang="km"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>តារាងសម្ភារ និងសង្ហារិម - ប្រព័ន្ធរួម</title> <script src="https://cdn.tailwindcss.com"></script> <style> table { width: 100%; border-collapse: collapse; margin-top: 10px; font-family: Arial, sans-serif; } table, th, td { border: 2px solid #ddd; } table td, table th { white-space: nowrap; } th, td { padding: 1px 5px; line-height: 1; text-align: left; } @media print { .no-print { display: none !important; } @page { margin: 1cm; } } </style> <style> *, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; --tw-contain-size: ; --tw-contain-layout: ; --tw-contain-paint: ; --tw-contain-style: ; } ::backdrop { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; --tw-contain-size: ; --tw-contain-layout: ; --tw-contain-paint: ; --tw-contain-style: ; } /* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */ *, ::after, ::before { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; } ::after, ::before { --tw-content: ''; } :host, html { line-height: 1.5; -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-feature-settings: normal; font-variation-settings: normal; -webkit-tap-highlight-color: transparent; } body { margin: 0; line-height: inherit; } hr { height: 0; color: inherit; border-top-width: 1px; } abbr:where([title]) { -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } a { color: inherit; text-decoration: inherit; } b, strong { font-weight: bolder; } code, kbd, pre, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-feature-settings: normal; font-variation-settings: normal; font-size: 1em; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } table { text-indent: 0; border-color: inherit; border-collapse: collapse; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; } button, select { text-transform: none; } button, input:where([type='button']), input:where([type='reset']), input:where([type='submit']) { -webkit-appearance: button; background-color: transparent; background-image: none; } :-moz-focusring { outline: auto; } :-moz-ui-invalid { box-shadow: none; } progress { vertical-align: baseline; } ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } [type='search'] { -webkit-appearance: textfield; outline-offset: -2px; } ::-webkit-search-decoration { -webkit-appearance: none; } ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } summary { display: list-item; } blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre { margin: 0; } fieldset { margin: 0; padding: 0; } legend { padding: 0; } menu, ol, ul { list-style: none; margin: 0; padding: 0; } dialog { padding: 0; } textarea { resize: vertical; } input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; } [role='button'], button { cursor: pointer; } :disabled { cursor: default; } audio, canvas, embed, iframe, img, object, svg, video { display: block; vertical-align: middle; } img, video { max-width: 100%; height: auto; } [hidden]:where(:not([hidden='until-found'])) { display: none; } .mx-auto { margin-left: auto; margin-right: auto; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mt-4 { margin-top: 1rem; } .mr-2 { margin-right: 0.5rem; } .block { display: block; } .flex { display: flex; } .grid { display: grid; } .hidden { display: none; } .min-h-screen { min-height: 100vh; } .w-full { width: 100%; } .min-w-\[300px\] { min-width: 300px; } .max-w-full { max-width: 100%; } .flex-1 { flex: 1 1 0%; } .cursor-pointer { cursor: pointer; } .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .overflow-x-auto { overflow-x: auto; } .rounded { border-radius: 0.25rem; } .rounded-lg { border-radius: 0.5rem; } .rounded-full { border-radius: 9999px; } .border { border-width: 1px; } .border-b { border-bottom-width: 1px; } .border-r { border-right-width: 1px; } .border-gray-200 { --tw-border-opacity: 1; border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); } .border-gray-300 { --tw-border-opacity: 1; border-color: rgb(209 213 219 / var(--tw-border-opacity, 1)); } .border-indigo-300 { --tw-border-opacity: 1; border-color: rgb(165 180 252 / var(--tw-border-opacity, 1)); } .border-indigo-400 { --tw-border-opacity: 1; border-color: rgb(129 140 248 / var(--tw-border-opacity, 1)); } .bg-blue-50 { --tw-bg-opacity: 1; background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1)); } .bg-blue-600 { --tw-bg-opacity: 1; background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); } .bg-gray-100 { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); } .bg-gray-400 { --tw-bg-opacity: 1; background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1)); } .bg-gray-600 { --tw-bg-opacity: 1; background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)); } .bg-green-50 { --tw-bg-opacity: 1; background-color: rgb(240 253 244 / var(--tw-bg-opacity, 1)); } .bg-green-600 { --tw-bg-opacity: 1; background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)); } .bg-indigo-50 { --tw-bg-opacity: 1; background-color: rgb(238 242 255 / var(--tw-bg-opacity, 1)); } .bg-indigo-500 { --tw-bg-opacity: 1; background-color: rgb(99 102 241 / var(--tw-bg-opacity, 1)); } .bg-indigo-600 { --tw-bg-opacity: 1; background-color: rgb(79 70 229 / var(--tw-bg-opacity, 1)); } .bg-orange-600 { --tw-bg-opacity: 1; background-color: rgb(234 88 12 / var(--tw-bg-opacity, 1)); } .bg-purple-600 { --tw-bg-opacity: 1; background-color: rgb(147 51 234 / var(--tw-bg-opacity, 1)); } .bg-red-50 { --tw-bg-opacity: 1; background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1)); } .bg-red-600 { --tw-bg-opacity: 1; background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1)); } .bg-teal-600 { --tw-bg-opacity: 1; background-color: rgb(13 148 136 / var(--tw-bg-opacity, 1)); } .bg-white { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } .bg-yellow-600 { --tw-bg-opacity: 1; background-color: rgb(202 138 4 / var(--tw-bg-opacity, 1)); } .bg-blue-100 { --tw-bg-opacity: 1; background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1)); } .bg-green-100 { --tw-bg-opacity: 1; background-color: rgb(220 252 231 / var(--tw-bg-opacity, 1)); } .bg-indigo-100 { --tw-bg-opacity: 1; background-color: rgb(224 231 255 / var(--tw-bg-opacity, 1)); } .bg-orange-100 { --tw-bg-opacity: 1; background-color: rgb(255 237 213 / var(--tw-bg-opacity, 1)); } .bg-red-100 { --tw-bg-opacity: 1; background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1)); } .bg-yellow-100 { --tw-bg-opacity: 1; background-color: rgb(254 249 195 / var(--tw-bg-opacity, 1)); } .bg-gradient-to-br { background-image: linear-gradient( to bottom right, var(--tw-gradient-stops) ); } .from-blue-50 { --tw-gradient-from: #eff6ff var(--tw-gradient-from-position); --tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); } .to-indigo-100 { --tw-gradient-to: #e0e7ff var(--tw-gradient-to-position); } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } .py-4 { padding-top: 1rem; padding-bottom: 1rem; } .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; } .text-2xl { font-size: 1.5rem; line-height: 2rem; } .text-3xl { font-size: 1.875rem; line-height: 2.25rem; } .text-sm { font-size: 0.875rem; line-height: 1.25rem; } .text-xl { font-size: 1.25rem; line-height: 1.75rem; } .text-base { font-size: 1rem; line-height: 1.5rem; } .font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .text-blue-900 { --tw-text-opacity: 1; color: rgb(30 58 138 / var(--tw-text-opacity, 1)); } .text-gray-600 { --tw-text-opacity: 1; color: rgb(75 85 99 / var(--tw-text-opacity, 1)); } .text-green-900 { --tw-text-opacity: 1; color: rgb(20 83 45 / var(--tw-text-opacity, 1)); } .text-indigo-800 { --tw-text-opacity: 1; color: rgb(55 48 163 / var(--tw-text-opacity, 1)); } .text-indigo-900 { --tw-text-opacity: 1; color: rgb(49 46 129 / var(--tw-text-opacity, 1)); } .text-red-900 { --tw-text-opacity: 1; color: rgb(127 29 29 / var(--tw-text-opacity, 1)); } .text-white { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity, 1)); } .text-blue-600 { --tw-text-opacity: 1; color: rgb(37 99 235 / var(--tw-text-opacity, 1)); } .text-blue-800 { --tw-text-opacity: 1; color: rgb(30 64 175 / var(--tw-text-opacity, 1)); } .text-green-800 { --tw-text-opacity: 1; color: rgb(22 101 52 / var(--tw-text-opacity, 1)); } .text-orange-800 { --tw-text-opacity: 1; color: rgb(154 52 18 / var(--tw-text-opacity, 1)); } .text-red-600 { --tw-text-opacity: 1; color: rgb(220 38 38 / var(--tw-text-opacity, 1)); } .text-red-800 { --tw-text-opacity: 1; color: rgb(153 27 27 / var(--tw-text-opacity, 1)); } .text-yellow-800 { --tw-text-opacity: 1; color: rgb(133 77 14 / var(--tw-text-opacity, 1)); } .shadow-lg { --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-xl { --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .hover\:bg-blue-700:hover { --tw-bg-opacity: 1; background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1)); } .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); } .hover\:bg-gray-500:hover { --tw-bg-opacity: 1; background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1)); } .hover\:bg-gray-700:hover { --tw-bg-opacity: 1; background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1)); } .hover\:bg-green-700:hover { --tw-bg-opacity: 1; background-color: rgb(21 128 61 / var(--tw-bg-opacity, 1)); } .hover\:bg-indigo-700:hover { --tw-bg-opacity: 1; background-color: rgb(67 56 202 / var(--tw-bg-opacity, 1)); } .hover\:bg-orange-700:hover { --tw-bg-opacity: 1; background-color: rgb(194 65 12 / var(--tw-bg-opacity, 1)); } .hover\:bg-purple-700:hover { --tw-bg-opacity: 1; background-color: rgb(126 34 206 / var(--tw-bg-opacity, 1)); } .hover\:bg-red-700:hover { --tw-bg-opacity: 1; background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1)); } .hover\:bg-teal-700:hover { --tw-bg-opacity: 1; background-color: rgb(15 118 110 / var(--tw-bg-opacity, 1)); } .hover\:bg-yellow-700:hover { --tw-bg-opacity: 1; background-color: rgb(161 98 7 / var(--tw-bg-opacity, 1)); } .hover\:text-blue-800:hover { --tw-text-opacity: 1; color: rgb(30 64 175 / var(--tw-text-opacity, 1)); } .hover\:text-red-800:hover { --tw-text-opacity: 1; color: rgb(153 27 27 / var(--tw-text-opacity, 1)); } .focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus\:ring-indigo-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1)); } @media (min-width: 768px) { .md\:col-span-2 { grid-column: span 2 / span 2; } .md\:col-span-3 { grid-column: span 3 / span 3; } .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } } @media (min-width: 1024px) { .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } } </style> </head> <body class="bg-gradient-to-br from-blue-50 to-indigo-100 min-h-screen p-6"> <div class="max-w-full mx-auto"> <!-- Header --> <div class="bg-white rounded-lg shadow-xl p-6 mb-6"> <h1 class="text-3xl font-bold text-indigo-900 mb-2"> តារាងសម្ភារ និងសង្ហារិម </h1> <p class="text-gray-600"> ប្រព័ន្ធគ្រប់គ្រងសម្ភារបរិក្ខារពេញលេញ </p> <!-- ប៊ូតុងប្តូរប្រព័ន្ធ --> <div class="mt-4 flex gap-3 no-print"> <button onclick="switchSystem('warehouse')" id="btn-warehouse" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 font-semibold" > 🏢 ប្រព័ន្ធឃ្លាំងផ្ទុក (សន្និធិដើម/ចូល/ចេញ) </button> <button onclick="switchSystem('simple')" id="btn-simple" class="px-6 py-3 bg-gray-400 text-white rounded-lg hover:bg-gray-500 font-semibold" > 📋 ប្រព័ន្ធធម្មតា (បញ្ជីសម្ភារ) </button> </div> </div> <!-- System 1: Warehouse System --> <div id="warehouseSystem"> <div class="bg-white rounded-lg shadow-xl p-6 mb-6"> <h2 class="text-2xl font-bold text-indigo-800 mb-4"> ប្រព័ន្ធគ្រប់គ្រងឃ្លាំងតាមកម្មវិធី </h2> <div class="mt-4 mb-4 no-print"> <div class="flex gap-2 items-center mb-3 flex-wrap"> <label class="font-semibold text-indigo-900" >ឃ្លាំង/កម្មវិធី:</label > <select id="warehouseSelect" onchange="switchWarehouse()" class="px-4 py-2 border border-indigo-300 rounded-lg bg-white focus:ring-2 focus:ring-indigo-500 flex-1 min-w-[300px]" > <option value="wh1"> I. កិច្ចដំណើរការរដ្ឋបាល (60028) </option> <option value="wh2"> II. អប់រំបំណិនជីវិត កីឡា ការងារយុវជន និងកុមារ (60058) </option> <option value="wh3"> III. សម្ភារៈរៀន និងបង្រៀន (60058) </option> <option value="wh4"> IV. ការកែលម្អបរិស្ថាន និងទីធ្លាកម្សាន្ត (61058) </option> <option value="wh5"> V. ការថែទាំ និងជួសជុលផ្សេងៗ (61068) </option> <option value="wh6"> VI. ការចូលរៀនដោយសមធម៌និងបង្ការសិស្សបោះបង់ (61108) </option> </select> <button onclick="showAddWarehouse()" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700" > ➕ បន្ថែមឃ្លាំង </button> <button onclick="editWarehouse()" class="px-4 py-2 bg-yellow-600 text-white rounded-lg hover:bg-yellow-700" > ✏️ កែប្រែ </button> <button onclick="deleteWarehouse()" class="px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700" > 🗑️ លុប </button> </div> </div> <div class="flex gap-2 mt-4 flex-wrap no-print"> <button onclick="saveWarehouseData()" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700" > 💾 រក្សាទុក </button> <button onclick="window.print()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700" > 🖨️ បោះពុម្ព </button> <button onclick="downloadWarehouseJSON()" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700" > ⬇️ JSON </button> <button onclick="downloadWarehouseCSV()" class="px-4 py-2 bg-teal-600 text-white rounded-lg hover:bg-teal-700" > ⬇️ CSV </button> <label class="px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 cursor-pointer" > ⬆️ នាំចូល JSON <input type="file" accept=".json" onchange="importWarehouseJSON(event)" class="hidden" /> </label> <button onclick="showWarehouseAddForm()" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700" > ➕ បន្ថែមសម្ភារ </button> </div> </div> <div id="warehouseFormContainer" class="bg-white rounded-lg shadow-lg p-6 mb-6 no-print hidden" > <h3 class="text-xl font-bold mb-4" id="warehouseFormTitle"> បន្ថែមឃ្លាំង/កម្មវិធីថ្មី </h3> <div class="grid gap-4"> <div> <label class="block font-semibold mb-2" >ឈ្មោះកម្មវិធី:</label > <input type="text" id="warehouseName" placeholder="ឧ. កិច្ចដំណើរការរដ្ឋបាល" class="w-full px-3 py-2 border rounded" /> </div> <div> <label class="block font-semibold mb-2" >លេខកូដសម្គាល់:</label > <input type="text" id="warehouseCode" placeholder="ឧ. 60028" class="w-full px-3 py-2 border rounded" /> </div> <div class="flex gap-2"> <button onclick="submitWarehouse()" class="px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700" > រក្សាទុក </button> <button onclick="cancelWarehouse()" class="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700" > បោះបង់ </button> </div> </div> </div> <div id="warehouseAddFormContainer" class="bg-white rounded-lg shadow-lg p-6 mb-6 no-print hidden" > <h3 class="text-xl font-bold mb-4" id="warehouseItemFormTitle" > បន្ថែមសម្ភារថ្មី </h3> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4" > <div class="md:col-span-2"> <label class="block font-semibold mb-2" >សម្ភារៈបរិក្ខារ ទំនិញតាមប្រភេទ ខ្នាតទំនិញ និងសញ្ញាសំគាល់:</label > <textarea id="whInputDescription" placeholder="បរិយាយលម្អិត..." class="w-full px-3 py-2 border rounded" rows="2" ></textarea> </div> <div> <label class="block font-semibold mb-2" >ឯកតាគិត:</label > <input type="text" id="whInputUnit" placeholder="ឧ. កេស, កញ្ចប់, គ្រឿង..." class="w-full px-3 py-2 border rounded" /> </div> <div class="md:col-span-3 bg-blue-50 p-4 rounded"> <h4 class="font-bold text-blue-900 mb-3"> សន្និធិដើមឆ្នាំ </h4> <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <div> <label class="block font-semibold mb-2" >ចំនួន:</label > <input type="number" id="whInputOpeningQty" placeholder="0" class="w-full px-3 py-2 border rounded" value="0" /> </div> <div> <label class="block font-semibold mb-2" >តម្លៃរាយ (រៀល):</label > <input type="text" id="whInputOpeningPrice" placeholder="0" class="w-full px-3 py-2 border rounded" value="0" /> </div> <div> <label class="block font-semibold mb-2" >តម្លៃសរុប (រៀល):</label > <input type="text" id="whInputOpeningTotal" placeholder="គណនាស្វ័យប្រវត្តិ" class="w-full px-3 py-2 border rounded bg-gray-100" readonly="" /> </div> </div> </div> <div class="md:col-span-3 bg-green-50 p-4 rounded"> <h4 class="font-bold text-green-900 mb-3"> សន្និធិចូលក្នុងឆ្នាំ </h4> <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <div> <label class="block font-semibold mb-2" >ចំនួន:</label > <input type="number" id="whInputInQty" placeholder="0" class="w-full px-3 py-2 border rounded" value="0" /> </div> <div> <label class="block font-semibold mb-2" >តម្លៃរាយ (រៀល):</label > <input type="text" id="whInputInPrice" placeholder="0" class="w-full px-3 py-2 border rounded" value="0" /> </div> <div> <label class="block font-semibold mb-2" >តម្លៃសរុប (រៀល):</label > <input type="text" id="whInputInTotal" placeholder="គណនាស្វ័យប្រវត្តិ" class="w-full px-3 py-2 border rounded bg-gray-100" readonly="" /> </div> </div> </div> <div class="md:col-span-3 bg-red-50 p-4 rounded"> <h4 class="font-bold text-red-900 mb-3"> សន្និធិចេញក្នុងឆ្នាំ </h4> <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <div> <label class="block font-semibold mb-2" >ចំនួន:</label > <input type="number" id="whInputOutQty" placeholder="0" class="w-full px-3 py-2 border rounded" value="0" /> </div> <div> <label class="block font-semibold mb-2" >តម្លៃរាយ (រៀល):</label > <input type="text" id="whInputOutPrice" placeholder="0" class="w-full px-3 py-2 border rounded" value="0" /> </div> <div> <label class="block font-semibold mb-2" >តម្លៃសរុប (រៀល):</label > <input type="text" id="whInputOutTotal" placeholder="គណនាស្វ័យប្រវត្តិ" class="w-full px-3 py-2 border rounded bg-gray-100" readonly="" /> </div> </div> </div> <div class="md:col-span-3 flex gap-2"> <button onclick="submitWarehouseItemForm()" class="px-6 py-2 bg-green-600 text-white rounded hover:bg-green-700" > រក្សាទុក </button> <button onclick="cancelWarehouseItemForm()" class="px-6 py-2 bg-gray-600 text-white rounded hover:bg-gray-700" > បោះបង់ </button> </div> </div> </div> <div class="bg-white rounded-lg shadow-lg mb-6"> <div class="p-6"> <div id="currentWarehouseInfo" class="mb-4 p-4 bg-indigo-50 rounded-lg" > <div class="flex justify-between items-center"> <div> <h3 class="text-xl font-bold text-indigo-900" > I. កិច្ចដំណើរការរដ្ឋបាល </h3> <p class="text-gray-600"> លេខកូដសម្គាល់: <span class="font-semibold">60028</span> </p> </div> <div class="text-right"> <p class="text-sm text-gray-600"> ចំនួនសម្ភារសរុប: <span class="font-bold text-indigo-900" >29</span > </p> </div> </div> </div> <div class="mb-4 no-print"> <input type="text" id="whSearchInput" placeholder="🔍 ស្វែងរក..." onkeyup="filterWarehouseData()" class="w-full px-4 py-2 border border-gray-300 rounded-lg" /> </div> <div class="overflow-x-auto rounded-lg border border-gray-200" > <table class="w-full text-sm" id="warehouseInventoryTable" > <thead class="bg-indigo-600 text-white"> <tr> <th class="px-3 py-3 text-center border-r border-indigo-400" rowspan="2" > ល.រ </th> <th class="px-3 py-3 text-left border-r border-indigo-400" rowspan="2" > សម្ភារៈបរិក្ខារ ទំនិញតាមប្រភេទ ខ្នាតទំនិញ និងសញ្ញាសំគាល់ </th> <th class="px-3 py-3 text-center border-r border-indigo-400" rowspan="2" > ឯកតាគិត </th> <th class="px-3 py-3 text-center border-r border-indigo-400" colspan="3" > សន្និធិដើមឆ្នាំ </th> <th class="px-3 py-3 text-center border-r border-indigo-400" colspan="3" > សន្និធិចូលក្នុងឆ្នាំ </th> <th class="px-3 py-3 text-center border-r border-indigo-400" colspan="3" > សន្និធិចេញក្នុងឆ្នាំ </th> <th class="px-3 py-3 text-center no-print" rowspan="2" > សកម្មភាព </th> </tr> <tr class="bg-indigo-500"> <th class="px-3 py-2 text-center border-r border-indigo-400" > ចំនួន </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > តម្លៃរាយ(៛) </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > តម្លៃសរុប(៛) </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > ចំនួន </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > តម្លៃរាយ(៛) </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > តម្លៃសរុប(៛) </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > ចំនួន </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > តម្លៃរាយ(៛) </th> <th class="px-3 py-2 text-center border-r border-indigo-400" > តម្លៃសរុប(៛) </th> </tr> </thead> <tbody id="warehouseInventoryBody"> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 1 </td> <td class="px-3 py-3 border-r"> កាវATM </td> <td class="px-3 py-3 text-center border-r" > ដប </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 13 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 104,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(1)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(1)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 2 </td> <td class="px-3 py-3 border-r"> កាវបិតថ្លា ៥០មល </td> <td class="px-3 py-3 text-center border-r" > ដប </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 4000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 13 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 4000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 52,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 4000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(2)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(2)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 3 </td> <td class="px-3 py-3 border-r"> កាវបិតថ្លា ៥០មល </td> <td class="px-3 py-3 text-center border-r" > ដប </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 3000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 20 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 3000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 60,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 3000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(3)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(3)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 4 </td> <td class="px-3 py-3 border-r"> ក្រដាស excellent </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 18000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 7 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 18000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 126,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 18000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(4)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(4)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 5 </td> <td class="px-3 py-3 border-r"> ក្រដាស statjet </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 19000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 4 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 19000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 76,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 19000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(5)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(5)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 6 </td> <td class="px-3 py-3 border-r"> ក្រដាស statjet </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 19700 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 19700 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 39,400 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 19700 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(6)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(6)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 7 </td> <td class="px-3 py-3 border-r"> ក្រដាសរ៉ាមDoubble A </td> <td class="px-3 py-3 text-center border-r" > កេស </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 60000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 4 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 60000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 240,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 60000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(7)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(7)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 8 </td> <td class="px-3 py-3 border-r"> ក្រដាសរ៉ាមDouble A </td> <td class="px-3 py-3 text-center border-r" > កេស </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 65000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 11 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 65000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 715,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 65000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(8)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(8)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 9 </td> <td class="px-3 py-3 border-r"> ក្រូណូដាក់ឯកសារ ទំហំA4 </td> <td class="px-3 py-3 text-center border-r" > ផ្ទាំង </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 15000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 15000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 15,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 15000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(9)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(9)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 10 </td> <td class="px-3 py-3 border-r"> ក្រូណូដាក់ឯកសារ(៦) </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 70000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 70000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 70,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 70000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(10)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(10)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 11 </td> <td class="px-3 py-3 border-r"> ក្រូណូដាក់ឯកសារ(៦) </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 63300 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 63300 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 63,300 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 63300 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(11)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(11)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 12 </td> <td class="px-3 py-3 border-r"> ឃ្នាបខ្មៅ 15mm </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 23500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 23500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 47,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 23500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(12)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(12)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 13 </td> <td class="px-3 py-3 border-r"> ឃ្នាបខ្មៅ 15mm </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 4 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 32,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(13)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(13)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 14 </td> <td class="px-3 py-3 border-r"> ជ័រថ្លាបិតរូបថត </td> <td class="px-3 py-3 text-center border-r" > ដប </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 2500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 4 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 10,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 2500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(14)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(14)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 15 </td> <td class="px-3 py-3 border-r"> តាំប៉ុងGiraffe ពណ៍ក្រហម </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 4 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 32,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 8000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(15)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(15)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 16 </td> <td class="px-3 py-3 border-r"> តារាងរដ្ឋបាល </td> <td class="px-3 py-3 text-center border-r" > ឈុត </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 36000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 36000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 72,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 36000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(16)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(16)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 17 </td> <td class="px-3 py-3 border-r"> ទឹកត្រាGiraffe ពណ៍ក្រហម </td> <td class="px-3 py-3 text-center border-r" > ដប </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 5000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 5000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 10,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 5000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(17)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(17)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 18 </td> <td class="px-3 py-3 border-r"> ទឹកហ្វឺត ជីរ៉ាហ្វ (ខៀវ) </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 55000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 7 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 55000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 385,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 55000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(18)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(18)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 19 </td> <td class="px-3 py-3 border-r"> ទឹកហ្វឺតជីរ៉ាហ្វ </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 50,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(19)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(19)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 20 </td> <td class="px-3 py-3 border-r"> បញ្ជីស្រង់ពិន្ទុ </td> <td class="px-3 py-3 text-center border-r" > ក្បាល </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 3500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 12 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 3500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 42,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 3500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(20)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(20)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 21 </td> <td class="px-3 py-3 border-r"> បញ្ជីហៅឈ្មោះសិស្ស </td> <td class="px-3 py-3 text-center border-r" > ក្បាល </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 3500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 12 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 3500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 42,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 3500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(21)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(21)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 22 </td> <td class="px-3 py-3 border-r"> ប៊ិកក្រហមម៉ាកជីរ៉ាហ្វ </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 25,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(22)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(22)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 23 </td> <td class="px-3 py-3 border-r"> ប៊ិកខៀវម៉ាកជីរ៉ាហ្វ </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 25,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 25000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(23)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(23)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 24 </td> <td class="px-3 py-3 border-r"> ប្រដាប់ចោះរន្ធពីរ </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 30000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 30000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 30,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 30000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(24)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(24)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 25 </td> <td class="px-3 py-3 border-r"> សឺមីកិបឡេវ ទំហំA4 </td> <td class="px-3 py-3 text-center border-r" > សន្លឹក </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 2000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 10 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 20,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 2000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(25)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(25)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 26 </td> <td class="px-3 py-3 border-r"> សឺមីក្រដាស ទំហំA4 </td> <td class="px-3 py-3 text-center border-r" > សន្លឹក </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 2500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 22 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 2500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 55,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 2500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(26)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(26)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 27 </td> <td class="px-3 py-3 border-r"> សៀវភៅតាមដានការសិក្សា </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 26500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 26500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 26,500 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 26500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(27)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(27)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 28 </td> <td class="px-3 py-3 border-r"> សៀវភៅសិក្ខាគារិក </td> <td class="px-3 py-3 text-center border-r" > ដុំ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 26500 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 26500 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 26,500 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 26500 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(28)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(28)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50 border-b"> <td class="px-3 py-3 text-center border-r" > 29 </td> <td class="px-3 py-3 border-r"> ហ្វឺតPILOT </td> <td class="px-3 py-3 text-center border-r" > ប្រអប់ </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-blue-50" > 28000 </td> <td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 1 </td> <td class="px-3 py-3 text-right border-r bg-green-50" > 28000 </td> <td class="px-3 py-3 text-right border-r bg-green-50 font-semibold" > 28,000 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 0 </td> <td class="px-3 py-3 text-right border-r bg-red-50" > 28000 </td> <td class="px-3 py-3 text-right border-r bg-red-50 font-semibold" > 0 </td> <td class="px-3 py-3 text-center no-print" > <button onclick="editWarehouseItem(29)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteWarehouseItem(29)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="bg-indigo-100 font-bold text-base" > <td colspan="3" class="px-3 py-3 text-right border-r" > សរុបទាំងអស់: </td> <td class="px-3 py-3 text-right border-r bg-blue-100" > 0 </td> <td class="px-3 py-3 border-r bg-blue-100" ></td> <td class="px-3 py-3 text-right border-r bg-blue-100 text-indigo-900" > 0 </td> <td class="px-3 py-3 text-right border-r bg-green-100" > 166 </td> <td class="px-3 py-3 border-r bg-green-100" ></td> <td class="px-3 py-3 text-right border-r bg-green-100 text-green-900" > 2,518,700 </td> <td class="px-3 py-3 text-right border-r bg-red-100" > 0 </td> <td class="px-3 py-3 border-r bg-red-100" ></td> <td class="px-3 py-3 text-right border-r bg-red-100 text-red-900" > 0 </td> <td class="no-print"></td> </tr> </tbody> </table> </div> </div> </div> </div> <!-- System 2: Simple System --> <div id="simpleSystem" class="hidden"> <div class="bg-white rounded-lg shadow-xl p-6 mb-6"> <h2 class="text-2xl font-bold text-indigo-800 mb-4"> ប្រព័ន្ធគ្រប់គ្រងសម្ភារធម្មតា </h2> <div class="flex gap-2 mt-4 flex-wrap no-print"> <button onclick="saveSimpleData()" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700" > 💾 រក្សាទុក </button> <button onclick="window.print()" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700" > 🖨️ បោះពុម្ព </button> <button onclick="downloadSimpleJSON()" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700" > ⬇️ JSON </button> <button onclick="downloadSimpleCSV()" class="px-4 py-2 bg-teal-600 text-white rounded-lg hover:bg-teal-700" > ⬇️ CSV </button> <label class="px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 cursor-pointer" > ⬆️ នាំចូល JSON <input type="file" accept=".json" onchange="importSimpleJSON(event)" class="hidden" /> </label> <button onclick="showSimpleAddForm()" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700" > ➕ បន្ថែមថ្មី </button> </div> </div> <div id="simpleAddFormContainer" class="bg-white rounded-lg shadow-lg p-6 mb-6 no-print hidden" > <h3 class="text-xl font-bold mb-4" id="simpleFormTitle"> បន្ថែមថ្មី </h3> <div class="grid grid-cols-2 md:grid-cols-4 gap-4"> <select id="simpleInputType" class="px-3 py-2 border rounded" > <option value="MOB">MOB</option> <option value="MBU">MBU</option> <option value="MIN">MIN</option> </select> <input type="text" id="simpleInputDescription" placeholder="បរិយាយ" class="px-3 py-2 border rounded" /> <input type="number" id="simpleInputYear" placeholder="ឆ្នាំ" class="px-3 py-2 border rounded" /> <input type="text" id="simpleInputUser" placeholder="ឈ្មោះអ្នកប្រើ" class="px-3 py-2 border rounded" /> <input type="number" id="simpleInputQuantity" placeholder="បរិមាណ" class="px-3 py-2 border rounded" /> <input type="text" id="simpleInputPrice" placeholder="តម្លៃ" class="px-3 py-2 border rounded" /> <select id="simpleInputStatus" class="px-3 py-2 border rounded" > <option value="ល្អ">ល្អ</option> <option value="មធ្យម">មធ្យម</option> <option value="អន់">អន់</option> <option value="ខូច">ខូច</option> </select> <div class="flex gap-2"> <button onclick="submitSimpleForm()" class="px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700" > រក្សាទុក </button> <button onclick="cancelSimpleForm()" class="px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700" > បោះបង់ </button> </div> </div> </div> <div class="bg-white rounded-lg shadow-lg mb-6"> <div class="flex border-b no-print"> <button onclick="switchSimpleTab('inventory')" id="simple-tab-inventory" class="px-6 py-4 font-semibold bg-indigo-600 text-white" > 📋 តារាងសម្ភារ និងសង្ហារិម </button> <button onclick="switchSimpleTab('yearly')" id="simple-tab-yearly" class="px-6 py-4 font-semibold text-gray-600 hover:bg-gray-50" > 📈 តារាងសម្ភារកើនក្នុងឆ្នាំ </button> <button onclick="switchSimpleTab('tracking')" id="simple-tab-tracking" class="px-6 py-4 font-semibold text-gray-600 hover:bg-gray-50" > 📊 តារាងតាមដាន </button> </div> <div class="p-6"> <div id="simpleInventoryTab"> <div class="mb-4 flex gap-4 no-print"> <input type="text" id="simpleSearchInput" placeholder="🔍 ស្វែងរក..." onkeyup="filterSimpleData()" class="flex-1 px-4 py-2 border border-gray-300 rounded-lg" /> <select id="simpleYearFilter" onchange="filterSimpleData()" class="px-4 py-2 border border-gray-300 rounded-lg" > <option value="all">ឆ្នាំទាំងអស់</option> <option value="2025">2025</option> <option value="2024">2024</option> <option value="2023">2023</option> <option value="2022">2022</option> <option value="2021">2021</option> <option value="2020">2020</option> <option value="2019">2019</option> <option value="2018">2018</option> <option value="2017">2017</option> <option value="2016">2016</option> <option value="2013">2013</option> <option value="2010">2010</option> <option value="2004">2004</option> <option value="2000">2000</option> <option value="1999">1999</option> <option value="1998">1998</option> </select> </div> <div class="overflow-x-auto rounded-lg border border-gray-200" > <table class="w-full" id="simpleInventoryTable"> <thead class="bg-indigo-600 text-white"> <tr> <th class="px-4 py-3 text-left"> ល.រ </th> <th class="px-4 py-3 text-left"> តាមប្រភេទ </th> <th class="px-4 py-3 text-left"> បរិយាយ </th> <th class="px-4 py-3 text-left"> ប្រើប្រាស់ពីឆ្នាំ </th> <th class="px-4 py-3 text-left"> ឈ្មោះអ្នកប្រើ </th> <th class="px-4 py-3 text-right"> បរិមាណ </th> <th class="px-4 py-3 text-right"> តម្លៃ(រៀល) </th> <th class="px-4 py-3 text-center"> ស្ថានភាព </th> <th class="px-4 py-3 text-center no-print" > សកម្មភាព </th> </tr> </thead> <tbody id="simpleInventoryBody"> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">1</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">ធុងដែក</td> <td class="px-4 py-3">1998</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,200,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(1)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(1)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">2</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុសិស្ស៤បង្កុយ(ឈើ) </td> <td class="px-4 py-3">1999</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 9 </td> <td class="px-4 py-3 text-right"> 900,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(2)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(2)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">3</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">កៅអីគ្រូ</td> <td class="px-4 py-3">2000</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 6 </td> <td class="px-4 py-3 text-right"> 640,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-orange-100 text-orange-800" >អន់</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(3)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(3)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">4</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុសិស្ស២បង្កុយ(ឈើ) </td> <td class="px-4 py-3">2000</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 85 </td> <td class="px-4 py-3 text-right"> 7,480,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(4)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(4)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">5</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ក្ដារខៀនដីស </td> <td class="px-4 py-3">2000</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 4 </td> <td class="px-4 py-3 text-right"> 400,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-orange-100 text-orange-800" >អន់</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(5)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(5)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">6</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ក្ដារខៀនហ្វឺត </td> <td class="px-4 py-3">2000</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 250,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(6)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(6)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">7</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">ទូកញ្ចក់</td> <td class="px-4 py-3">2004</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 250,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(7)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(7)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">8</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">ហិបដែក</td> <td class="px-4 py-3">2010</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 200,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-orange-100 text-orange-800" >អន់</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(8)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(8)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">9</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ធ្នើដាក់សៀវភៅធំ </td> <td class="px-4 py-3">2010</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 200,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(9)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(9)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">10</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុសិស្ស២បង្កុយ(ឈើ) </td> <td class="px-4 py-3">2013</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 20 </td> <td class="px-4 py-3 text-right"> 1,400,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-orange-100 text-orange-800" >អន់</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(10)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(10)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">11</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុសិស្ស២បង្កុយ(ឈើ) </td> <td class="px-4 py-3">2013</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 95 </td> <td class="px-4 py-3 text-right"> 40,679,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-orange-100 text-orange-800" >អន់</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(11)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(11)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">12</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុអាន(ដែក) </td> <td class="px-4 py-3">2013</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 5 </td> <td class="px-4 py-3 text-right"> 2,848,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(12)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(12)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">13</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ធ្នើមុខមួយ </td> <td class="px-4 py-3">2013</td> <td class="px-4 py-3"> ក្នុងស្រុក </td> <td class="px-4 py-3 text-right font-semibold" > 2 </td> <td class="px-4 py-3 text-right"> 2,377,400 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(13)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(13)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">14</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ក្ដារខៀនព័ត៌មាន </td> <td class="px-4 py-3">2016</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 2 </td> <td class="px-4 py-3 text-right"> 160,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(14)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(14)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">15</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> កៅអីជ័រធុនតូច </td> <td class="px-4 py-3">2017</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 31 </td> <td class="px-4 py-3 text-right"> 192,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(15)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(15)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">16</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុអាន(ដែក) </td> <td class="px-4 py-3">2017</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 12 </td> <td class="px-4 py-3 text-right"> 576,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(16)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(16)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">17</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> ម៉ាស៊ីនព្រីន Epson L360 </td> <td class="px-4 py-3">2018</td> <td class="px-4 py-3">សប្បុសជន</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,200,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(17)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(17)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">18</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> កង្ហារភ្ជាប់ពិដាន </td> <td class="px-4 py-3">2018</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 12 </td> <td class="px-4 py-3 text-right"> 960,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-orange-100 text-orange-800" >អន់</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(18)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(18)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">19</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុសម្រាប់គ្រូ </td> <td class="px-4 py-3">2018</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 6 </td> <td class="px-4 py-3 text-right"> 1,800,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(19)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(19)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">20</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុសិស្ស២បង្កុយ(ដែក) </td> <td class="px-4 py-3">2018</td> <td class="px-4 py-3"> ក្រសួងអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 145 </td> <td class="px-4 py-3 text-right"> 60,900,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(20)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(20)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">21</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">ទោងរំអិល</td> <td class="px-4 py-3">2018</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 3 </td> <td class="px-4 py-3 text-right"> 1,080,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(21)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(21)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">22</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ក្ដារខៀនហ្វឺត </td> <td class="px-4 py-3">2018</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 18 </td> <td class="px-4 py-3 text-right"> 4,500,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(22)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(22)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">23</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MIN</span > </td> <td class="px-4 py-3"> កុំព្យូទ័រយួរដៃ Asus </td> <td class="px-4 py-3">2019</td> <td class="px-4 py-3"> ក្រសួងអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 2,713,500 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(23)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(23)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">24</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ក្ដាររំអិល </td> <td class="px-4 py-3">2019</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 4 </td> <td class="px-4 py-3 text-right"> 1,600,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(24)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(24)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">25</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ជណ្ដើរស្វា </td> <td class="px-4 py-3">2019</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 3 </td> <td class="px-4 py-3 text-right"> 1,584,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(25)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(25)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">26</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ម៉ាស៊ីនព្រីនHP </td> <td class="px-4 py-3">2019</td> <td class="px-4 py-3"> ក្រសួងអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,336,500 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(26)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(26)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">27</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">តុតឿ</td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 6 </td> <td class="px-4 py-3 text-right"> 100,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(27)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(27)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">28</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">ដែកតោង</td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 3 </td> <td class="px-4 py-3 text-right"> 200,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(28)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(28)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">29</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ទូដាក់កញ្ចក់ដាក់ឯកសារ </td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 750,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(29)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(29)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">30</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ធ្នើដាក់សៀវភៅតាមថ្នាក់ </td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 60,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(30)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(30)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">31</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ធ្នើដាក់សៀវភៅតូច </td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 5 </td> <td class="px-4 py-3 text-right"> 40,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(31)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(31)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">32</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ធ្នើមុខពីរ </td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 3 </td> <td class="px-4 py-3 text-right"> 70,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(32)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(32)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">33</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> ធ្នើមុខមួយ </td> <td class="px-4 py-3">2020</td> <td class="px-4 py-3">W.V.S</td> <td class="px-4 py-3 text-right font-semibold" > 4 </td> <td class="px-4 py-3 text-right"> 50,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(33)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(33)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">34</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MIN</span > </td> <td class="px-4 py-3"> កុំព្យូទ័រយួរដៃ Acer </td> <td class="px-4 py-3">2021</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 2,800,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(34)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(34)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">35</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">កៅអីគ្រូ</td> <td class="px-4 py-3">2021</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 6 </td> <td class="px-4 py-3 text-right"> 720,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(35)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(35)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">36</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3"> តុគ្រូ(ដែក) </td> <td class="px-4 py-3">2021</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 6 </td> <td class="px-4 py-3 text-right"> 100,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(36)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(36)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">37</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MOB</span > </td> <td class="px-4 py-3">តុវែង</td> <td class="px-4 py-3">2021</td> <td class="px-4 py-3"> មន្ទីរអប់រំ </td> <td class="px-4 py-3 text-right font-semibold" > 3 </td> <td class="px-4 py-3 text-right"> 200,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(37)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(37)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">38</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> ម៉ាស៊ីនព្រីន Epson L3210 </td> <td class="px-4 py-3">2022</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 800,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(38)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(38)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">39</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> កង្ហារភ្ជាប់ជញ្ជាំង </td> <td class="px-4 py-3">2023</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 4 </td> <td class="px-4 py-3 text-right"> 250,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(39)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(39)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">40</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> កុំព្យូទ័រលើតុ Desktop </td> <td class="px-4 py-3">2023</td> <td class="px-4 py-3">សប្បុសជន</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,800,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(40)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(40)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">41</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> ម៉ាស៊ីនព្រីន Canon </td> <td class="px-4 py-3">2023</td> <td class="px-4 py-3">សប្បុសជន</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,100,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(41)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(41)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">42</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> ម៉ូទ័របូមទឹក </td> <td class="px-4 py-3">2023</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 400,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(42)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(42)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">43</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3">Speaker</td> <td class="px-4 py-3">2024</td> <td class="px-4 py-3">សប្បុរសជន</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 800,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(43)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(43)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">44</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> Micro sound (តូច) </td> <td class="px-4 py-3">2024</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 60,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(44)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(44)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">45</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> កង្ហារភ្ជាប់ជញ្ជាំង(ធំ) </td> <td class="px-4 py-3">2024</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 240,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-red-100 text-red-800" >ខូច</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(45)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(45)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">46</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MIN</span > </td> <td class="px-4 py-3"> ម៉ាស៊ីនព្រីន Color </td> <td class="px-4 py-3">2025</td> <td class="px-4 py-3">សប្បុរសជន</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,000,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800" >ល្អ</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(46)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(46)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">47</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MIN</span > </td> <td class="px-4 py-3"> ម៉ាស៊ីនព្រីន Black white </td> <td class="px-4 py-3">2025</td> <td class="px-4 py-3">សប្បុរសជន</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 1,500,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(47)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(47)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-4 py-3">48</td> <td class="px-4 py-3"> <span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold" >MBU</span > </td> <td class="px-4 py-3"> ម៉ូទ័រកាត់ផ្កា </td> <td class="px-4 py-3">2025</td> <td class="px-4 py-3">SOF</td> <td class="px-4 py-3 text-right font-semibold" > 1 </td> <td class="px-4 py-3 text-right"> 500,000 </td> <td class="px-4 py-3 text-center"> <span class="px-3 py-1 rounded-full text-sm font-semibold bg-yellow-100 text-yellow-800" >មធ្យម</span > </td> <td class="px-4 py-3 text-center no-print" > <button onclick="editSimpleItem(48)" class="text-blue-600 hover:text-blue-800 mr-2" > ✏️</button ><button onclick="deleteSimpleItem(48)" class="text-red-600 hover:text-red-800" > 🗑️ </button> </td> </tr> <tr class="bg-indigo-50 font-bold"> <td colspan="5" class="px-4 py-3 text-right" > សរុប: </td> <td class="px-4 py-3 text-right"> 523 </td> <td class="px-4 py-3 text-right"> 150,966,400 </td> <td colspan="2"></td> </tr> </tbody> </table> </div> </div> <div id="simpleYearlyTab" class="hidden"></div> <div id="simpleTrackingTab" class="hidden"></div> </div> </div> </div> </div> <script> // Global state let currentSystem = 'warehouse' // Warehouse System Data let warehouses = {} let currentWarehouseId = null let editingWarehouseId = null let editingWarehouseItemId = null // Simple System Data let simpleEquipmentData = [] let editingSimpleId = null const defaultWarehouses = { wh1: { id: 'wh1', name: 'I. កិច្ចដំណើរការរដ្ឋបាល', code: '60028', items: [ { id: 1, description: 'កាវATM', unit: 'ដប', opening: { qty: 0, price: '8000' }, in: { qty: 13, price: '8000' }, out: { qty: 0, price: '8000' }, }, { id: 2, description: 'កាវបិតថ្លា ៥០មល', unit: 'ដប', opening: { qty: 0, price: '4000' }, in: { qty: 13, price: '4000' }, out: { qty: 0, price: '4000' }, }, { id: 3, description: 'កាវបិតថ្លា ៥០មល', unit: 'ដប', opening: { qty: 0, price: '3000' }, in: { qty: 20, price: '3000' }, out: { qty: 0, price: '3000' }, }, { id: 4, description: 'ក្រដាស excellent', unit: 'ដុំ', opening: { qty: 0, price: '18000' }, in: { qty: 7, price: '18000' }, out: { qty: 0, price: '18000' }, }, { id: 5, description: 'ក្រដាស statjet', unit: 'ដុំ', opening: { qty: 0, price: '19000' }, in: { qty: 4, price: '19000' }, out: { qty: 0, price: '19000' }, }, { id: 6, description: 'ក្រដាស statjet', unit: 'ដុំ', opening: { qty: 0, price: '19700' }, in: { qty: 2, price: '19700' }, out: { qty: 0, price: '19700' }, }, { id: 7, description: 'ក្រដាសរ៉ាមDoubble A', unit: 'កេស', opening: { qty: 0, price: '60000' }, in: { qty: 4, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 8, description: 'ក្រដាសរ៉ាមDouble A', unit: 'កេស', opening: { qty: 0, price: '65000' }, in: { qty: 11, price: '65000' }, out: { qty: 0, price: '65000' }, }, { id: 9, description: 'ក្រូណូដាក់ឯកសារ ទំហំA4', unit: 'ផ្ទាំង', opening: { qty: 0, price: '15000' }, in: { qty: 1, price: '15000' }, out: { qty: 0, price: '15000' }, }, { id: 10, description: 'ក្រូណូដាក់ឯកសារ(៦)', unit: 'ដុំ', opening: { qty: 0, price: '70000' }, in: { qty: 1, price: '70000' }, out: { qty: 0, price: '70000' }, }, { id: 11, description: 'ក្រូណូដាក់ឯកសារ(៦)', unit: 'ដុំ', opening: { qty: 0, price: '63300' }, in: { qty: 1, price: '63300' }, out: { qty: 0, price: '63300' }, }, { id: 12, description: 'ឃ្នាបខ្មៅ 15mm', unit: 'ប្រអប់', opening: { qty: 0, price: '23500' }, in: { qty: 2, price: '23500' }, out: { qty: 0, price: '23500' }, }, { id: 13, description: 'ឃ្នាបខ្មៅ 15mm', unit: 'ប្រអប់', opening: { qty: 0, price: '8000' }, in: { qty: 4, price: '8000' }, out: { qty: 0, price: '8000' }, }, { id: 14, description: 'ជ័រថ្លាបិតរូបថត', unit: 'ដប', opening: { qty: 0, price: '2500' }, in: { qty: 4, price: '2500' }, out: { qty: 0, price: '2500' }, }, { id: 15, description: 'តាំប៉ុងGiraffe ពណ៍ក្រហម', unit: 'ប្រអប់', opening: { qty: 0, price: '8000' }, in: { qty: 4, price: '8000' }, out: { qty: 0, price: '8000' }, }, { id: 16, description: 'តារាងរដ្ឋបាល', unit: 'ឈុត', opening: { qty: 0, price: '36000' }, in: { qty: 2, price: '36000' }, out: { qty: 0, price: '36000' }, }, { id: 17, description: 'ទឹកត្រាGiraffe ពណ៍ក្រហម', unit: 'ដប', opening: { qty: 0, price: '5000' }, in: { qty: 2, price: '5000' }, out: { qty: 0, price: '5000' }, }, { id: 18, description: 'ទឹកហ្វឺត ជីរ៉ាហ្វ (ខៀវ)', unit: 'ដុំ', opening: { qty: 0, price: '55000' }, in: { qty: 7, price: '55000' }, out: { qty: 0, price: '55000' }, }, { id: 19, description: 'ទឹកហ្វឺតជីរ៉ាហ្វ', unit: 'ដុំ', opening: { qty: 0, price: '25000' }, in: { qty: 2, price: '25000' }, out: { qty: 0, price: '25000' }, }, { id: 20, description: 'បញ្ជីស្រង់ពិន្ទុ', unit: 'ក្បាល', opening: { qty: 0, price: '3500' }, in: { qty: 12, price: '3500' }, out: { qty: 0, price: '3500' }, }, { id: 21, description: 'បញ្ជីហៅឈ្មោះសិស្ស', unit: 'ក្បាល', opening: { qty: 0, price: '3500' }, in: { qty: 12, price: '3500' }, out: { qty: 0, price: '3500' }, }, { id: 22, description: 'ប៊ិកក្រហមម៉ាកជីរ៉ាហ្វ', unit: 'ប្រអប់', opening: { qty: 0, price: '25000' }, in: { qty: 1, price: '25000' }, out: { qty: 0, price: '25000' }, }, { id: 23, description: 'ប៊ិកខៀវម៉ាកជីរ៉ាហ្វ', unit: 'ប្រអប់', opening: { qty: 0, price: '25000' }, in: { qty: 1, price: '25000' }, out: { qty: 0, price: '25000' }, }, { id: 24, description: 'ប្រដាប់ចោះរន្ធពីរ', unit: 'ប្រអប់', opening: { qty: 0, price: '30000' }, in: { qty: 1, price: '30000' }, out: { qty: 0, price: '30000' }, }, { id: 25, description: 'សឺមីកិបឡេវ ទំហំA4', unit: 'សន្លឹក', opening: { qty: 0, price: '2000' }, in: { qty: 10, price: '2000' }, out: { qty: 0, price: '2000' }, }, { id: 26, description: 'សឺមីក្រដាស ទំហំA4', unit: 'សន្លឹក', opening: { qty: 0, price: '2500' }, in: { qty: 22, price: '2500' }, out: { qty: 0, price: '2500' }, }, { id: 27, description: 'សៀវភៅតាមដានការសិក្សា', unit: 'ដុំ', opening: { qty: 0, price: '26500' }, in: { qty: 1, price: '26500' }, out: { qty: 0, price: '26500' }, }, { id: 28, description: 'សៀវភៅសិក្ខាគារិក', unit: 'ដុំ', opening: { qty: 0, price: '26500' }, in: { qty: 1, price: '26500' }, out: { qty: 0, price: '26500' }, }, { id: 29, description: 'ហ្វឺតPILOT', unit: 'ប្រអប់', opening: { qty: 0, price: '28000' }, in: { qty: 1, price: '28000' }, out: { qty: 0, price: '28000' }, }, ], }, wh2: { id: 'wh2', name: 'II. អប់រំបំណិនជីវិត កីឡា ការងារយុវជន និងកុមារ', code: '60058', items: [ { id: 1, description: 'ថង់ខ្មៅ', unit: 'ដុំ', opening: { qty: 0, price: '12500' }, in: { qty: 4, price: '12500' }, out: { qty: 0, price: '12500' }, }, { id: 2, description: 'បាល់ទះ Mikasa', unit: 'គ្រាប់', opening: { qty: 0, price: '60000' }, in: { qty: 1, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 3, description: 'បាល់ទះMikasa', unit: 'គ្រាប់', opening: { qty: 0, price: '60000' }, in: { qty: 2, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 4, description: 'បាល់ទាត់ Mikasa', unit: 'គ្រាប់', opening: { qty: 0, price: '60000' }, in: { qty: 4, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 5, description: 'បាល់ទាត់Mikasa', unit: 'គ្រាប់', opening: { qty: 0, price: '60000' }, in: { qty: 2, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 6, description: 'ម៉ាស់', unit: 'ដុំ', opening: { qty: 0, price: '5000' }, in: { qty: 29, price: '5000' }, out: { qty: 0, price: '5000' }, }, { id: 7, description: 'សំណាញ់បាល់ទាត់', unit: 'គូ', opening: { qty: 0, price: '100500' }, in: { qty: 1, price: '100500' }, out: { qty: 0, price: '100500' }, }, { id: 8, description: 'អាល់កុល', unit: 'ដប', opening: { qty: 0, price: '5500' }, in: { qty: 1, price: '5500' }, out: { qty: 0, price: '5500' }, }, { id: 9, description: 'អាល់កុល៥០០ml', unit: 'ដប', opening: { qty: 0, price: '6000' }, in: { qty: 1, price: '6000' }, out: { qty: 0, price: '6000' }, }, ], }, wh3: { id: 'wh3', name: 'III. សម្ភារៈរៀន និងបង្រៀន', code: '60058', items: [ { id: 1, description: 'Color ផាត់រូបភាព', unit: 'ដុំ', opening: { qty: 0, price: '15000' }, in: { qty: 2, price: '15000' }, out: { qty: 0, price: '15000' }, }, { id: 2, description: 'កងបង្វិល', unit: 'ឈុត', opening: { qty: 0, price: '8000' }, in: { qty: 12, price: '8000' }, out: { qty: 0, price: '8000' }, }, { id: 3, description: 'កន្រ្តៃ', unit: 'ដើម', opening: { qty: 0, price: '3500' }, in: { qty: 20, price: '3500' }, out: { qty: 0, price: '3500' }, }, { id: 4, description: 'កន្រ្តៃ', unit: 'ដើម', opening: { qty: 0, price: '4000' }, in: { qty: 10, price: '4000' }, out: { qty: 0, price: '4000' }, }, { id: 5, description: 'កាវបិតថ្លា ៥០មល', unit: 'ដប', opening: { qty: 0, price: '5000' }, in: { qty: 14, price: '5000' }, out: { qty: 0, price: '5000' }, }, { id: 6, description: 'កូនបាល់', unit: 'គ្រាប់', opening: { qty: 0, price: '500000' }, in: { qty: 50, price: '500000' }, out: { qty: 0, price: '500000' }, }, { id: 7, description: 'ក្តារចំនួន0ដល់២០', unit: 'ផ្ទាំង', opening: { qty: 0, price: '4000' }, in: { qty: 10, price: '4000' }, out: { qty: 0, price: '4000' }, }, { id: 8, description: 'ក្តារព្យញ្ជនៈ៣៣តួ', unit: 'ផ្ទាំង', opening: { qty: 0, price: '4000' }, in: { qty: 20, price: '4000' }, out: { qty: 0, price: '4000' }, }, { id: 9, description: 'ក្រដាសកាតុង', unit: 'សន្លឹក', opening: { qty: 0, price: '1000' }, in: { qty: 207, price: '1000' }, out: { qty: 0, price: '1000' }, }, { id: 10, description: 'ក្រដាសកាតុង', unit: 'ដុំ', opening: { qty: 0, price: '54000' }, in: { qty: 1, price: '54000' }, out: { qty: 0, price: '54000' }, }, { id: 11, description: 'ក្រដាសផ្ទាំងធំ', unit: 'សន្លឹក', opening: { qty: 0, price: '500000' }, in: { qty: 266, price: '500000' }, out: { qty: 0, price: '500000' }, }, { id: 12, description: 'ក្រដាសពណ៌A4', unit: 'កេស', opening: { qty: 0, price: '60000' }, in: { qty: 1, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 13, description: 'ក្រដាសពណ៌A4', unit: 'ដំុ', opening: { qty: 0, price: '15000' }, in: { qty: 5, price: '15000' }, out: { qty: 0, price: '15000' }, }, { id: 14, description: 'ក្រដាសរ៉ាមDouble A', unit: 'កេស', opening: { qty: 0, price: '60000' }, in: { qty: 2, price: '60000' }, out: { qty: 0, price: '60000' }, }, { id: 15, description: 'ក្រដាសរ៉ាមDouble A', unit: 'ដុំ', opening: { qty: 0, price: '15000' }, in: { qty: 4, price: '15000' }, out: { qty: 0, price: '15000' }, }, ], }, wh4: { id: 'wh4', name: 'IV. ការកែលម្អបរិស្ថាន និងទីធ្លាកម្សាន្ត', code: '61058', items: [ { id: 1, description: 'កែងទុយោមុខពីរ(27Cm)', unit: 'គ្រាប់', opening: { qty: 0, price: '10000' }, in: { qty: 6, price: '10000' }, out: { qty: 0, price: '10000' }, }, { id: 2, description: 'ខ្វែវ', unit: 'ដើម', opening: { qty: 0, price: '40000' }, in: { qty: 1, price: '40000' }, out: { qty: 0, price: '40000' }, }, { id: 3, description: 'ខ្វែវ', unit: 'ដើម', opening: { qty: 0, price: '43300' }, in: { qty: 1, price: '43300' }, out: { qty: 0, price: '43300' }, }, { id: 4, description: 'ចបកាប់', unit: 'ដើម', opening: { qty: 0, price: '40000' }, in: { qty: 10, price: '40000' }, out: { qty: 0, price: '40000' }, }, { id: 5, description: 'ចបជីក', unit: 'ដើម', opening: { qty: 0, price: '40000' }, in: { qty: 6, price: '40000' }, out: { qty: 0, price: '40000' }, }, ], }, wh5: { id: 'wh5', name: 'V. ការថែទាំ និងជួសជុលផ្សេងៗ', code: '61068', items: [ { id: 1, description: 'Keyboad', unit: 'ឈុត', opening: { qty: 0, price: '120000' }, in: { qty: 2, price: '120000' }, out: { qty: 0, price: '120000' }, }, { id: 2, description: 'Mouse Bluetooth', unit: 'ឈុត', opening: { qty: 0, price: '50000' }, in: { qty: 1, price: '50000' }, out: { qty: 0, price: '50000' }, }, { id: 3, description: 'SSD Hardrive', unit: 'គ្រាប់', opening: { qty: 0, price: '193000' }, in: { qty: 1, price: '193000' }, out: { qty: 0, price: '193000' }, }, { id: 4, description: 'USB Connect Wifi', unit: 'គ្រាប់', opening: { qty: 0, price: '45000' }, in: { qty: 1, price: '45000' }, out: { qty: 0, price: '45000' }, }, { id: 5, description: 'ដុំទឹកថ្នាំPrinter', unit: 'ឈុត', opening: { qty: 0, price: '106000' }, in: { qty: 1, price: '106000' }, out: { qty: 0, price: '106000' }, }, ], }, wh6: { id: 'wh6', name: 'VI. ការចូលរៀនដោយសមធម៌និងបង្ការសិស្សបោះបង់', code: '61108', items: [ { id: 1, description: 'ប្រដាប់កិបក្រដាសម៉ាក Kangaro', unit: 'ប្រអប់', opening: { qty: 0, price: '40000' }, in: { qty: 7, price: '40000' }, out: { qty: 0, price: '40000' }, }, { id: 2, description: 'ស្គុតក្រដាស', unit: 'ដុំ', opening: { qty: 0, price: '8600' }, in: { qty: 1, price: '8600' }, out: { qty: 0, price: '8600' }, }, { id: 3, description: 'ស្គុតថ្លា', unit: 'ដុំ', opening: { qty: 0, price: '5000' }, in: { qty: 61, price: '5000' }, out: { qty: 0, price: '5000' }, }, { id: 4, description: 'ហ្វឺត Highlight ម៉ាកជីរ៉ាហ្វ', unit: 'ដើម', opening: { qty: 0, price: '2000' }, in: { qty: 20, price: '2000' }, out: { qty: 0, price: '2000' }, }, { id: 5, description: 'ហ្វឺតHighLight ជីរ៉ាហ្វ', unit: 'ដើម', opening: { qty: 0, price: '2500' }, in: { qty: 4, price: '2500' }, out: { qty: 0, price: '2500' }, }, ], }, } const defaultSimpleData = [ { id: 1, type: 'MOB', description: 'ធុងដែក', year: 1998, user: 'ក្នុងស្រុក', quantity: 1, price: '1,200,000', status: 'ខូច', }, { id: 2, type: 'MOB', description: 'តុសិស្ស៤បង្កុយ(ឈើ)', year: 1999, user: 'ក្នុងស្រុក', quantity: 9, price: '900,000', status: 'ខូច', }, { id: 3, type: 'MOB', description: 'កៅអីគ្រូ', year: 2000, user: 'ក្នុងស្រុក', quantity: 6, price: '640,000', status: 'អន់', }, { id: 4, type: 'MOB', description: 'តុសិស្ស២បង្កុយ(ឈើ)', year: 2000, user: 'ក្នុងស្រុក', quantity: 85, price: '7,480,000', status: 'ខូច', }, { id: 5, type: 'MOB', description: 'ក្ដារខៀនដីស', year: 2000, user: 'ក្នុងស្រុក', quantity: 4, price: '400,000', status: 'អន់', }, { id: 6, type: 'MOB', description: 'ក្ដារខៀនហ្វឺត', year: 2000, user: 'ក្នុងស្រុក', quantity: 1, price: '250,000', status: 'ខូច', }, { id: 7, type: 'MOB', description: 'ទូកញ្ចក់', year: 2004, user: 'ក្នុងស្រុក', quantity: 1, price: '250,000', status: 'ខូច', }, { id: 8, type: 'MOB', description: 'ហិបដែក', year: 2010, user: 'ក្នុងស្រុក', quantity: 1, price: '200,000', status: 'អន់', }, { id: 9, type: 'MOB', description: 'ធ្នើដាក់សៀវភៅធំ', year: 2010, user: 'ក្នុងស្រុក', quantity: 1, price: '200,000', status: 'មធ្យម', }, { id: 10, type: 'MOB', description: 'តុសិស្ស២បង្កុយ(ឈើ)', year: 2013, user: 'ក្នុងស្រុក', quantity: 20, price: '1,400,000', status: 'អន់', }, { id: 11, type: 'MOB', description: 'តុសិស្ស២បង្កុយ(ឈើ)', year: 2013, user: 'ក្នុងស្រុក', quantity: 95, price: '40,679,000', status: 'អន់', }, { id: 12, type: 'MOB', description: 'តុអាន(ដែក)', year: 2013, user: 'ក្នុងស្រុក', quantity: 5, price: '2,848,000', status: 'មធ្យម', }, { id: 13, type: 'MOB', description: 'ធ្នើមុខមួយ', year: 2013, user: 'ក្នុងស្រុក', quantity: 2, price: '2,377,400', status: 'មធ្យម', }, { id: 14, type: 'MOB', description: 'ក្ដារខៀនព័ត៌មាន', year: 2016, user: 'SOF', quantity: 2, price: '160,000', status: 'មធ្យម', }, { id: 15, type: 'MOB', description: 'កៅអីជ័រធុនតូច', year: 2017, user: 'W.V.S', quantity: 31, price: '192,000', status: 'ខូច', }, { id: 16, type: 'MOB', description: 'តុអាន(ដែក)', year: 2017, user: 'មន្ទីរអប់រំ', quantity: 12, price: '576,000', status: 'ខូច', }, { id: 17, type: 'MBU', description: 'ម៉ាស៊ីនព្រីន Epson L360', year: 2018, user: 'សប្បុសជន', quantity: 1, price: '1,200,000', status: 'ខូច', }, { id: 18, type: 'MBU', description: 'កង្ហារភ្ជាប់ពិដាន', year: 2018, user: 'មន្ទីរអប់រំ', quantity: 12, price: '960,000', status: 'អន់', }, { id: 19, type: 'MOB', description: 'តុសម្រាប់គ្រូ', year: 2018, user: 'មន្ទីរអប់រំ', quantity: 6, price: '1,800,000', status: 'មធ្យម', }, { id: 20, type: 'MOB', description: 'តុសិស្ស២បង្កុយ(ដែក)', year: 2018, user: 'ក្រសួងអប់រំ', quantity: 145, price: '60,900,000', status: 'មធ្យម', }, { id: 21, type: 'MOB', description: 'ទោងរំអិល', year: 2018, user: 'មន្ទីរអប់រំ', quantity: 3, price: '1,080,000', status: 'មធ្យម', }, { id: 22, type: 'MOB', description: 'ក្ដារខៀនហ្វឺត', year: 2018, user: 'មន្ទីរអប់រំ', quantity: 18, price: '4,500,000', status: 'មធ្យម', }, { id: 23, type: 'MIN', description: 'កុំព្យូទ័រយួរដៃ Asus', year: 2019, user: 'ក្រសួងអប់រំ', quantity: 1, price: '2,713,500', status: 'ខូច', }, { id: 24, type: 'MOB', description: 'ក្ដាររំអិល', year: 2019, user: 'W.V.S', quantity: 4, price: '1,600,000', status: 'មធ្យម', }, { id: 25, type: 'MOB', description: 'ជណ្ដើរស្វា', year: 2019, user: 'W.V.S', quantity: 3, price: '1,584,000', status: 'មធ្យម', }, { id: 26, type: 'MOB', description: 'ម៉ាស៊ីនព្រីនHP', year: 2019, user: 'ក្រសួងអប់រំ', quantity: 1, price: '1,336,500', status: 'ខូច', }, { id: 27, type: 'MOB', description: 'តុតឿ', year: 2020, user: 'W.V.S', quantity: 6, price: '100,000', status: 'ល្អ', }, { id: 28, type: 'MOB', description: 'ដែកតោង', year: 2020, user: 'W.V.S', quantity: 3, price: '200,000', status: 'មធ្យម', }, { id: 29, type: 'MOB', description: 'ទូដាក់កញ្ចក់ដាក់ឯកសារ', year: 2020, user: 'W.V.S', quantity: 1, price: '750,000', status: 'ល្អ', }, { id: 30, type: 'MOB', description: 'ធ្នើដាក់សៀវភៅតាមថ្នាក់', year: 2020, user: 'W.V.S', quantity: 1, price: '60,000', status: 'ល្អ', }, { id: 31, type: 'MOB', description: 'ធ្នើដាក់សៀវភៅតូច', year: 2020, user: 'W.V.S', quantity: 5, price: '40,000', status: 'ល្អ', }, { id: 32, type: 'MOB', description: 'ធ្នើមុខពីរ', year: 2020, user: 'W.V.S', quantity: 3, price: '70,000', status: 'ល្អ', }, { id: 33, type: 'MOB', description: 'ធ្នើមុខមួយ', year: 2020, user: 'W.V.S', quantity: 4, price: '50,000', status: 'ល្អ', }, { id: 34, type: 'MIN', description: 'កុំព្យូទ័រយួរដៃ Acer', year: 2021, user: 'SOF', quantity: 1, price: '2,800,000', status: 'មធ្យម', }, { id: 35, type: 'MOB', description: 'កៅអីគ្រូ', year: 2021, user: 'មន្ទីរអប់រំ', quantity: 6, price: '720,000', status: 'មធ្យម', }, { id: 36, type: 'MOB', description: 'តុគ្រូ(ដែក)', year: 2021, user: 'មន្ទីរអប់រំ', quantity: 6, price: '100,000', status: 'ល្អ', }, { id: 37, type: 'MOB', description: 'តុវែង', year: 2021, user: 'មន្ទីរអប់រំ', quantity: 3, price: '200,000', status: 'មធ្យម', }, { id: 38, type: 'MBU', description: 'ម៉ាស៊ីនព្រីន Epson L3210', year: 2022, user: 'SOF', quantity: 1, price: '800,000', status: 'ខូច', }, { id: 39, type: 'MBU', description: 'កង្ហារភ្ជាប់ជញ្ជាំង', year: 2023, user: 'SOF', quantity: 4, price: '250,000', status: 'មធ្យម', }, { id: 40, type: 'MBU', description: 'កុំព្យូទ័រលើតុ Desktop', year: 2023, user: 'សប្បុសជន', quantity: 1, price: '1,800,000', status: 'មធ្យម', }, { id: 41, type: 'MBU', description: 'ម៉ាស៊ីនព្រីន Canon', year: 2023, user: 'សប្បុសជន', quantity: 1, price: '1,100,000', status: 'មធ្យម', }, { id: 42, type: 'MBU', description: 'ម៉ូទ័របូមទឹក', year: 2023, user: 'SOF', quantity: 1, price: '400,000', status: 'មធ្យម', }, { id: 43, type: 'MBU', description: 'Speaker', year: 2024, user: 'សប្បុរសជន', quantity: 1, price: '800,000', status: 'មធ្យម', }, { id: 44, type: 'MBU', description: 'Micro sound (តូច)', year: 2024, user: 'SOF', quantity: 1, price: '60,000', status: 'មធ្យម', }, { id: 45, type: 'MBU', description: 'កង្ហារភ្ជាប់ជញ្ជាំង(ធំ)', year: 2024, user: 'SOF', quantity: 1, price: '240,000', status: 'ខូច', }, { id: 46, type: 'MIN', description: 'ម៉ាស៊ីនព្រីន Color', year: 2025, user: 'សប្បុរសជន', quantity: 1, price: '1,000,000', status: 'ល្អ', }, { id: 47, type: 'MIN', description: 'ម៉ាស៊ីនព្រីន Black white', year: 2025, user: 'សប្បុរសជន', quantity: 1, price: '1,500,000', status: 'មធ្យម', }, { id: 48, type: 'MBU', description: 'ម៉ូទ័រកាត់ផ្កា', year: 2025, user: 'SOF', quantity: 1, price: '500,000', status: 'មធ្យម', }, ] // Switch between systems function switchSystem(system) { currentSystem = system if (system === 'warehouse') { document .getElementById('warehouseSystem') .classList.remove('hidden') document .getElementById('simpleSystem') .classList.add('hidden') document.getElementById('btn-warehouse').className = 'px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 font-semibold' document.getElementById('btn-simple').className = 'px-6 py-3 bg-gray-400 text-white rounded-lg hover:bg-gray-500 font-semibold' } else { document .getElementById('warehouseSystem') .classList.add('hidden') document .getElementById('simpleSystem') .classList.remove('hidden') document.getElementById('btn-warehouse').className = 'px-6 py-3 bg-gray-400 text-white rounded-lg hover:bg-gray-500 font-semibold' document.getElementById('btn-simple').className = 'px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 font-semibold' } } // Initialize function init() { initWarehouseSystem() initSimpleSystem() } // ========== WAREHOUSE SYSTEM ========== function initWarehouseSystem() { const saved = localStorage.getItem('warehousesData') warehouses = saved ? JSON.parse(saved) : defaultWarehouses currentWarehouseId = currentWarehouseId || Object.keys(warehouses)[0] updateWarehouseSelect() renderWarehouseInventory() updateCurrentWarehouseInfo() setupWarehouseCalculators() } function setupWarehouseCalculators() { ;['Opening', 'In', 'Out'].forEach((type) => { const qtyEl = document.getElementById( 'whInput' + type + 'Qty', ) const priceEl = document.getElementById( 'whInput' + type + 'Price', ) if (qtyEl && priceEl) { qtyEl.addEventListener('input', () => calculateWarehouseTotal(type), ) priceEl.addEventListener('input', () => calculateWarehouseTotal(type), ) } }) } function calculateWarehouseTotal(type) { const qty = parseFloat( document.getElementById('whInput' + type + 'Qty').value, ) || 0 const price = parseFloat( document .getElementById('whInput' + type + 'Price') .value.replace(/,/g, ''), ) || 0 const total = qty * price document.getElementById('whInput' + type + 'Total').value = total.toLocaleString() } function updateCurrentWarehouseInfo() { const wh = warehouses[currentWarehouseId] if (wh) { document.getElementById( 'currentWarehouseInfo', ).innerHTML = ` <div class="flex justify-between items-center"> <div> <h3 class="text-xl font-bold text-indigo-900">${wh.name}</h3> <p class="text-gray-600">លេខកូដសម្គាល់: <span class="font-semibold">${wh.code}</span></p> </div> <div class="text-right"> <p class="text-sm text-gray-600">ចំនួនសម្ភារសរុប: <span class="font-bold text-indigo-900">${wh.items.length}</span></p> </div> </div> ` } } function updateWarehouseSelect() { const select = document.getElementById('warehouseSelect') select.innerHTML = '' Object.values(warehouses).forEach((wh) => { const option = document.createElement('option') option.value = wh.id option.textContent = `${wh.name} (${wh.code})` if (wh.id === currentWarehouseId) option.selected = true select.appendChild(option) }) } function switchWarehouse() { currentWarehouseId = document.getElementById('warehouseSelect').value renderWarehouseInventory() updateCurrentWarehouseInfo() } function showAddWarehouse() { editingWarehouseId = null document.getElementById('warehouseFormTitle').textContent = 'បន្ថែមឃ្លាំង/កម្មវិធីថ្មី' document.getElementById('warehouseName').value = '' document.getElementById('warehouseCode').value = '' document .getElementById('warehouseFormContainer') .classList.remove('hidden') } function editWarehouse() { const wh = warehouses[currentWarehouseId] if (wh) { editingWarehouseId = currentWarehouseId document.getElementById('warehouseFormTitle').textContent = 'កែប្រែឃ្លាំង/កម្មវិធី' document.getElementById('warehouseName').value = wh.name document.getElementById('warehouseCode').value = wh.code document .getElementById('warehouseFormContainer') .classList.remove('hidden') } } function cancelWarehouse() { document .getElementById('warehouseFormContainer') .classList.add('hidden') editingWarehouseId = null } function submitWarehouse() { const name = document .getElementById('warehouseName') .value.trim() const code = document .getElementById('warehouseCode') .value.trim() if (!name || !code) { alert('សូមបញ្ចូលព័ត៌មានពេញលេញ!') return } if (editingWarehouseId) { warehouses[editingWarehouseId].name = name warehouses[editingWarehouseId].code = code } else { const newId = 'wh' + Date.now() warehouses[newId] = { id: newId, name: name, code: code, items: [], } currentWarehouseId = newId } updateWarehouseSelect() updateCurrentWarehouseInfo() cancelWarehouse() } function deleteWarehouse() { if (Object.keys(warehouses).length <= 1) { alert('មិនអាចលុបបានទេ! ត្រូវមានឃ្លាំងយ៉ាងតិច១។') return } const wh = warehouses[currentWarehouseId] if ( confirm('តើអ្នកប្រាកដទេថាចង់លុបឃ្លាំង "' + wh.name + '"?') ) { delete warehouses[currentWarehouseId] currentWarehouseId = Object.keys(warehouses)[0] updateWarehouseSelect() renderWarehouseInventory() updateCurrentWarehouseInfo() } } function getCurrentWarehouseData() { return warehouses[currentWarehouseId]?.items || [] } function setCurrentWarehouseData(data) { if (warehouses[currentWarehouseId]) { warehouses[currentWarehouseId].items = data } } function saveWarehouseData() { localStorage.setItem( 'warehousesData', JSON.stringify(warehouses), ) alert('បានរក្សាទុកទិន្នន័យ!') } function renderWarehouseInventory() { const searchTerm = document .getElementById('whSearchInput') .value.toLowerCase() const data = getCurrentWarehouseData() let filtered = data.filter((item) => item.description.toLowerCase().includes(searchTerm), ) let html = '' let totals = { openingQty: 0, openingTotal: 0, inQty: 0, inTotal: 0, outQty: 0, outTotal: 0, } filtered.forEach((item, index) => { totals.openingQty += item.opening.qty totals.openingTotal += item.opening.qty * parseFloat(item.opening.price.replace(/,/g, '')) totals.inQty += item.in.qty totals.inTotal += item.in.qty * parseFloat(item.in.price.replace(/,/g, '')) totals.outQty += item.out.qty totals.outTotal += item.out.qty * parseFloat(item.out.price.replace(/,/g, '')) html += '<tr class="hover:bg-gray-50 border-b">' html += '<td class="px-3 py-3 text-center border-r">' + (index + 1) + '</td>' html += '<td class="px-3 py-3 border-r">' + item.description + '</td>' html += '<td class="px-3 py-3 text-center border-r">' + item.unit + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-blue-50">' + item.opening.qty + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-blue-50">' + item.opening.price + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-blue-50 font-semibold">' + ( item.opening.qty * parseFloat(item.opening.price.replace(/,/g, '')) ).toLocaleString() + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-green-50">' + item.in.qty + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-green-50">' + item.in.price + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-green-50 font-semibold">' + ( item.in.qty * parseFloat(item.in.price.replace(/,/g, '')) ).toLocaleString() + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-red-50">' + item.out.qty + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-red-50">' + item.out.price + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-red-50 font-semibold">' + ( item.out.qty * parseFloat(item.out.price.replace(/,/g, '')) ).toLocaleString() + '</td>' html += '<td class="px-3 py-3 text-center no-print">' html += '<button onclick="editWarehouseItem(' + item.id + ')" class="text-blue-600 hover:text-blue-800 mr-2">✏️</button>' html += '<button onclick="deleteWarehouseItem(' + item.id + ')" class="text-red-600 hover:text-red-800">🗑️</button>' html += '</td></tr>' }) html += '<tr class="bg-indigo-100 font-bold text-base">' html += '<td colspan="3" class="px-3 py-3 text-right border-r">សរុបទាំងអស់:</td>' html += '<td class="px-3 py-3 text-right border-r bg-blue-100">' + totals.openingQty + '</td>' html += '<td class="px-3 py-3 border-r bg-blue-100"></td>' html += '<td class="px-3 py-3 text-right border-r bg-blue-100 text-indigo-900">' + totals.openingTotal.toLocaleString() + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-green-100">' + totals.inQty + '</td>' html += '<td class="px-3 py-3 border-r bg-green-100"></td>' html += '<td class="px-3 py-3 text-right border-r bg-green-100 text-green-900">' + totals.inTotal.toLocaleString() + '</td>' html += '<td class="px-3 py-3 text-right border-r bg-red-100">' + totals.outQty + '</td>' html += '<td class="px-3 py-3 border-r bg-red-100"></td>' html += '<td class="px-3 py-3 text-right border-r bg-red-100 text-red-900">' + totals.outTotal.toLocaleString() + '</td>' html += '<td class="no-print"></td></tr>' document.getElementById('warehouseInventoryBody').innerHTML = html } function filterWarehouseData() { renderWarehouseInventory() } function showWarehouseAddForm() { editingWarehouseItemId = null document.getElementById('warehouseItemFormTitle').textContent = 'បន្ថែមសម្ភារថ្មី' clearWarehouseItemForm() document .getElementById('warehouseAddFormContainer') .classList.remove('hidden') } function cancelWarehouseItemForm() { document .getElementById('warehouseAddFormContainer') .classList.add('hidden') clearWarehouseItemForm() editingWarehouseItemId = null } function clearWarehouseItemForm() { document.getElementById('whInputDescription').value = '' document.getElementById('whInputUnit').value = '' ;['Opening', 'In', 'Out'].forEach((type) => { document.getElementById('whInput' + type + 'Qty').value = 0 document.getElementById( 'whInput' + type + 'Price', ).value = 0 document.getElementById( 'whInput' + type + 'Total', ).value = 0 }) } function submitWarehouseItemForm() { const formData = { description: document.getElementById('whInputDescription').value, unit: document.getElementById('whInputUnit').value, opening: { qty: parseInt( document.getElementById('whInputOpeningQty') .value, ) || 0, price: document.getElementById('whInputOpeningPrice') .value || '0', }, in: { qty: parseInt( document.getElementById('whInputInQty').value, ) || 0, price: document.getElementById('whInputInPrice').value || '0', }, out: { qty: parseInt( document.getElementById('whInputOutQty').value, ) || 0, price: document.getElementById('whInputOutPrice').value || '0', }, } if (!formData.description) { alert('សូមបញ្ចូលសម្ភារៈបរិក្ខារ!') return } let data = getCurrentWarehouseData() if (editingWarehouseItemId) { data = data.map((item) => item.id === editingWarehouseItemId ? { ...formData, id: editingWarehouseItemId } : item, ) } else { const newId = Date.now() data.push({ ...formData, id: newId }) } setCurrentWarehouseData(data) renderWarehouseInventory() updateCurrentWarehouseInfo() cancelWarehouseItemForm() } function editWarehouseItem(id) { const data = getCurrentWarehouseData() const item = data.find((i) => i.id === id) if (item) { editingWarehouseItemId = id document.getElementById( 'warehouseItemFormTitle', ).textContent = 'កែប្រែសម្ភារ' document.getElementById('whInputDescription').value = item.description document.getElementById('whInputUnit').value = item.unit document.getElementById('whInputOpeningQty').value = item.opening.qty document.getElementById('whInputOpeningPrice').value = item.opening.price document.getElementById('whInputInQty').value = item.in.qty document.getElementById('whInputInPrice').value = item.in.price document.getElementById('whInputOutQty').value = item.out.qty document.getElementById('whInputOutPrice').value = item.out.price calculateWarehouseTotal('Opening') calculateWarehouseTotal('In') calculateWarehouseTotal('Out') document .getElementById('warehouseAddFormContainer') .classList.remove('hidden') } } function deleteWarehouseItem(id) { if (confirm('តើអ្នកប្រាកដទេថាចង់លុប?')) { let data = getCurrentWarehouseData() data = data.filter((item) => item.id !== id) setCurrentWarehouseData(data) renderWarehouseInventory() updateCurrentWarehouseInfo() } } function downloadWarehouseJSON() { const dataStr = JSON.stringify(warehouses, null, 2) const dataBlob = new Blob([dataStr], { type: 'application/json', }) const url = URL.createObjectURL(dataBlob) const link = document.createElement('a') link.href = url link.download = 'warehouses_all_data.json' link.click() } function downloadWarehouseCSV() { const wh = warehouses[currentWarehouseId] const data = getCurrentWarehouseData() const headers = [ 'ល.រ', 'សម្ភារៈបរិក្ខារ', 'ឯកតាគិត', 'ដើមឆ្នាំ-ចំនួន', 'ដើមឆ្នាំ-តម្លៃរាយ', 'ដើមឆ្នាំ-តម្លៃសរុប', 'ចូល-ចំនួន', 'ចូល-តម្លៃរាយ', 'ចូល-តម្លៃសរុប', 'ចេញ-ចំនួន', 'ចេញ-តម្លៃរាយ', 'ចេញ-តម្លៃសរុប', 'កម្មវិធី', 'លេខកូដ', ] let csv = '\uFEFF' + headers.join(',') + '\n' data.forEach((item, idx) => { const openingTotal = item.opening.qty * parseFloat(item.opening.price.replace(/,/g, '')) const inTotal = item.in.qty * parseFloat(item.in.price.replace(/,/g, '')) const outTotal = item.out.qty * parseFloat(item.out.price.replace(/,/g, '')) const row = [ idx + 1, '"' + item.description + '"', '"' + item.unit + '"', item.opening.qty, item.opening.price, openingTotal, item.in.qty, item.in.price, inTotal, item.out.qty, item.out.price, outTotal, '"' + wh.name + '"', wh.code, ] csv += row.join(',') + '\n' }) const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;', }) const link = document.createElement('a') link.href = URL.createObjectURL(blob) link.download = wh.code + '_' + wh.name.substring(0, 20) + '.csv' link.click() } function importWarehouseJSON(event) { const file = event.target.files[0] if (file) { const reader = new FileReader() reader.onload = function (e) { try { warehouses = JSON.parse(e.target.result) currentWarehouseId = Object.keys(warehouses)[0] updateWarehouseSelect() renderWarehouseInventory() updateCurrentWarehouseInfo() alert('បាននាំចូលទិន្នន័យដោយជោគជ័យ!') } catch (error) { alert('មានបញ្ហាក្នុងការនាំចូលទិន្នន័យ!') } } reader.readAsText(file) } } // ========== SIMPLE SYSTEM ========== function initSimpleSystem() { const saved = localStorage.getItem('simpleEquipmentData') simpleEquipmentData = saved ? JSON.parse(saved) : defaultSimpleData updateSimpleYearFilter() renderSimpleInventory() } function saveSimpleData() { localStorage.setItem( 'simpleEquipmentData', JSON.stringify(simpleEquipmentData), ) alert('បានរក្សាទុកទិន្នន័យ!') } function updateSimpleYearFilter() { const years = [ ...new Set(simpleEquipmentData.map((item) => item.year)), ].sort((a, b) => b - a) const select = document.getElementById('simpleYearFilter') select.innerHTML = '<option value="all">ឆ្នាំទាំងអស់</option>' years.forEach((year) => { select.innerHTML += '<option value="' + year + '">' + year + '</option>' }) } function getStatusClass(status) { if (status === 'ល្អ') return 'bg-green-100 text-green-800' if (status === 'មធ្យម') return 'bg-yellow-100 text-yellow-800' if (status === 'អន់') return 'bg-orange-100 text-orange-800' return 'bg-red-100 text-red-800' } function renderSimpleInventory() { const searchTerm = document .getElementById('simpleSearchInput') .value.toLowerCase() const yearFilter = document.getElementById('simpleYearFilter').value let filtered = simpleEquipmentData.filter((item) => { const matchesSearch = item.description.toLowerCase().includes(searchTerm) || item.user.toLowerCase().includes(searchTerm) const matchesYear = yearFilter === 'all' || item.year.toString() === yearFilter return matchesSearch && matchesYear }) let html = '' let totalQty = 0 let totalPrice = 0 filtered.forEach((item, index) => { totalQty += item.quantity totalPrice += parseInt(item.price.replace(/,/g, '')) html += '<tr class="hover:bg-gray-50">' html += '<td class="px-4 py-3">' + (index + 1) + '</td>' html += '<td class="px-4 py-3"><span class="px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm font-semibold">' + item.type + '</span></td>' html += '<td class="px-4 py-3">' + item.description + '</td>' html += '<td class="px-4 py-3">' + item.year + '</td>' html += '<td class="px-4 py-3">' + item.user + '</td>' html += '<td class="px-4 py-3 text-right font-semibold">' + item.quantity + '</td>' html += '<td class="px-4 py-3 text-right">' + item.price + '</td>' html += '<td class="px-4 py-3 text-center"><span class="px-3 py-1 rounded-full text-sm font-semibold ' + getStatusClass(item.status) + '">' + item.status + '</span></td>' html += '<td class="px-4 py-3 text-center no-print">' html += '<button onclick="editSimpleItem(' + item.id + ')" class="text-blue-600 hover:text-blue-800 mr-2">✏️</button>' html += '<button onclick="deleteSimpleItem(' + item.id + ')" class="text-red-600 hover:text-red-800">🗑️</button>' html += '</td></tr>' }) html += '<tr class="bg-indigo-50 font-bold">' html += '<td colspan="5" class="px-4 py-3 text-right">សរុប:</td>' html += '<td class="px-4 py-3 text-right">' + totalQty + '</td>' html += '<td class="px-4 py-3 text-right">' + totalPrice.toLocaleString() + '</td>' html += '<td colspan="2"></td></tr>' document.getElementById('simpleInventoryBody').innerHTML = html } function filterSimpleData() { renderSimpleInventory() } function showSimpleAddForm() { editingSimpleId = null document.getElementById('simpleFormTitle').textContent = 'បន្ថែមថ្មី' clearSimpleForm() document .getElementById('simpleAddFormContainer') .classList.remove('hidden') } function cancelSimpleForm() { document .getElementById('simpleAddFormContainer') .classList.add('hidden') clearSimpleForm() editingSimpleId = null } function clearSimpleForm() { document.getElementById('simpleInputType').value = 'MOB' document.getElementById('simpleInputDescription').value = '' document.getElementById('simpleInputYear').value = new Date().getFullYear() document.getElementById('simpleInputUser').value = '' document.getElementById('simpleInputQuantity').value = 1 document.getElementById('simpleInputPrice').value = '' document.getElementById('simpleInputStatus').value = 'ល្អ' } function submitSimpleForm() { const formData = { type: document.getElementById('simpleInputType').value, description: document.getElementById( 'simpleInputDescription', ).value, year: parseInt( document.getElementById('simpleInputYear').value, ), user: document.getElementById('simpleInputUser').value, quantity: parseInt( document.getElementById('simpleInputQuantity').value, ), price: document.getElementById('simpleInputPrice').value, status: document.getElementById('simpleInputStatus').value, } if (editingSimpleId) { simpleEquipmentData = simpleEquipmentData.map((item) => item.id === editingSimpleId ? { ...formData, id: editingSimpleId } : item, ) } else { const newId = Math.max(...simpleEquipmentData.map((i) => i.id), 0) + 1 simpleEquipmentData.push({ ...formData, id: newId }) } updateSimpleYearFilter() renderSimpleInventory() cancelSimpleForm() } function editSimpleItem(id) { const item = simpleEquipmentData.find((i) => i.id === id) if (item) { editingSimpleId = id document.getElementById('simpleFormTitle').textContent = 'កែប្រែ' document.getElementById('simpleInputType').value = item.type document.getElementById('simpleInputDescription').value = item.description document.getElementById('simpleInputYear').value = item.year document.getElementById('simpleInputUser').value = item.user document.getElementById('simpleInputQuantity').value = item.quantity document.getElementById('simpleInputPrice').value = item.price document.getElementById('simpleInputStatus').value = item.status document .getElementById('simpleAddFormContainer') .classList.remove('hidden') } } function deleteSimpleItem(id) { if (confirm('តើអ្នកប្រាកដទេថាចង់លុប?')) { simpleEquipmentData = simpleEquipmentData.filter( (item) => item.id !== id, ) updateSimpleYearFilter() renderSimpleInventory() } } function downloadSimpleJSON() { const dataStr = JSON.stringify(simpleEquipmentData, null, 2) const dataBlob = new Blob([dataStr], { type: 'application/json', }) const url = URL.createObjectURL(dataBlob) const link = document.createElement('a') link.href = url link.download = 'simple_equipment_data.json' link.click() } function downloadSimpleCSV() { const headers = [ 'ល.រ', 'តាមប្រភេទ', 'បរិយាយ', 'ប្រើប្រាស់ពីឆ្នាំ', 'ឈ្មោះអ្នកប្រើ', 'បរិមាណ', 'តម្លៃ(រៀល)', 'ស្ថានភាព', ] let csv = '\uFEFF' + headers.join(',') + '\n' simpleEquipmentData.forEach((item, idx) => { const row = [ idx + 1, item.type, '"' + item.description + '"', item.year, '"' + item.user + '"', item.quantity, item.price, item.status, ] csv += row.join(',') + '\n' }) const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;', }) const link = document.createElement('a') link.href = URL.createObjectURL(blob) link.download = 'simple_equipment_data.csv' link.click() } function importSimpleJSON(event) { const file = event.target.files[0] if (file) { const reader = new FileReader() reader.onload = function (e) { try { simpleEquipmentData = JSON.parse(e.target.result) updateSimpleYearFilter() renderSimpleInventory() alert('បាននាំចូលទិន្នន័យដោយជោគជ័យ!') } catch (error) { alert('មានបញ្ហាក្នុងការនាំចូលទិន្នន័យ!') } } reader.readAsText(file) } } function switchSimpleTab(tab) { document .getElementById('simpleInventoryTab') .classList.add('hidden') document .getElementById('simpleYearlyTab') .classList.add('hidden') document .getElementById('simpleTrackingTab') .classList.add('hidden') document.getElementById('simple-tab-inventory').className = 'px-6 py-4 font-semibold text-gray-600 hover:bg-gray-50' document.getElementById('simple-tab-yearly').className = 'px-6 py-4 font-semibold text-gray-600 hover:bg-gray-50' document.getElementById('simple-tab-tracking').className = 'px-6 py-4 font-semibold text-gray-600 hover:bg-gray-50' document .getElementById( 'simple' + tab.charAt(0).toUpperCase() + tab.slice(1) + 'Tab', ) .classList.remove('hidden') document.getElementById('simple-tab-' + tab).className = 'px-6 py-4 font-semibold bg-indigo-600 text-white' if (tab === 'yearly') renderSimpleYearly() if (tab === 'tracking') renderSimpleTracking() } function renderSimpleYearly() { const yearlyData = {} simpleEquipmentData.forEach((item) => { if (!yearlyData[item.year]) yearlyData[item.year] = [] yearlyData[item.year].push(item) }) const years = Object.keys(yearlyData).sort((a, b) => b - a) let html = '<h2 class="text-2xl font-bold text-indigo-900 mb-4">សម្ភារកើនក្នុងឆ្នាំ</h2><div class="space-y-6">' years.forEach((year) => { const items = yearlyData[year] let totalQty = 0 let totalPrice = 0 html += '<div class="bg-gray-50 rounded-lg p-4">' html += '<h3 class="text-xl font-bold text-indigo-800 mb-3">ឆ្នាំ ' + year + '</h3>' html += '<div class="overflow-x-auto rounded-lg border border-gray-200">' html += '<table class="w-full bg-white">' html += '<thead class="bg-indigo-500 text-white"><tr>' html += '<th class="px-4 py-2 text-left">ល.រ</th>' html += '<th class="px-4 py-2 text-left">បរិយាយ</th>' html += '<th class="px-4 py-2 text-left">ប្រភេទ</th>' html += '<th class="px-4 py-2 text-right">បរិមាណ</th>' html += '<th class="px-4 py-2 text-right">តម្លៃ(រៀល)</th>' html += '<th class="px-4 py-2 text-center">ស្ថានភាព</th>' html += '</tr></thead><tbody class="divide-y divide-gray-200">' items.forEach((item, idx) => { totalQty += item.quantity totalPrice += parseInt(item.price.replace(/,/g, '')) html += '<tr class="hover:bg-gray-50">' html += '<td class="px-4 py-2">' + (idx + 1) + '</td>' html += '<td class="px-4 py-2">' + item.description + '</td>' html += '<td class="px-4 py-2"><span class="px-2 py-1 bg-purple-100 text-purple-800 rounded text-sm">' + item.type + '</span></td>' html += '<td class="px-4 py-2 text-right font-semibold">' + item.quantity + '</td>' html += '<td class="px-4 py-2 text-right">' + item.price + '</td>' html += '<td class="px-4 py-2 text-center"><span class="px-2 py-1 rounded-full text-sm ' + getStatusClass(item.status) + '">' + item.status + '</span></td>' html += '</tr>' }) html += '<tr class="bg-indigo-50 font-bold">' html += '<td colspan="3" class="px-4 py-2 text-right">សរុប:</td>' html += '<td class="px-4 py-2 text-right">' + totalQty + '</td>' html += '<td class="px-4 py-2 text-right">' + totalPrice.toLocaleString() + '</td>' html += '<td></td></tr>' html += '</tbody></table></div></div>' }) html += '</div>' document.getElementById('simpleYearlyTab').innerHTML = html } function renderSimpleTracking() { const summary = {} simpleEquipmentData.forEach((item) => { if (!summary[item.description]) { summary[item.description] = { good: 0, medium: 0, weak: 0, broken: 0, total: 0, } } summary[item.description].total += item.quantity if (item.status === 'ល្អ') summary[item.description].good += item.quantity else if (item.status === 'មធ្យម') summary[item.description].medium += item.quantity else if (item.status === 'អន់') summary[item.description].weak += item.quantity else if (item.status === 'ខូច') summary[item.description].broken += item.quantity }) let html = '<h2 class="text-2xl font-bold text-indigo-900 mb-4">តារាងតាមដានស្ថានភាពសម្ភារៈ</h2>' html += '<div class="overflow-x-auto rounded-lg border border-gray-200">' html += '<table class="w-full bg-white">' html += '<thead class="bg-indigo-600 text-white">' html += '<tr>' html += '<th class="px-4 py-3 text-left" rowspan="2">ល.រ</th>' html += '<th class="px-4 py-3 text-left" rowspan="2">ឈ្មោះសម្ភារបរិក្ខារ</th>' html += '<th class="px-4 py-3 text-center" colspan="5">ស្ថានភាពសម្ភារៈ</th>' html += '<th class="px-4 py-3 text-center" colspan="2">ការប្រើប្រាស់</th>' html += '<th class="px-4 py-3 text-center" rowspan="2">ស្ថានភាព</th>' html += '</tr><tr>' html += '<th class="px-4 py-2 text-center bg-green-600">ល្អ</th>' html += '<th class="px-4 py-2 text-center bg-yellow-600">មធ្យម</th>' html += '<th class="px-4 py-2 text-center bg-orange-600">អន់</th>' html += '<th class="px-4 py-2 text-center bg-red-600">ខូច</th>' html += '<th class="px-4 py-2 text-center bg-indigo-700">សរុប</th>' html += '<th class="px-4 py-2 text-center bg-blue-600">លើស</th>' html += '<th class="px-4 py-2 text-center bg-purple-600">ខ្វះ</th>' html += '</tr></thead><tbody class="divide-y divide-gray-200">' let idx = 0 let totalGood = 0, totalMedium = 0, totalWeak = 0, totalBroken = 0, grandTotal = 0 for (const [desc, counts] of Object.entries(summary)) { idx++ totalGood += counts.good totalMedium += counts.medium totalWeak += counts.weak totalBroken += counts.broken grandTotal += counts.total const statusText = counts.broken > 0 ? 'ខូច' : counts.weak > 0 ? 'អន់' : counts.medium > 0 ? 'មធ្យម' : 'ល្អ' html += '<tr class="hover:bg-gray-50">' html += '<td class="px-4 py-3">' + idx + '</td>' html += '<td class="px-4 py-3 font-semibold">' + desc + '</td>' html += '<td class="px-4 py-3 text-center bg-green-50">' + counts.good + '</td>' html += '<td class="px-4 py-3 text-center bg-yellow-50">' + counts.medium + '</td>' html += '<td class="px-4 py-3 text-center bg-orange-50">' + counts.weak + '</td>' html += '<td class="px-4 py-3 text-center bg-red-50">' + counts.broken + '</td>' html += '<td class="px-4 py-3 text-center bg-indigo-50 font-bold">' + counts.total + '</td>' html += '<td class="px-4 py-3 text-center">-</td>' html += '<td class="px-4 py-3 text-center">-</td>' html += '<td class="px-4 py-3 text-center"><span class="px-2 py-1 rounded-full text-sm ' + getStatusClass(statusText) + '">' + statusText + '</span></td>' html += '</tr>' } html += '<tr class="bg-indigo-50 font-bold">' html += '<td colspan="2" class="px-4 py-3 text-right">សរុបទាំងអស់:</td>' html += '<td class="px-4 py-3 text-center bg-green-100">' + totalGood + '</td>' html += '<td class="px-4 py-3 text-center bg-yellow-100">' + totalMedium + '</td>' html += '<td class="px-4 py-3 text-center bg-orange-100">' + totalWeak + '</td>' html += '<td class="px-4 py-3 text-center bg-red-100">' + totalBroken + '</td>' html += '<td class="px-4 py-3 text-center bg-indigo-100">' + grandTotal + '</td>' html += '<td colspan="3"></td></tr>' html += '</tbody></table></div>' document.getElementById('simpleTrackingTab').innerHTML = html } // Initialize on page load init() </script> <script defer="" src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"version":"2024.11.0","token":"e3c1c9af36de41759418005494a48906","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}' crossorigin="anonymous" ></script> </body> </html>