@tonzxz/government-forms 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/FORM_CATALOG.md +44 -0
  2. package/README.md +165 -0
  3. package/dist/definitions.d.ts +1147 -0
  4. package/dist/definitions.js +60 -0
  5. package/dist/forms/iar.d.ts +172 -0
  6. package/dist/forms/iar.js +6 -0
  7. package/dist/forms/ics.d.ts +48 -0
  8. package/dist/forms/ics.js +6 -0
  9. package/dist/forms/iirup.d.ts +54 -0
  10. package/dist/forms/iirup.js +6 -0
  11. package/dist/forms/iirusp.d.ts +32 -0
  12. package/dist/forms/iirusp.js +6 -0
  13. package/dist/forms/itr.d.ts +42 -0
  14. package/dist/forms/itr.js +6 -0
  15. package/dist/forms/par.d.ts +84 -0
  16. package/dist/forms/par.js +6 -0
  17. package/dist/forms/ppelc.d.ts +34 -0
  18. package/dist/forms/ppelc.js +6 -0
  19. package/dist/forms/pr.d.ts +27 -0
  20. package/dist/forms/pr.js +6 -0
  21. package/dist/forms/property-card.d.ts +68 -0
  22. package/dist/forms/property-card.js +6 -0
  23. package/dist/forms/ptr.d.ts +54 -0
  24. package/dist/forms/ptr.js +6 -0
  25. package/dist/forms/regspi.d.ts +32 -0
  26. package/dist/forms/regspi.js +6 -0
  27. package/dist/forms/ris.d.ts +66 -0
  28. package/dist/forms/ris.js +6 -0
  29. package/dist/forms/rlsddp.d.ts +54 -0
  30. package/dist/forms/rlsddp.js +6 -0
  31. package/dist/forms/rlsddsp.d.ts +42 -0
  32. package/dist/forms/rlsddsp.js +6 -0
  33. package/dist/forms/rpci.d.ts +32 -0
  34. package/dist/forms/rpci.js +6 -0
  35. package/dist/forms/rpcppe.d.ts +32 -0
  36. package/dist/forms/rpcppe.js +6 -0
  37. package/dist/forms/rpcsp.d.ts +32 -0
  38. package/dist/forms/rpcsp.js +6 -0
  39. package/dist/forms/rrsp.d.ts +32 -0
  40. package/dist/forms/rrsp.js +6 -0
  41. package/dist/forms/rsmi.d.ts +32 -0
  42. package/dist/forms/rsmi.js +6 -0
  43. package/dist/forms/rsmp.d.ts +33 -0
  44. package/dist/forms/rsmp.js +6 -0
  45. package/dist/forms/rspi.d.ts +32 -0
  46. package/dist/forms/rspi.js +6 -0
  47. package/dist/forms/spc.d.ts +37 -0
  48. package/dist/forms/spc.js +6 -0
  49. package/dist/forms/splc.d.ts +41 -0
  50. package/dist/forms/splc.js +6 -0
  51. package/dist/forms/stock-card.d.ts +28 -0
  52. package/dist/forms/stock-card.js +6 -0
  53. package/dist/forms/wmr.d.ts +32 -0
  54. package/dist/forms/wmr.js +6 -0
  55. package/dist/gam/components/gam-report-workbench.d.ts +40 -0
  56. package/dist/gam/components/gam-report-workbench.js +2 -0
  57. package/dist/gam/components/grand-total-computation.d.ts +10 -0
  58. package/dist/gam/components/grand-total-computation.js +26 -0
  59. package/dist/gam/components/iar-preview.d.ts +30 -0
  60. package/dist/gam/components/iar-preview.js +150 -0
  61. package/dist/gam/components/ics-preview.d.ts +31 -0
  62. package/dist/gam/components/ics-preview.js +114 -0
  63. package/dist/gam/components/iirup-preview.d.ts +42 -0
  64. package/dist/gam/components/iirup-preview.js +237 -0
  65. package/dist/gam/components/itr-preview.d.ts +31 -0
  66. package/dist/gam/components/itr-preview.js +180 -0
  67. package/dist/gam/components/par-preview.d.ts +28 -0
  68. package/dist/gam/components/par-preview.js +95 -0
  69. package/dist/gam/components/ppelc-preview.d.ts +28 -0
  70. package/dist/gam/components/ppelc-preview.js +128 -0
  71. package/dist/gam/components/property-card-preview.d.ts +21 -0
  72. package/dist/gam/components/property-card-preview.js +117 -0
  73. package/dist/gam/components/ptr-preview.d.ts +36 -0
  74. package/dist/gam/components/ptr-preview.js +122 -0
  75. package/dist/gam/components/purchase-order-page-client.d.ts +66 -0
  76. package/dist/gam/components/purchase-order-page-client.js +179 -0
  77. package/dist/gam/components/reg-spi-preview.d.ts +28 -0
  78. package/dist/gam/components/reg-spi-preview.js +138 -0
  79. package/dist/gam/components/ris-form.d.ts +13 -0
  80. package/dist/gam/components/ris-form.js +20 -0
  81. package/dist/gam/components/ris-preview.d.ts +7 -0
  82. package/dist/gam/components/ris-preview.js +16 -0
  83. package/dist/gam/components/rlsddp-preview.d.ts +34 -0
  84. package/dist/gam/components/rlsddp-preview.js +251 -0
  85. package/dist/gam/components/rlsddsp-preview.d.ts +33 -0
  86. package/dist/gam/components/rlsddsp-preview.js +226 -0
  87. package/dist/gam/components/rpci-preview.d.ts +27 -0
  88. package/dist/gam/components/rpci-preview.js +123 -0
  89. package/dist/gam/components/rpcppe-preview.d.ts +28 -0
  90. package/dist/gam/components/rpcppe-preview.js +133 -0
  91. package/dist/gam/components/rpcsp-preview.d.ts +29 -0
  92. package/dist/gam/components/rpcsp-preview.js +81 -0
  93. package/dist/gam/components/rspi-preview.d.ts +23 -0
  94. package/dist/gam/components/rspi-preview.js +72 -0
  95. package/dist/gam/components/spc-preview.d.ts +23 -0
  96. package/dist/gam/components/spc-preview.js +149 -0
  97. package/dist/gam/components/splc-entry-form.d.ts +14 -0
  98. package/dist/gam/components/splc-entry-form.js +6 -0
  99. package/dist/gam/components/splc-preview.d.ts +27 -0
  100. package/dist/gam/components/splc-preview.js +192 -0
  101. package/dist/gam/components/stock-card-preview.d.ts +14 -0
  102. package/dist/gam/components/stock-card-preview.js +17 -0
  103. package/dist/gam/config/new-report-config.d.ts +1094 -0
  104. package/dist/gam/config/new-report-config.js +1478 -0
  105. package/dist/gam/purchase-order-flow.d.ts +146 -0
  106. package/dist/gam/purchase-order-flow.js +173 -0
  107. package/dist/gam/purchase-request/workflow.d.ts +19 -0
  108. package/dist/gam/purchase-request/workflow.js +45 -0
  109. package/dist/gam/types/ris-types.d.ts +37 -0
  110. package/dist/gam/types/ris-types.js +1 -0
  111. package/dist/gam/utils/export-ics-xlsx.d.ts +28 -0
  112. package/dist/gam/utils/export-ics-xlsx.js +273 -0
  113. package/dist/gam/utils/export-par-xlsx.d.ts +18 -0
  114. package/dist/gam/utils/export-par-xlsx.js +181 -0
  115. package/dist/gam/utils/export-preview-pdf.d.ts +13 -0
  116. package/dist/gam/utils/export-preview-pdf.js +270 -0
  117. package/dist/gam/utils/export-report-xlsx.d.ts +228 -0
  118. package/dist/gam/utils/export-report-xlsx.js +873 -0
  119. package/dist/gam/utils/line-totals.d.ts +6 -0
  120. package/dist/gam/utils/line-totals.js +18 -0
  121. package/dist/gam/utils/monetary-input.d.ts +6 -0
  122. package/dist/gam/utils/monetary-input.js +18 -0
  123. package/dist/gam/utils/print-element.d.ts +8 -0
  124. package/dist/gam/utils/print-element.js +157 -0
  125. package/dist/government-form.d.ts +16 -0
  126. package/dist/government-form.js +45 -0
  127. package/dist/index.d.ts +49 -0
  128. package/dist/index.js +50 -0
  129. package/dist/internal/components/configurable-form-layout.d.ts +20 -0
  130. package/dist/internal/components/configurable-form-layout.js +49 -0
  131. package/dist/internal/components/ui/badge.d.ts +7 -0
  132. package/dist/internal/components/ui/badge.js +34 -0
  133. package/dist/internal/components/ui/button.d.ts +10 -0
  134. package/dist/internal/components/ui/button.js +35 -0
  135. package/dist/internal/components/ui/calendar.d.ts +8 -0
  136. package/dist/internal/components/ui/calendar.js +77 -0
  137. package/dist/internal/components/ui/command.d.ts +19 -0
  138. package/dist/internal/components/ui/command.js +36 -0
  139. package/dist/internal/components/ui/date-input.d.ts +14 -0
  140. package/dist/internal/components/ui/date-input.js +33 -0
  141. package/dist/internal/components/ui/date-picker.d.ts +19 -0
  142. package/dist/internal/components/ui/date-picker.js +34 -0
  143. package/dist/internal/components/ui/dialog.d.ts +18 -0
  144. package/dist/internal/components/ui/dialog.js +38 -0
  145. package/dist/internal/components/ui/input-group.d.ts +18 -0
  146. package/dist/internal/components/ui/input-group.js +57 -0
  147. package/dist/internal/components/ui/input.d.ts +3 -0
  148. package/dist/internal/components/ui/input.js +12 -0
  149. package/dist/internal/components/ui/label.d.ts +3 -0
  150. package/dist/internal/components/ui/label.js +7 -0
  151. package/dist/internal/components/ui/popover.d.ts +9 -0
  152. package/dist/internal/components/ui/popover.js +23 -0
  153. package/dist/internal/components/ui/select.d.ts +17 -0
  154. package/dist/internal/components/ui/select.js +35 -0
  155. package/dist/internal/components/ui/switch.d.ts +5 -0
  156. package/dist/internal/components/ui/switch.js +8 -0
  157. package/dist/internal/components/ui/table.d.ts +10 -0
  158. package/dist/internal/components/ui/table.js +28 -0
  159. package/dist/internal/components/ui/tabs.d.ts +10 -0
  160. package/dist/internal/components/ui/tabs.js +29 -0
  161. package/dist/internal/components/ui/textarea.d.ts +3 -0
  162. package/dist/internal/components/ui/textarea.js +7 -0
  163. package/dist/internal/components/ui/tooltip.d.ts +6 -0
  164. package/dist/internal/components/ui/tooltip.js +17 -0
  165. package/dist/internal/contracts/modules/v1/reg-spi-reports/reg-spi-reports.schema.d.ts +112 -0
  166. package/dist/internal/contracts/modules/v1/reg-spi-reports/reg-spi-reports.schema.js +91 -0
  167. package/dist/internal/hooks/use-form-field-order.d.ts +7 -0
  168. package/dist/internal/hooks/use-form-field-order.js +43 -0
  169. package/dist/internal/lib/utils.d.ts +2 -0
  170. package/dist/internal/lib/utils.js +3 -0
  171. package/dist/inventory/components/inventory-item-form.d.ts +7 -0
  172. package/dist/inventory/components/inventory-item-form.js +5 -0
  173. package/dist/inventory/components/inventory-item-preview.d.ts +6 -0
  174. package/dist/inventory/components/inventory-item-preview.js +5 -0
  175. package/dist/inventory/iar.d.ts +4 -0
  176. package/dist/inventory/iar.js +4 -0
  177. package/dist/inventory/ics.d.ts +2 -0
  178. package/dist/inventory/ics.js +3 -0
  179. package/dist/inventory/iirup.d.ts +2 -0
  180. package/dist/inventory/iirup.js +3 -0
  181. package/dist/inventory/iirusp.d.ts +4 -0
  182. package/dist/inventory/iirusp.js +4 -0
  183. package/dist/inventory/index.d.ts +3 -0
  184. package/dist/inventory/index.js +4 -0
  185. package/dist/inventory/item.d.ts +3 -0
  186. package/dist/inventory/item.js +3 -0
  187. package/dist/inventory/itr.d.ts +4 -0
  188. package/dist/inventory/itr.js +4 -0
  189. package/dist/inventory/par.d.ts +2 -0
  190. package/dist/inventory/par.js +3 -0
  191. package/dist/inventory/po.d.ts +2 -0
  192. package/dist/inventory/po.js +2 -0
  193. package/dist/inventory/ppelc.d.ts +2 -0
  194. package/dist/inventory/ppelc.js +3 -0
  195. package/dist/inventory/pplc.d.ts +2 -0
  196. package/dist/inventory/pplc.js +4 -0
  197. package/dist/inventory/pr.d.ts +4 -0
  198. package/dist/inventory/pr.js +4 -0
  199. package/dist/inventory/property-card.d.ts +2 -0
  200. package/dist/inventory/property-card.js +3 -0
  201. package/dist/inventory/ptr.d.ts +2 -0
  202. package/dist/inventory/ptr.js +3 -0
  203. package/dist/inventory/regspi.d.ts +4 -0
  204. package/dist/inventory/regspi.js +4 -0
  205. package/dist/inventory/ris.d.ts +4 -0
  206. package/dist/inventory/ris.js +4 -0
  207. package/dist/inventory/rlsddp.d.ts +4 -0
  208. package/dist/inventory/rlsddp.js +4 -0
  209. package/dist/inventory/rlsddsp.d.ts +2 -0
  210. package/dist/inventory/rlsddsp.js +3 -0
  211. package/dist/inventory/rpci.d.ts +2 -0
  212. package/dist/inventory/rpci.js +3 -0
  213. package/dist/inventory/rpcppe.d.ts +2 -0
  214. package/dist/inventory/rpcppe.js +3 -0
  215. package/dist/inventory/rpcsp.d.ts +2 -0
  216. package/dist/inventory/rpcsp.js +3 -0
  217. package/dist/inventory/rrsp.d.ts +2 -0
  218. package/dist/inventory/rrsp.js +3 -0
  219. package/dist/inventory/rsmi.d.ts +4 -0
  220. package/dist/inventory/rsmi.js +4 -0
  221. package/dist/inventory/rsmp.d.ts +4 -0
  222. package/dist/inventory/rsmp.js +4 -0
  223. package/dist/inventory/rspi.d.ts +2 -0
  224. package/dist/inventory/rspi.js +3 -0
  225. package/dist/inventory/spc.d.ts +2 -0
  226. package/dist/inventory/spc.js +3 -0
  227. package/dist/inventory/splc.d.ts +3 -0
  228. package/dist/inventory/splc.js +4 -0
  229. package/dist/inventory/stock-card.d.ts +4 -0
  230. package/dist/inventory/stock-card.js +4 -0
  231. package/dist/inventory/types.d.ts +11 -0
  232. package/dist/inventory/types.js +1 -0
  233. package/dist/inventory/wmr.d.ts +4 -0
  234. package/dist/inventory/wmr.js +4 -0
  235. package/dist/lib/rpcsp-accountable-person.d.ts +1 -0
  236. package/dist/lib/rpcsp-accountable-person.js +10 -0
  237. package/dist/reports/iar/_components/create-form.d.ts +13 -0
  238. package/dist/reports/iar/_components/create-form.js +92 -0
  239. package/dist/reports/iar/_components/document-preview.d.ts +11 -0
  240. package/dist/reports/iar/_components/document-preview.js +131 -0
  241. package/dist/reports/iar/types.d.ts +97 -0
  242. package/dist/reports/iar/types.js +24 -0
  243. package/dist/reports/iirusp/_components/create-form.d.ts +17 -0
  244. package/dist/reports/iirusp/_components/create-form.js +118 -0
  245. package/dist/reports/iirusp/_components/document-preview.d.ts +8 -0
  246. package/dist/reports/iirusp/_components/document-preview.js +389 -0
  247. package/dist/reports/iirusp/types.d.ts +134 -0
  248. package/dist/reports/iirusp/types.js +29 -0
  249. package/dist/reports/iirusp/utils.d.ts +29 -0
  250. package/dist/reports/iirusp/utils.js +488 -0
  251. package/dist/reports/itr/_components/create-form.d.ts +28 -0
  252. package/dist/reports/itr/_components/create-form.js +90 -0
  253. package/dist/reports/itr/_components/document-preview.d.ts +6 -0
  254. package/dist/reports/itr/_components/document-preview.js +7 -0
  255. package/dist/reports/itr/types.d.ts +68 -0
  256. package/dist/reports/itr/types.js +27 -0
  257. package/dist/reports/itr/utils.d.ts +24 -0
  258. package/dist/reports/itr/utils.js +76 -0
  259. package/dist/reports/pr/_components/create-form.d.ts +16 -0
  260. package/dist/reports/pr/_components/create-form.js +52 -0
  261. package/dist/reports/pr/_components/document-preview.d.ts +7 -0
  262. package/dist/reports/pr/_components/document-preview.js +9 -0
  263. package/dist/reports/pr/types.d.ts +69 -0
  264. package/dist/reports/pr/types.js +1 -0
  265. package/dist/reports/pr/utils.d.ts +72 -0
  266. package/dist/reports/pr/utils.js +572 -0
  267. package/dist/reports/regspi/_components/create-form.d.ts +19 -0
  268. package/dist/reports/regspi/_components/create-form.js +33 -0
  269. package/dist/reports/regspi/_components/document-preview.d.ts +6 -0
  270. package/dist/reports/regspi/_components/document-preview.js +7 -0
  271. package/dist/reports/regspi/types.d.ts +29 -0
  272. package/dist/reports/regspi/types.js +24 -0
  273. package/dist/reports/regspi/utils.d.ts +48 -0
  274. package/dist/reports/regspi/utils.js +98 -0
  275. package/dist/reports/ris/_components/create-form.d.ts +36 -0
  276. package/dist/reports/ris/_components/create-form.js +149 -0
  277. package/dist/reports/ris/_components/document-preview.d.ts +8 -0
  278. package/dist/reports/ris/_components/document-preview.js +31 -0
  279. package/dist/reports/ris/types.d.ts +93 -0
  280. package/dist/reports/ris/types.js +1 -0
  281. package/dist/reports/rlsddp/_components/create-form.d.ts +11 -0
  282. package/dist/reports/rlsddp/_components/create-form.js +165 -0
  283. package/dist/reports/rlsddp/_components/document-preview.d.ts +8 -0
  284. package/dist/reports/rlsddp/_components/document-preview.js +15 -0
  285. package/dist/reports/rlsddp/types.d.ts +105 -0
  286. package/dist/reports/rlsddp/types.js +31 -0
  287. package/dist/reports/rrsp/components/rrsp-preview.d.ts +21 -0
  288. package/dist/reports/rrsp/components/rrsp-preview.js +155 -0
  289. package/dist/reports/rsmi/components/rsmi-create-form.d.ts +20 -0
  290. package/dist/reports/rsmi/components/rsmi-create-form.js +8 -0
  291. package/dist/reports/rsmi/components/rsmi-document-body.d.ts +15 -0
  292. package/dist/reports/rsmi/components/rsmi-document-body.js +12 -0
  293. package/dist/reports/rsmi/components/rsmi-types.d.ts +45 -0
  294. package/dist/reports/rsmi/components/rsmi-types.js +1 -0
  295. package/dist/reports/rsmi/components/rsmi-utils.d.ts +2 -0
  296. package/dist/reports/rsmi/components/rsmi-utils.js +18 -0
  297. package/dist/reports/rsmp/components/rsmp-create-modal.d.ts +5 -0
  298. package/dist/reports/rsmp/components/rsmp-create-modal.js +7 -0
  299. package/dist/reports/rsmp/components/rsmp-preview-modal.d.ts +11 -0
  300. package/dist/reports/rsmp/components/rsmp-preview-modal.js +47 -0
  301. package/dist/reports/rsmp/components/rsmp-types.d.ts +44 -0
  302. package/dist/reports/rsmp/components/rsmp-types.js +1 -0
  303. package/dist/reports/rsmp/components/rsmp-utils.d.ts +5 -0
  304. package/dist/reports/rsmp/components/rsmp-utils.js +41 -0
  305. package/dist/reports/rsmp/lib/rsmp-grouping.d.ts +14 -0
  306. package/dist/reports/rsmp/lib/rsmp-grouping.js +75 -0
  307. package/dist/reports/stock-card/_components/create-form.d.ts +13 -0
  308. package/dist/reports/stock-card/_components/create-form.js +39 -0
  309. package/dist/reports/stock-card/_components/document-preview.d.ts +7 -0
  310. package/dist/reports/stock-card/_components/document-preview.js +29 -0
  311. package/dist/reports/stock-card/types.d.ts +31 -0
  312. package/dist/reports/stock-card/types.js +1 -0
  313. package/dist/reports/stock-card/utils.d.ts +32 -0
  314. package/dist/reports/stock-card/utils.js +248 -0
  315. package/dist/reports/wmr/_components/create-form.d.ts +22 -0
  316. package/dist/reports/wmr/_components/create-form.js +61 -0
  317. package/dist/reports/wmr/_components/document-preview.d.ts +10 -0
  318. package/dist/reports/wmr/_components/document-preview.js +59 -0
  319. package/dist/reports/wmr/types.d.ts +45 -0
  320. package/dist/reports/wmr/types.js +1 -0
  321. package/dist/reports/wmr/utils.d.ts +32 -0
  322. package/dist/reports/wmr/utils.js +343 -0
  323. package/dist/styles.css +4492 -0
  324. package/extraction-manifest.json +620 -0
  325. package/package.json +197 -0
@@ -0,0 +1,237 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ const FIXED_ROWS = 18;
4
+ function fmtDate(value) {
5
+ if (!value || value.trim() === "")
6
+ return "";
7
+ try {
8
+ return new Date(value).toLocaleDateString("en-PH");
9
+ }
10
+ catch {
11
+ return value;
12
+ }
13
+ }
14
+ function fmtQty(value) {
15
+ if (!value || value.trim() === "")
16
+ return "";
17
+ const n = Number(value);
18
+ if (Number.isNaN(n))
19
+ return value;
20
+ return n === 0 ? "" : Number.isInteger(n) ? n.toString() : n.toFixed(2);
21
+ }
22
+ function fmtAmount(value) {
23
+ if (!value || value.trim() === "")
24
+ return "";
25
+ const n = Number(value);
26
+ if (Number.isNaN(n))
27
+ return value;
28
+ return n === 0 ? "" : n.toLocaleString("en-PH", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
29
+ }
30
+ const BORDER = "1px solid #9ca3af";
31
+ const HEADER_BG = "#f3f4f6";
32
+ const thBase = {
33
+ border: BORDER,
34
+ padding: "3px 3px",
35
+ textAlign: "center",
36
+ fontWeight: 600,
37
+ backgroundColor: HEADER_BG,
38
+ verticalAlign: "middle",
39
+ lineHeight: "1.15",
40
+ fontSize: "6pt",
41
+ whiteSpace: "normal",
42
+ overflowWrap: "break-word",
43
+ wordBreak: "normal",
44
+ };
45
+ const tdBase = {
46
+ border: BORDER,
47
+ padding: "2px 3px",
48
+ fontSize: "6.5pt",
49
+ lineHeight: 1.15,
50
+ verticalAlign: "middle",
51
+ height: "5.5mm",
52
+ minHeight: "5.5mm",
53
+ whiteSpace: "normal",
54
+ overflowWrap: "anywhere",
55
+ wordBreak: "normal",
56
+ };
57
+ const sectionTh = {
58
+ ...thBase,
59
+ backgroundColor: HEADER_BG,
60
+ fontSize: "6.5pt",
61
+ fontWeight: 700,
62
+ };
63
+ const inventoryFieldTh = {
64
+ ...thBase,
65
+ backgroundColor: HEADER_BG,
66
+ };
67
+ const disposalFieldTh = {
68
+ ...thBase,
69
+ backgroundColor: HEADER_BG,
70
+ };
71
+ const recordSalesFieldTh = {
72
+ ...thBase,
73
+ backgroundColor: HEADER_BG,
74
+ };
75
+ const columnLabels = [
76
+ "Date Acquired",
77
+ "Particulars / Articles",
78
+ "Property No.",
79
+ "Total Quantity",
80
+ "Unit Cost",
81
+ "Total Cost",
82
+ "Accumulated Depreciation",
83
+ "Summary of Accumulated Impairment Losses (Total)",
84
+ "Carrying Amount",
85
+ "Remarks",
86
+ "Disposal Sale",
87
+ "Transfer",
88
+ "Destruction",
89
+ "Others (Specify)",
90
+ "Total",
91
+ "Appraised Value",
92
+ "OR No.",
93
+ "Amount",
94
+ ];
95
+ export function IirupPreview({ entityName, nameOfAccountableOfficer, designation, station, fundCluster, date, iirupNo, requestedBy = "", approvedBy = "", accountableOfficerDesignation = "", authorizedOfficialDesignation = "", inspectionOfficerSignatory = "", inspectionOfficerDesignation = "CHIEF, ACCOUNTING SECTION", witnessSignatory = "", witnessDispositionDay = "", witnessDispositionMonth = "", witnessDispositionYear = "", entries, }) {
96
+ const rows = Array.from({ length: FIXED_ROWS }, (_, i) => entries[i] ?? null);
97
+ return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
98
+ @media print {
99
+ .no-print { display: none !important; }
100
+ body { background: white !important; }
101
+ .iirup-a4-page { box-shadow: none !important; margin: 0 !important; padding: 4mm 5mm !important; }
102
+ }
103
+ .iirup-a4-page * { box-sizing: border-box; }
104
+ ` }), _jsx("div", { style: { overflowX: "auto", width: "100%" }, children: _jsxs("div", { className: "iirup-a4-page bg-white", "data-pdf-page": "true", "data-pdf-fit-one-page": "true", "data-pdf-orientation": "landscape", style: {
105
+ width: "297mm",
106
+ minHeight: "210mm",
107
+ padding: "4mm 5mm",
108
+ fontFamily: "Arial, sans-serif",
109
+ fontSize: "7.5pt",
110
+ color: "#000",
111
+ display: "flex",
112
+ flexDirection: "column",
113
+ }, children: [_jsx("div", { style: { textAlign: "right", fontSize: "6.5pt", color: "#000", marginBottom: "2mm" }, children: iirupNo }), _jsx("div", { style: {
114
+ textAlign: "center",
115
+ fontWeight: "bold",
116
+ fontSize: "9.5pt",
117
+ marginBottom: "1mm",
118
+ }, children: "INVENTORY AND INSPECTION REPORT OF UNSERVICEABLE PROPERTY" }), _jsxs("div", { style: { textAlign: "center", fontSize: "7pt", marginBottom: "3mm" }, children: ["Date", " ", _jsx("span", { style: {
119
+ borderBottom: "1px solid #333",
120
+ display: "inline-block",
121
+ minWidth: "36mm",
122
+ padding: "0 1mm 1mm",
123
+ lineHeight: 1.2,
124
+ }, children: fmtDate(date) })] }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", marginBottom: "3mm" }, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: { width: "70%", paddingBottom: "2mm" }, children: [_jsx("span", { style: { fontWeight: 600 }, children: "Entity Name:\u00A0" }), _jsx("span", { style: {
125
+ borderBottom: "1px solid #333",
126
+ display: "inline-block",
127
+ minWidth: "150px",
128
+ padding: "0 1mm 1mm",
129
+ lineHeight: 1.2,
130
+ }, children: entityName })] }), _jsxs("td", { style: { width: "30%", paddingBottom: "2mm", textAlign: "right" }, children: [_jsx("span", { style: { fontWeight: 600 }, children: "Fund Cluster:\u00A0" }), _jsx("span", { style: {
131
+ borderBottom: "1px solid #333",
132
+ display: "inline-block",
133
+ minWidth: "80px",
134
+ padding: "0 1mm 1mm",
135
+ lineHeight: 1.2,
136
+ textAlign: "left",
137
+ }, children: fundCluster })] })] }) }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", marginBottom: "3mm" }, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: { width: "36%", paddingRight: "4mm", textAlign: "center" }, children: [_jsx("div", { style: {
138
+ borderBottom: "1px solid #333",
139
+ minHeight: "5mm",
140
+ display: "flex",
141
+ alignItems: "flex-end",
142
+ justifyContent: "center",
143
+ padding: "0 1mm 1.5mm",
144
+ lineHeight: 1.2,
145
+ }, children: nameOfAccountableOfficer }), _jsx("div", { style: { fontSize: "6.5pt", marginTop: "1mm" }, children: "(Name of Accountable Officer)" })] }), _jsxs("td", { style: { width: "32%", paddingRight: "4mm", textAlign: "center" }, children: [_jsx("div", { style: {
146
+ borderBottom: "1px solid #333",
147
+ minHeight: "5mm",
148
+ display: "flex",
149
+ alignItems: "flex-end",
150
+ justifyContent: "center",
151
+ padding: "0 1mm 1.5mm",
152
+ lineHeight: 1.2,
153
+ }, children: designation }), _jsx("div", { style: { fontSize: "6.5pt", marginTop: "1mm" }, children: "(Designation)" })] }), _jsxs("td", { style: { width: "32%", textAlign: "center" }, children: [_jsx("div", { style: {
154
+ borderBottom: "1px solid #333",
155
+ minHeight: "5mm",
156
+ display: "flex",
157
+ alignItems: "flex-end",
158
+ justifyContent: "center",
159
+ padding: "0 1mm 1.5mm",
160
+ lineHeight: 1.2,
161
+ }, children: station }), _jsx("div", { style: { fontSize: "6.5pt", marginTop: "1mm" }, children: "(Station)" })] })] }) }) }), _jsxs("table", { style: {
162
+ width: "100%",
163
+ borderCollapse: "collapse",
164
+ fontSize: "6.5pt",
165
+ tableLayout: "fixed",
166
+ flex: "0 0 auto",
167
+ }, children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "11%" } }), _jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "4%" } }), _jsx("col", { style: { width: "5%" } }), _jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "7%" } }), _jsx("col", { style: { width: "7%" } }), _jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "5%" } }), _jsx("col", { style: { width: "5%" } }), _jsx("col", { style: { width: "5%" } }), _jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "5%" } }), _jsx("col", { style: { width: "6%" } }), _jsx("col", { style: { width: "4%" } }), _jsx("col", { style: { width: "4%" } })] }), _jsxs("thead", { children: [_jsxs("tr", { style: { height: "4mm" }, children: [_jsx("th", { colSpan: 10, style: sectionTh, children: "INVENTORY" }), _jsx("th", { colSpan: 8, style: sectionTh, children: "INSPECTION and DISPOSAL" })] }), _jsxs("tr", { style: { height: "4mm" }, children: [_jsx("th", { colSpan: 10, style: sectionTh, children: "INVENTORY DETAILS" }), _jsx("th", { colSpan: 5, style: sectionTh, children: "DISPOSAL" }), _jsx("th", { style: sectionTh, children: "APPRAISAL" }), _jsx("th", { colSpan: 2, style: sectionTh, children: "RECORD OF SALES" })] }), _jsx("tr", { style: { height: "11mm" }, children: columnLabels.map((label, index) => (_jsx("th", { style: index < 10
168
+ ? inventoryFieldTh
169
+ : index >= 16
170
+ ? recordSalesFieldTh
171
+ : disposalFieldTh, children: label }, label))) }), _jsx("tr", { style: { height: "4mm" }, children: columnLabels.map((_, index) => (_jsxs("th", { style: thBase, children: ["(", index + 1, ")"] }, index + 1))) })] }), _jsx("tbody", { children: rows.map((row, index) => (_jsxs("tr", { children: [_jsx("td", { style: { ...tdBase, textAlign: "center" }, children: row ? fmtDate(row.dateAcquired) : "" }), _jsx("td", { style: tdBase, children: row?.particularsArticles ?? "" }), _jsx("td", { style: tdBase, children: row?.propertyNo ?? "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtQty(row.qty) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.unitCost) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.totalCost) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.accumulatedDepreciation) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.accumulatedImpairmentLosses) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.carryingAmount) : "" }), _jsx("td", { style: tdBase, children: row?.remarks ?? "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.sale) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.transfer) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.destruction) : "" }), _jsx("td", { style: tdBase, children: row?.othersSpecify ?? "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.total) : "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.appraisedValue) : "" }), _jsx("td", { style: tdBase, children: row?.orNo ?? "" }), _jsx("td", { style: { ...tdBase, textAlign: "right" }, children: row ? fmtAmount(row.amount) : "" })] }, index))) })] }), _jsxs("table", { style: {
172
+ width: "100%",
173
+ borderCollapse: "collapse",
174
+ tableLayout: "fixed",
175
+ marginTop: "4mm",
176
+ fontSize: "6.5pt",
177
+ }, children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: "50%" } }), _jsx("col", { style: { width: "25%" } }), _jsx("col", { style: { width: "25%" } })] }), _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: { border: BORDER, verticalAlign: "top", padding: "3mm" }, children: [_jsx("div", { style: { marginBottom: "3mm", lineHeight: 1.35 }, children: _jsx("i", { children: "I HEREBY request inspection and disposition, pursuant to Section 73 of PD 1445, of the property enumerated above." }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: { width: "50%", verticalAlign: "top", paddingRight: "2mm" }, children: [_jsx("div", { style: { marginBottom: "4mm" }, children: "Requested by:" }), _jsx("div", { style: {
178
+ borderBottom: "1px solid #333",
179
+ minHeight: "6mm",
180
+ display: "flex",
181
+ alignItems: "flex-end",
182
+ justifyContent: "center",
183
+ textAlign: "center",
184
+ padding: "0 2mm 1.8mm",
185
+ boxSizing: "border-box",
186
+ }, children: requestedBy }), _jsx("div", { style: { textAlign: "center", marginTop: "1mm", fontSize: "6pt" }, children: "(Signature over Printed Name of Accountable Officer)" }), _jsx("div", { style: {
187
+ borderBottom: "1px solid #333",
188
+ minHeight: "5mm",
189
+ display: "flex",
190
+ alignItems: "flex-end",
191
+ justifyContent: "center",
192
+ textAlign: "center",
193
+ padding: "0 2mm 1.8mm",
194
+ boxSizing: "border-box",
195
+ marginTop: "2mm",
196
+ }, children: accountableOfficerDesignation }), _jsx("div", { style: { textAlign: "center", marginTop: "1mm", fontSize: "6pt" }, children: "Designation of Accountable Officer" })] }), _jsxs("td", { style: { width: "50%", verticalAlign: "top", paddingLeft: "2mm" }, children: [_jsx("div", { style: { marginBottom: "4mm" }, children: "Approved by:" }), _jsx("div", { style: {
197
+ borderBottom: "1px solid #333",
198
+ minHeight: "6mm",
199
+ display: "flex",
200
+ alignItems: "flex-end",
201
+ justifyContent: "center",
202
+ textAlign: "center",
203
+ padding: "0 2mm 1.8mm",
204
+ boxSizing: "border-box",
205
+ }, children: approvedBy }), _jsx("div", { style: { textAlign: "center", marginTop: "1mm", fontSize: "6pt" }, children: "(Signature over Printed Name of Authorized Official)" }), _jsx("div", { style: {
206
+ borderBottom: "1px solid #333",
207
+ minHeight: "5mm",
208
+ display: "flex",
209
+ alignItems: "flex-end",
210
+ justifyContent: "center",
211
+ textAlign: "center",
212
+ padding: "0 2mm 1.8mm",
213
+ boxSizing: "border-box",
214
+ lineHeight: 1.1,
215
+ marginTop: "2mm",
216
+ }, children: authorizedOfficialDesignation }), _jsx("div", { style: { textAlign: "center", marginTop: "1mm", fontSize: "6pt" }, children: "Designation of Authorized Official" })] })] }) }) })] }), _jsxs("td", { style: { border: BORDER, verticalAlign: "top", padding: "3mm" }, children: [_jsx("div", { style: { marginBottom: "8mm", lineHeight: 1.35 }, children: _jsx("i", { children: "I CERTIFY that I have inspected each and every article enumerated in this report, and that the disposition made thereof was, in my judgment, the best for the public interest." }) }), _jsx("div", { style: {
217
+ borderBottom: "1px solid #333",
218
+ minHeight: "6mm",
219
+ display: "flex",
220
+ alignItems: "flex-end",
221
+ justifyContent: "center",
222
+ textAlign: "center",
223
+ padding: "0 2mm 1.8mm",
224
+ boxSizing: "border-box",
225
+ lineHeight: 1.1,
226
+ }, children: inspectionOfficerSignatory }), _jsx("div", { style: { textAlign: "center", marginTop: "1mm", fontSize: "6pt" }, children: "(Signature over Printed Name of Inspection Officer)" }), _jsx("div", { style: { textAlign: "center", marginTop: "2mm", fontSize: "6.5pt", fontWeight: 600 }, children: inspectionOfficerDesignation })] }), _jsxs("td", { style: { border: BORDER, verticalAlign: "top", padding: "3mm" }, children: [_jsx("div", { style: { marginBottom: "8mm", lineHeight: 1.35 }, children: _jsxs("i", { children: ["I CERTIFY that I have witnessed the disposition of the articles enumerated on this report this ", witnessDispositionDay || "____", " day of", " ", witnessDispositionMonth || "___________", witnessDispositionYear ? `, ${witnessDispositionYear}` : ", ______", "."] }) }), _jsx("div", { style: {
227
+ borderBottom: "1px solid #333",
228
+ minHeight: "6mm",
229
+ display: "flex",
230
+ alignItems: "flex-end",
231
+ justifyContent: "center",
232
+ textAlign: "center",
233
+ padding: "0 2mm 1.8mm",
234
+ boxSizing: "border-box",
235
+ lineHeight: 1.1,
236
+ }, children: witnessSignatory }), _jsx("div", { style: { textAlign: "center", marginTop: "1mm", fontSize: "6pt" }, children: "(Signature over Printed Name of Witness)" })] })] }) })] })] }) })] }));
237
+ }
@@ -0,0 +1,31 @@
1
+ type ItrItem = {
2
+ dateAcquired?: string;
3
+ itemNo?: string;
4
+ propertyNo?: string;
5
+ description?: string;
6
+ amount: string;
7
+ conditionOfInventory?: string;
8
+ conditionOfPPE?: string;
9
+ };
10
+ type ItrPreviewProps = {
11
+ entityName?: string;
12
+ fundCluster?: string;
13
+ fromAccountableOfficer?: string;
14
+ fromAccountablePerson?: string;
15
+ fromDivisionSection?: string;
16
+ toAccountableOfficer?: string;
17
+ toAccountablePerson?: string;
18
+ toDivisionSection?: string;
19
+ itrNo?: string;
20
+ transferDate?: string;
21
+ transferType?: "Donation" | "Reassignment" | "Relocate" | "Others";
22
+ transferTypeOthers?: string;
23
+ reason?: string;
24
+ reasonForTransfer?: string;
25
+ approvedBy?: string;
26
+ releasedIssuedBy?: string;
27
+ receivedBy?: string;
28
+ items: ItrItem[];
29
+ };
30
+ export declare function ItrPreview({ entityName, fundCluster, fromAccountableOfficer, fromAccountablePerson, fromDivisionSection, toAccountableOfficer, toAccountablePerson, toDivisionSection, itrNo, transferDate, transferType, transferTypeOthers, reason, reasonForTransfer, approvedBy, releasedIssuedBy, receivedBy, items, }: ItrPreviewProps): import("react/jsx-runtime").JSX.Element;
31
+ export {};
@@ -0,0 +1,180 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ const FIXED_ROWS = 22;
4
+ const NBSP = "\u00a0";
5
+ const B = "1.4px solid #000";
6
+ const THICK = "2px solid #000";
7
+ function fmtDate(value) {
8
+ if (!value)
9
+ return "";
10
+ const d = new Date(value);
11
+ return isNaN(d.getTime()) ? value : d.toLocaleDateString("en-PH");
12
+ }
13
+ function fmtAmount(value) {
14
+ if (!value)
15
+ return "";
16
+ const n = Number(value);
17
+ return Number.isNaN(n)
18
+ ? value
19
+ : n.toLocaleString("en-PH", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
20
+ }
21
+ const td = {
22
+ border: B,
23
+ color: "#000",
24
+ padding: "1mm 1.2mm 2mm",
25
+ fontSize: "10pt",
26
+ lineHeight: 1.3,
27
+ verticalAlign: "top",
28
+ };
29
+ const itemTh = {
30
+ border: THICK,
31
+ color: "#000",
32
+ padding: "1.5mm 1mm 2mm",
33
+ fontSize: "11pt",
34
+ fontWeight: "bold",
35
+ lineHeight: 1.2,
36
+ textAlign: "center",
37
+ verticalAlign: "middle",
38
+ };
39
+ const checkboxLabel = {
40
+ color: "#000",
41
+ display: "flex",
42
+ alignItems: "center",
43
+ minHeight: "5.5mm",
44
+ lineHeight: 1.3,
45
+ flexWrap: "wrap",
46
+ };
47
+ function Checkbox({ checked }) {
48
+ return (_jsx("span", { style: {
49
+ display: "inline-block",
50
+ width: "4.4mm",
51
+ height: "4.4mm",
52
+ border: B,
53
+ color: "#000",
54
+ marginRight: "1.2mm",
55
+ textAlign: "center",
56
+ lineHeight: "4mm",
57
+ fontSize: "8pt",
58
+ verticalAlign: "middle",
59
+ flex: "0 0 auto",
60
+ }, children: checked ? "X" : "" }));
61
+ }
62
+ export function ItrPreview({ entityName = "", fundCluster = "", fromAccountableOfficer = "", fromAccountablePerson = "", fromDivisionSection = "", toAccountableOfficer = "", toAccountablePerson = "", toDivisionSection = "", itrNo = "", transferDate = "", transferType, transferTypeOthers = "", reason = "", reasonForTransfer = "", approvedBy = "", releasedIssuedBy = "", receivedBy = "", items, }) {
63
+ const visibleItems = items.filter(item => [
64
+ item.dateAcquired,
65
+ item.itemNo,
66
+ item.propertyNo,
67
+ item.description,
68
+ item.conditionOfInventory,
69
+ item.conditionOfPPE,
70
+ Number(item.amount) !== 0 ? item.amount : "",
71
+ ].some(value => String(value ?? "").trim() !== ""));
72
+ const rows = Array.from({ length: FIXED_ROWS }, (_, index) => visibleItems[index] ?? null);
73
+ const nothingFollowsIndex = Math.min(Math.max(visibleItems.length, 3), FIXED_ROWS - 1);
74
+ const displayReason = reasonForTransfer || reason;
75
+ const displayFromPerson = fromAccountablePerson || fromAccountableOfficer;
76
+ const displayToPerson = toAccountablePerson || toAccountableOfficer;
77
+ return (_jsx("div", { className: "psms-print-preview itr-a4-page", "data-pdf-page": "true", "data-pdf-orientation": "portrait", "data-pdf-fit-one-page": "true", style: {
78
+ width: "210mm",
79
+ minHeight: "297mm",
80
+ padding: "10mm 11mm",
81
+ backgroundColor: "#fff",
82
+ boxSizing: "border-box",
83
+ color: "#000",
84
+ colorScheme: "light",
85
+ lineHeight: 1.3,
86
+ overflowWrap: "anywhere",
87
+ fontFamily: '"Times New Roman", Times, serif',
88
+ }, children: _jsxs("div", { style: { border: THICK, minHeight: "260mm", boxSizing: "border-box" }, children: [_jsx("div", { style: {
89
+ height: "24mm",
90
+ display: "flex",
91
+ alignItems: "center",
92
+ justifyContent: "center",
93
+ textAlign: "center",
94
+ }, children: _jsx("div", { style: { fontSize: "16pt", fontWeight: "bold", letterSpacing: "0.4px" }, children: "INVENTORY TRANSFER REPORT" }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: _jsx("tbody", { children: _jsxs("tr", { style: { height: "12mm" }, children: [_jsxs("td", { style: {
95
+ ...td,
96
+ width: "70%",
97
+ borderLeft: "none",
98
+ borderBottom: THICK,
99
+ borderTop: "none",
100
+ fontSize: "12pt",
101
+ fontWeight: "bold",
102
+ verticalAlign: "middle",
103
+ }, children: ["Entity Name : ", entityName || NBSP] }), _jsxs("td", { style: {
104
+ ...td,
105
+ borderRight: "none",
106
+ borderBottom: THICK,
107
+ borderTop: "none",
108
+ fontSize: "12pt",
109
+ fontWeight: "bold",
110
+ verticalAlign: "middle",
111
+ }, children: ["Fund Cluster : ", fundCluster || NBSP] })] }) }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: _jsx("tbody", { children: _jsxs("tr", { style: { height: "27mm" }, children: [_jsxs("td", { style: {
112
+ ...td,
113
+ width: "70%",
114
+ borderLeft: "none",
115
+ borderBottom: THICK,
116
+ borderTop: "none",
117
+ padding: "1.5mm 1mm",
118
+ fontSize: "11pt",
119
+ }, children: [_jsxs("div", { children: ["From Accountable Person : ", displayFromPerson || NBSP] }), _jsxs("div", { style: { marginTop: "1mm" }, children: ["Section/Division : ", fromDivisionSection || NBSP] }), _jsxs("div", { style: { marginTop: "1mm" }, children: ["To Accountable Person : ", displayToPerson || NBSP] }), _jsxs("div", { style: { marginTop: "1mm" }, children: ["Section/Division : ", toDivisionSection || NBSP] })] }), _jsxs("td", { style: {
120
+ ...td,
121
+ borderRight: "none",
122
+ borderBottom: THICK,
123
+ borderTop: "none",
124
+ padding: "1.5mm 1mm",
125
+ fontSize: "11pt",
126
+ }, children: [_jsxs("div", { children: ["ITR No. : ", itrNo || NBSP] }), _jsxs("div", { style: { marginTop: "2mm" }, children: ["Date : ", fmtDate(transferDate) || NBSP] })] })] }) }) }), _jsxs("div", { style: {
127
+ minHeight: "20mm",
128
+ borderBottom: THICK,
129
+ boxSizing: "border-box",
130
+ padding: "2mm 1mm 3mm",
131
+ fontSize: "11pt",
132
+ }, children: [_jsx("div", { children: "Transfer Type: (check only one)" }), _jsxs("div", { style: {
133
+ marginTop: "1.4mm",
134
+ marginLeft: "22mm",
135
+ display: "flex",
136
+ gap: "22mm",
137
+ alignItems: "flex-start",
138
+ }, children: [_jsxs("div", { style: { display: "grid", gap: "0.7mm" }, children: [_jsxs("label", { style: checkboxLabel, children: [_jsx(Checkbox, { checked: transferType === "Donation" }), "Donation"] }), _jsxs("label", { style: checkboxLabel, children: [_jsx(Checkbox, { checked: transferType === "Reassignment" }), "Reassignment"] })] }), _jsxs("div", { style: { display: "grid", gap: "0.7mm" }, children: [_jsxs("label", { style: checkboxLabel, children: [_jsx(Checkbox, { checked: transferType === "Relocate" }), "Relocate"] }), _jsxs("label", { style: checkboxLabel, children: [_jsx(Checkbox, { checked: transferType === "Others" }), "Others (Specify)", _jsx("span", { style: {
139
+ display: "inline-block",
140
+ minWidth: "44mm",
141
+ borderBottom: B,
142
+ marginLeft: "1mm",
143
+ boxSizing: "border-box",
144
+ minHeight: "6mm",
145
+ padding: "0.5mm 1mm 1.2mm",
146
+ lineHeight: 1.3,
147
+ verticalAlign: "bottom",
148
+ }, children: transferType === "Others" ? transferTypeOthers : NBSP })] })] })] })] }), _jsxs("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: "15.4%" } }), _jsx("col", { style: { width: "19.7%" } }), _jsx("col", { style: { width: "35.4%" } }), _jsx("col", { style: { width: "14.1%" } }), _jsx("col", { style: { width: "15.4%" } })] }), _jsx("thead", { children: _jsxs("tr", { style: { height: "10.5mm" }, children: [_jsx("th", { style: { ...itemTh, borderLeft: "none" }, children: "Date Acquired" }), _jsx("th", { style: itemTh, children: "Property No." }), _jsx("th", { style: itemTh, children: "Description" }), _jsx("th", { style: itemTh, children: "Amount" }), _jsxs("th", { style: { ...itemTh, borderRight: "none" }, children: ["Property", _jsx("br", {}), "Condition"] })] }) }), _jsx("tbody", { children: rows.map((item, index) => (_jsxs("tr", { style: { height: "5.35mm" }, children: [_jsx("td", { style: { ...td, borderLeft: "none", padding: "0.6mm 1mm 1.6mm" }, children: item ? fmtDate(item.dateAcquired) || NBSP : NBSP }), _jsx("td", { style: { ...td, padding: "0.6mm 1mm 1.6mm" }, children: item?.propertyNo || item?.itemNo || NBSP }), _jsx("td", { style: { ...td, padding: "0.6mm 1mm 1.6mm", textAlign: "center" }, children: item?.description ? (item.description) : index === nothingFollowsIndex ? (_jsx("em", { children: "***nothing follows***" })) : (NBSP) }), _jsx("td", { style: { ...td, padding: "0.6mm 1mm 1.6mm", textAlign: "right" }, children: item ? fmtAmount(item.amount) || NBSP : NBSP }), _jsx("td", { style: {
149
+ ...td,
150
+ borderRight: "none",
151
+ padding: "0.6mm 1mm 1.6mm",
152
+ textAlign: "center",
153
+ }, children: item?.conditionOfPPE || item?.conditionOfInventory || NBSP })] }, index))) })] }), _jsxs("div", { style: {
154
+ minHeight: "16mm",
155
+ borderTop: THICK,
156
+ borderBottom: THICK,
157
+ padding: "2mm 1mm 3mm",
158
+ boxSizing: "border-box",
159
+ fontSize: "11pt",
160
+ }, children: [_jsxs("div", { children: ["Reason for Transfer: ", displayReason || NBSP] }), _jsx("div", { style: {
161
+ marginTop: "2mm",
162
+ textAlign: "center",
163
+ fontSize: "12pt",
164
+ textDecoration: "underline",
165
+ }, children: "TRANSFER TO NEW ACCOUNTABLE PERSON" })] }), _jsx("div", { style: { padding: "4mm 1mm 3mm" }, children: _jsxs("table", { style: {
166
+ width: "100%",
167
+ tableLayout: "fixed",
168
+ borderCollapse: "collapse",
169
+ fontSize: "11pt",
170
+ }, children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: "15%" } }), _jsx("col", { style: { width: "28%" } }), _jsx("col", { style: { width: "29%" } }), _jsx("col", { style: { width: "28%" } })] }), _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", {}), ["Approved by:", "Released/Issued by:", "Received by:"].map(label => (_jsx("td", { style: { fontWeight: "bold", textAlign: "center", padding: "1mm 1mm 3mm" }, children: label }, label)))] }), [
171
+ { label: "Signature :", values: ["", "", ""] },
172
+ { label: "Name :", values: [approvedBy, releasedIssuedBy, receivedBy] },
173
+ { label: "Date :", values: ["", "", ""] },
174
+ ].map(row => (_jsxs("tr", { children: [_jsx("td", { style: { fontWeight: "bold", verticalAlign: "top", padding: "1mm 0 2mm" }, children: row.label }), row.values.map((value, index) => (_jsx("td", { style: {
175
+ verticalAlign: "top",
176
+ textAlign: "center",
177
+ padding: "1mm 1mm 2mm",
178
+ overflowWrap: "anywhere",
179
+ }, children: value || NBSP }, index)))] }, row.label)))] })] }) })] }) }));
180
+ }
@@ -0,0 +1,28 @@
1
+ export type ParPreviewItem = {
2
+ quantity?: string;
3
+ unit?: string;
4
+ description?: string;
5
+ propertyNumber?: string;
6
+ dateAcquired?: string;
7
+ amount?: string;
8
+ };
9
+ type ParPreviewProps = {
10
+ entityName?: string;
11
+ fundCluster?: string;
12
+ parNo?: string;
13
+ items?: ParPreviewItem[];
14
+ quantity?: string;
15
+ unit?: string;
16
+ description?: string;
17
+ propertyNumber?: string;
18
+ dateAcquired?: string;
19
+ amount?: string;
20
+ receivedByName?: string;
21
+ receivedByPosition?: string;
22
+ receivedByDate?: string;
23
+ issuedByName?: string;
24
+ issuedByPosition?: string;
25
+ issuedByDate?: string;
26
+ };
27
+ export declare function ParPreview({ entityName, fundCluster, parNo, items, quantity, unit, description, propertyNumber, dateAcquired, amount, receivedByName, receivedByPosition, receivedByDate, issuedByName, issuedByPosition, issuedByDate, }: ParPreviewProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -0,0 +1,95 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ const FIXED_ROWS = 30;
4
+ function fmtDate(value) {
5
+ if (!value || value.trim() === "")
6
+ return "";
7
+ const d = new Date(value);
8
+ return isNaN(d.getTime()) ? value : d.toLocaleDateString("en-PH");
9
+ }
10
+ function fmtAmount(value) {
11
+ if (!value || value.trim() === "")
12
+ return "";
13
+ const n = Number(value);
14
+ return Number.isNaN(n)
15
+ ? value
16
+ : n.toLocaleString("en-PH", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
17
+ }
18
+ function toDescriptionLines(value) {
19
+ const raw = String(value ?? "").trim();
20
+ if (!raw)
21
+ return [];
22
+ return raw
23
+ .split(/\n|;/)
24
+ .map(line => line.trim())
25
+ .filter(Boolean);
26
+ }
27
+ export function ParPreview({ entityName = "", fundCluster = "", parNo = "", items, quantity = "", unit = "", description = "", propertyNumber = "", dateAcquired = "", amount = "", receivedByName = "", receivedByPosition = "", receivedByDate = "", issuedByName = "", issuedByPosition = "", issuedByDate = "", }) {
28
+ const cell = "border border-black px-1 py-1 leading-[1.2] align-middle text-[10px]";
29
+ const th = "border border-black px-1 py-1 leading-[1.2] text-[10px] font-semibold text-center";
30
+ // Prefer items array; fall back to legacy single-item props
31
+ const resolvedItems = items && items.length > 0
32
+ ? items
33
+ : quantity || unit || description || propertyNumber || dateAcquired || amount
34
+ ? [{ quantity, unit, description, propertyNumber, dateAcquired, amount }]
35
+ : [];
36
+ const totalAmount = resolvedItems.reduce((sum, item) => {
37
+ const n = Number(item.amount ?? "");
38
+ return sum + (Number.isNaN(n) ? 0 : n);
39
+ }, 0);
40
+ const emptyRowCount = Math.max(0, FIXED_ROWS - resolvedItems.length);
41
+ const poNo = "";
42
+ const siNo = "";
43
+ const issueDate = fmtDate(issuedByDate || dateAcquired);
44
+ return (_jsxs("div", { "data-par-preview": "true", "data-pdf-page": "true", "data-pdf-orientation": "portrait", className: "bg-white! text-black! [&_table]:text-black! [&_td]:bg-white! [&_td]:text-black! [&_th]:text-black!", style: {
45
+ width: "100%",
46
+ maxWidth: "760px",
47
+ minHeight: "1080px",
48
+ margin: "0 auto",
49
+ padding: "14px",
50
+ fontFamily: '"Times New Roman", serif',
51
+ fontSize: "12px",
52
+ backgroundColor: "#fff",
53
+ color: "#000",
54
+ colorScheme: "light",
55
+ boxSizing: "border-box",
56
+ }, children: [_jsx("div", { style: { textAlign: "center", marginBottom: "34px" }, children: _jsx("div", { style: { fontSize: "37px", fontWeight: 700, letterSpacing: "0.2px", lineHeight: 1.02 }, children: "PROPERTY ACKNOWLEDGMENT RECEIPT" }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", marginBottom: "2px", fontSize: "13px" }, children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsxs("td", { style: { width: "62%", padding: "1px 0", verticalAlign: "bottom" }, children: [_jsx("span", { style: { fontWeight: "bold", display: "inline-block", minWidth: "92px" }, children: "Entity Name :" }), _jsx("span", { style: { paddingLeft: "6px", fontWeight: 700 }, children: entityName || "" })] }), _jsx("td", { style: { width: "40%" } })] }), _jsxs("tr", { children: [_jsxs("td", { style: { width: "62%", padding: "1px 0", verticalAlign: "bottom" }, children: [_jsx("span", { style: { fontWeight: "bold", display: "inline-block", minWidth: "92px" }, children: "Fund Cluster:" }), _jsx("span", { style: { paddingLeft: "6px", fontWeight: 700 }, children: fundCluster || "" })] }), _jsxs("td", { style: { width: "38%", padding: "1px 0", verticalAlign: "bottom", textAlign: "left" }, children: [_jsx("span", { style: { fontWeight: "bold", display: "inline-block", minWidth: "72px" }, children: "PAR No.:" }), _jsx("span", { style: { paddingLeft: "4px", fontWeight: 700 }, children: parNo || "" })] })] })] }) }), _jsx("table", { style: { width: "100%", borderCollapse: "collapse", marginBottom: "0", fontSize: "11px" }, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: { width: "62%", padding: "0 0 2px", borderBottom: "1px solid #111" }, children: [_jsx("span", { style: { fontWeight: "bold" }, children: "P.O. No.:" }), _jsx("span", { style: { display: "inline-block", minWidth: "140px", marginLeft: "4px" }, children: poNo || "" })] }), _jsxs("td", { style: { width: "18%", padding: "0 0 2px", borderBottom: "1px solid #111" }, children: [_jsx("span", { style: { fontWeight: "bold" }, children: "S.I. No.:" }), _jsx("span", { style: { display: "inline-block", minWidth: "58px", marginLeft: "4px" }, children: siNo || "" })] }), _jsxs("td", { style: { width: "20%", padding: "0 0 2px", borderBottom: "1px solid #111" }, children: [_jsx("span", { style: { fontWeight: "bold" }, children: "Date:" }), _jsx("span", { style: { display: "inline-block", marginLeft: "4px" }, children: issueDate || "" })] })] }) }) }), _jsxs("table", { style: {
57
+ width: "100%",
58
+ borderCollapse: "collapse",
59
+ fontSize: "10px",
60
+ border: "2px solid #111",
61
+ marginTop: "0",
62
+ }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: th, style: { width: "8%", fontSize: "12px", borderRight: "1px solid #111" }, children: "Quantity" }), _jsx("th", { className: th, style: { width: "7%", fontSize: "12px" }, children: "Unit" }), _jsx("th", { className: th, style: { width: "44%", fontSize: "12px" }, children: "Description" }), _jsxs("th", { className: th, style: { width: "15%", lineHeight: 1.05 }, children: ["Property", _jsx("br", {}), "Number"] }), _jsxs("th", { className: th, style: { width: "14%", lineHeight: 1.05 }, children: ["Date", _jsx("br", {}), "Acquired"] }), _jsx("th", { className: th, style: { width: "12%" }, children: "Amount" })] }) }), _jsxs("tbody", { children: [resolvedItems.map((item, i) => {
63
+ const lines = toDescriptionLines(item.description);
64
+ const firstLine = lines[0] ?? item.description ?? "";
65
+ const extraLines = lines.slice(1);
66
+ return (_jsxs("tr", { style: { height: "21px" }, children: [_jsx("td", { className: cell, style: { textAlign: "center", borderRight: "1px solid #111" }, children: item.quantity || " " }), _jsx("td", { className: cell, style: { textAlign: "center" }, children: item.unit || " " }), _jsxs("td", { className: cell, style: { whiteSpace: "pre-wrap" }, children: [_jsx("div", { children: firstLine || " " }), extraLines.map((line, lineIndex) => (_jsx("div", { style: { fontStyle: "italic" }, children: line }, `desc-line-${i}-${lineIndex}`)))] }), _jsx("td", { className: cell, children: item.propertyNumber || " " }), _jsx("td", { className: cell, children: fmtDate(item.dateAcquired) || " " }), _jsx("td", { className: cell, style: { textAlign: "right" }, children: fmtAmount(item.amount) || " " })] }, `par-data-row-${i}`));
67
+ }), Array.from({ length: emptyRowCount }).map((_, i) => (_jsxs("tr", { style: { height: "21px" }, children: [_jsx("td", { className: cell, style: { borderRight: "1px solid #111" }, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, style: i === 1 ? { textAlign: "center", fontStyle: "italic" } : undefined, children: i === 1 ? "***nothing follows***" : " " }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" })] }, `par-empty-row-${i}`))), _jsxs("tr", { style: { height: "22px" }, children: [_jsx("td", { className: cell, style: { borderRight: "1px solid #111" }, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, style: { textAlign: "center", fontWeight: "bold", fontSize: "11px" }, children: "TOTAL" }), _jsx("td", { className: cell, children: "\u00A0" }), _jsx("td", { className: cell, style: { textAlign: "right", fontWeight: "bold", paddingRight: "4px" }, children: totalAmount > 0 ? fmtAmount(String(totalAmount)) : "-" })] }, "par-total-row")] })] }), _jsx("table", { style: {
68
+ width: "100%",
69
+ borderCollapse: "collapse",
70
+ fontSize: "11px",
71
+ borderLeft: "2px solid #111",
72
+ borderRight: "2px solid #111",
73
+ borderBottom: "2px solid #111",
74
+ borderTop: "none",
75
+ }, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: {
76
+ width: "50%",
77
+ padding: "4px 6px 6px",
78
+ borderRight: "2px solid #111",
79
+ verticalAlign: "top",
80
+ }, children: [_jsx("div", { style: { fontWeight: "bold", marginBottom: "42px" }, children: "Received by:" }), _jsx("div", { style: {
81
+ minHeight: "16px",
82
+ marginBottom: "2px",
83
+ textAlign: "center",
84
+ fontWeight: "bold",
85
+ }, children: receivedByName || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "11px", marginBottom: "20px" }, children: "Signature over Printed Name of End-User" }), _jsx("div", { style: { minHeight: "16px", marginBottom: "2px", textAlign: "center" }, children: receivedByPosition || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "11px", marginBottom: "20px" }, children: "Position/Office" }), _jsx("div", { style: { minHeight: "16px", marginBottom: "2px", textAlign: "center" }, children: fmtDate(receivedByDate) || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "10px" }, children: "Date" })] }), _jsxs("td", { style: {
86
+ width: "50%",
87
+ padding: "4px 6px 6px",
88
+ verticalAlign: "top",
89
+ }, children: [_jsx("div", { style: { fontWeight: "bold", marginBottom: "42px" }, children: "Issued by:" }), _jsx("div", { style: {
90
+ minHeight: "16px",
91
+ marginBottom: "2px",
92
+ textAlign: "center",
93
+ fontWeight: "bold",
94
+ }, children: issuedByName || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "11px", marginBottom: "20px" }, children: "Signature over Printed Name" }), _jsx("div", { style: { minHeight: "16px", marginBottom: "2px", textAlign: "center" }, children: issuedByPosition || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "11px", marginBottom: "20px" }, children: "Position/Office" }), _jsx("div", { style: { minHeight: "16px", marginBottom: "2px", textAlign: "center" }, children: fmtDate(issuedByDate) || " " }), _jsx("div", { style: { textAlign: "center", fontSize: "10px" }, children: "Date" })] })] }) }) })] }));
95
+ }