@senior-gestao-empresarial/erpx-components 0.0.0-develop-3bab051d

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 (382) hide show
  1. package/bundles/senior-gestao-empresarial-erpx-components.umd.js +37665 -0
  2. package/bundles/senior-gestao-empresarial-erpx-components.umd.js.map +1 -0
  3. package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js +17 -0
  4. package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js.map +1 -0
  5. package/components/breadcrumb/breadcrumb.component.d.ts +21 -0
  6. package/components/breadcrumb/breadcrumb.module.d.ts +2 -0
  7. package/components/breadcrumb/index.d.ts +2 -0
  8. package/components/focus/focus.service.d.ts +4 -0
  9. package/components/lote-serie/erp-lote-serie.component.d.ts +183 -0
  10. package/components/lote-serie/erp-lote-serie.module.d.ts +2 -0
  11. package/components/lote-serie/erp-lote-serie.service.d.ts +137 -0
  12. package/components/lote-serie/index.d.ts +2 -0
  13. package/components/rateio-editor/erp-rateio-editor.component.d.ts +202 -0
  14. package/components/rateio-editor/erp-rateio-editor.converter.d.ts +18 -0
  15. package/components/rateio-editor/erp-rateio-editor.module.d.ts +2 -0
  16. package/components/rateio-editor/erp-rateio-editor.service.d.ts +17 -0
  17. package/components/rateio-editor/erp-rateio-editor.types.d.ts +171 -0
  18. package/components/rateio-editor/index.d.ts +4 -0
  19. package/components/resumo/erp-resumo.component.d.ts +17 -0
  20. package/components/resumo/erp-resumo.module.d.ts +2 -0
  21. package/components/resumo/erp-resumo.service.d.ts +2 -0
  22. package/components/resumo/index.d.ts +2 -0
  23. package/components/tributos/calculators/effective-tax-rate-calculator.d.ts +34 -0
  24. package/components/tributos/calculators/gross-amount-calculator.d.ts +20 -0
  25. package/components/tributos/calculators/tax-amount-calculator.d.ts +54 -0
  26. package/components/tributos/erp-tributos.component.d.ts +215 -0
  27. package/components/tributos/erp-tributos.module.d.ts +2 -0
  28. package/components/tributos/erp-tributos.service.d.ts +10 -0
  29. package/components/tributos/erp-tributos.types.d.ts +286 -0
  30. package/components/tributos/index.d.ts +12 -0
  31. package/components/tributos/mappings/enum-tip-imp-cst-mapping.d.ts +2 -0
  32. package/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.d.ts +15 -0
  33. package/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.d.ts +28 -0
  34. package/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.d.ts +30 -0
  35. package/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.d.ts +22 -0
  36. package/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.d.ts +22 -0
  37. package/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.d.ts +5 -0
  38. package/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.d.ts +5 -0
  39. package/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.d.ts +8 -0
  40. package/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.d.ts +8 -0
  41. package/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.d.ts +5 -0
  42. package/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.d.ts +8 -0
  43. package/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.d.ts +5 -0
  44. package/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.d.ts +6 -0
  45. package/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.d.ts +5 -0
  46. package/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.d.ts +5 -0
  47. package/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.d.ts +8 -0
  48. package/components/tributos/rules/rules.service.d.ts +19 -0
  49. package/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.d.ts +16 -0
  50. package/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.d.ts +12 -0
  51. package/components/tributos/rules/status/registries/purchase-order-status-rules.registry.d.ts +12 -0
  52. package/components/tributos/rules/status/registries/sale-order-status-rules.registry.d.ts +8 -0
  53. package/components/tributos/rules/status/registries/status-rules.registry.d.ts +15 -0
  54. package/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.d.ts +5 -0
  55. package/components/tributos/rules/status/rules/tax-classification-status-rule.d.ts +5 -0
  56. package/components/tributos/rules/status/rules/tax-rate-status-rule.d.ts +5 -0
  57. package/components/tributos/rules/status/rules/taxable-base-status-rule.d.ts +5 -0
  58. package/components/tributos/rules/types/available-fields.d.ts +2 -0
  59. package/components/tributos/rules/types/available-taxes.d.ts +1 -0
  60. package/components/tributos/rules/types/field-calculation-rule-mapping.d.ts +6 -0
  61. package/components/tributos/rules/types/field-rule-mapping.d.ts +6 -0
  62. package/components/tributos/rules/types/field-status-rule-mapping.d.ts +6 -0
  63. package/components/tributos/rules/types/rule-payload.d.ts +9 -0
  64. package/components/tributos/rules/types/schemas/incoming-invoice.schema.d.ts +235 -0
  65. package/components/tributos/rules/types/schemas/outgoing-invoice.schema.d.ts +349 -0
  66. package/components/tributos/rules/types/schemas/purchase-order.schema.d.ts +26 -0
  67. package/components/tributos/rules/types/schemas/sale-order.schema.d.ts +131 -0
  68. package/components/tributos/rules/types/strategies-by-document.d.ts +12 -0
  69. package/components/tributos/rules/types/strategies.d.ts +4 -0
  70. package/components/tributos/rules/types/tax-rule.d.ts +4 -0
  71. package/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.d.ts +20 -0
  72. package/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.d.ts +22 -0
  73. package/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.d.ts +14 -0
  74. package/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.d.ts +14 -0
  75. package/components/tributos/rules/validation/registries/validation-rules.registry.d.ts +15 -0
  76. package/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.d.ts +5 -0
  77. package/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.d.ts +5 -0
  78. package/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.d.ts +5 -0
  79. package/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.d.ts +5 -0
  80. package/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.d.ts +6 -0
  81. package/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.d.ts +6 -0
  82. package/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.d.ts +6 -0
  83. package/components/tributos/services/tax-rounding.service.d.ts +5 -0
  84. package/components/tributos/stores/tax.store.d.ts +10 -0
  85. package/components/tributos/tax-reform-utilities.d.ts +36 -0
  86. package/components/tributos/types/context.d.ts +7 -0
  87. package/components/tributos/types/controllership-incoming-invoice-context.d.ts +5 -0
  88. package/components/tributos/types/controllership-incoming-invoice.d.ts +3 -0
  89. package/components/tributos/types/controllership-outgoing-invoice-context.d.ts +5 -0
  90. package/components/tributos/types/controllership-outgoing-invoice.d.ts +3 -0
  91. package/components/tributos/types/credit-invoice-type.d.ts +1 -0
  92. package/components/tributos/types/debit-invoice-type.d.ts +1 -0
  93. package/components/tributos/types/group.d.ts +6 -0
  94. package/components/tributos/types/incoming-invoice-context.d.ts +5 -0
  95. package/components/tributos/types/incoming-invoice-item.d.ts +4 -0
  96. package/components/tributos/types/incoming-invoice-type.d.ts +1 -0
  97. package/components/tributos/types/incoming-invoice.d.ts +11 -0
  98. package/components/tributos/types/item-type.d.ts +1 -0
  99. package/components/tributos/types/outgoing-Invoice.d.ts +11 -0
  100. package/components/tributos/types/outgoing-invoice-context.d.ts +5 -0
  101. package/components/tributos/types/outgoing-invoice-item.d.ts +4 -0
  102. package/components/tributos/types/outgoing-invoice-type.d.ts +1 -0
  103. package/components/tributos/types/purchase-order-context.d.ts +5 -0
  104. package/components/tributos/types/purchase-order-type.d.ts +1 -0
  105. package/components/tributos/types/purchase-order.d.ts +8 -0
  106. package/components/tributos/types/sale-order-context.d.ts +5 -0
  107. package/components/tributos/types/sale-order-type.d.ts +1 -0
  108. package/components/tributos/types/sale-order.d.ts +8 -0
  109. package/components/tributos/types/tax.d.ts +8 -0
  110. package/components/utils/breakpoints.d.ts +10 -0
  111. package/components/utils/export-utils.d.ts +6 -0
  112. package/components/utils/index.d.ts +3 -0
  113. package/components/utils/loading-context.d.ts +7 -0
  114. package/components/utils/utils.d.ts +4 -0
  115. package/core/entities/entity-service.d.ts +32 -0
  116. package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.d.ts +36 -0
  117. package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.d.ts +40 -0
  118. package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.d.ts +2 -0
  119. package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.d.ts +11 -0
  120. package/core/enums/enum-classificacao-tributaria.d.ts +4 -0
  121. package/core/enums/enum-tipo-calculo-imposto.d.ts +5 -0
  122. package/core/enums/enum-tipo-documento-parametros.d.ts +7 -0
  123. package/core/enums/enum-tipo-documento.d.ts +10 -0
  124. package/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.d.ts +5 -0
  125. package/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.d.ts +8 -0
  126. package/esm2015/components/breadcrumb/breadcrumb.component.js +86 -0
  127. package/esm2015/components/breadcrumb/breadcrumb.module.js +17 -0
  128. package/esm2015/components/breadcrumb/index.js +3 -0
  129. package/esm2015/components/focus/focus.service.js +32 -0
  130. package/esm2015/components/lote-serie/erp-lote-serie.component.js +1772 -0
  131. package/esm2015/components/lote-serie/erp-lote-serie.module.js +47 -0
  132. package/esm2015/components/lote-serie/erp-lote-serie.service.js +94 -0
  133. package/esm2015/components/lote-serie/index.js +3 -0
  134. package/esm2015/components/rateio-editor/erp-rateio-editor.component.js +794 -0
  135. package/esm2015/components/rateio-editor/erp-rateio-editor.converter.js +52 -0
  136. package/esm2015/components/rateio-editor/erp-rateio-editor.module.js +40 -0
  137. package/esm2015/components/rateio-editor/erp-rateio-editor.service.js +49 -0
  138. package/esm2015/components/rateio-editor/erp-rateio-editor.types.js +5 -0
  139. package/esm2015/components/rateio-editor/index.js +4 -0
  140. package/esm2015/components/resumo/erp-resumo.component.js +19 -0
  141. package/esm2015/components/resumo/erp-resumo.module.js +25 -0
  142. package/esm2015/components/resumo/erp-resumo.service.js +13 -0
  143. package/esm2015/components/resumo/index.js +2 -0
  144. package/esm2015/components/tributos/calculators/effective-tax-rate-calculator.js +53 -0
  145. package/esm2015/components/tributos/calculators/gross-amount-calculator.js +37 -0
  146. package/esm2015/components/tributos/calculators/tax-amount-calculator.js +87 -0
  147. package/esm2015/components/tributos/erp-tributos.component.js +5176 -0
  148. package/esm2015/components/tributos/erp-tributos.module.js +33 -0
  149. package/esm2015/components/tributos/erp-tributos.service.js +23 -0
  150. package/esm2015/components/tributos/erp-tributos.types.js +268 -0
  151. package/esm2015/components/tributos/index.js +4 -0
  152. package/esm2015/components/tributos/mappings/enum-tip-imp-cst-mapping.js +33 -0
  153. package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.js +45 -0
  154. package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.js +3102 -0
  155. package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +4516 -0
  156. package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.js +294 -0
  157. package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.js +1464 -0
  158. package/esm2015/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.js +48 -0
  159. package/esm2015/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +55 -0
  160. package/esm2015/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.js +83 -0
  161. package/esm2015/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.js +74 -0
  162. package/esm2015/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.js +72 -0
  163. package/esm2015/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +244 -0
  164. package/esm2015/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.js +74 -0
  165. package/esm2015/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +170 -0
  166. package/esm2015/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.js +100 -0
  167. package/esm2015/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +124 -0
  168. package/esm2015/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.js +292 -0
  169. package/esm2015/components/tributos/rules/rules.service.js +61 -0
  170. package/esm2015/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.js +1076 -0
  171. package/esm2015/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +1317 -0
  172. package/esm2015/components/tributos/rules/status/registries/purchase-order-status-rules.registry.js +62 -0
  173. package/esm2015/components/tributos/rules/status/registries/sale-order-status-rules.registry.js +18 -0
  174. package/esm2015/components/tributos/rules/status/registries/status-rules.registry.js +45 -0
  175. package/esm2015/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.js +39 -0
  176. package/esm2015/components/tributos/rules/status/rules/tax-classification-status-rule.js +94 -0
  177. package/esm2015/components/tributos/rules/status/rules/tax-rate-status-rule.js +61 -0
  178. package/esm2015/components/tributos/rules/status/rules/taxable-base-status-rule.js +65 -0
  179. package/esm2015/components/tributos/rules/types/available-fields.js +1 -0
  180. package/esm2015/components/tributos/rules/types/available-taxes.js +1 -0
  181. package/esm2015/components/tributos/rules/types/field-calculation-rule-mapping.js +1 -0
  182. package/esm2015/components/tributos/rules/types/field-rule-mapping.js +1 -0
  183. package/esm2015/components/tributos/rules/types/field-status-rule-mapping.js +1 -0
  184. package/esm2015/components/tributos/rules/types/rule-payload.js +1 -0
  185. package/esm2015/components/tributos/rules/types/schemas/incoming-invoice.schema.js +1816 -0
  186. package/esm2015/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +2750 -0
  187. package/esm2015/components/tributos/rules/types/schemas/purchase-order.schema.js +150 -0
  188. package/esm2015/components/tributos/rules/types/schemas/sale-order.schema.js +879 -0
  189. package/esm2015/components/tributos/rules/types/strategies-by-document.js +1 -0
  190. package/esm2015/components/tributos/rules/types/strategies.js +1 -0
  191. package/esm2015/components/tributos/rules/types/tax-rule.js +1 -0
  192. package/esm2015/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.js +3606 -0
  193. package/esm2015/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +5452 -0
  194. package/esm2015/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.js +270 -0
  195. package/esm2015/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.js +1392 -0
  196. package/esm2015/components/tributos/rules/validation/registries/validation-rules.registry.js +45 -0
  197. package/esm2015/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.js +73 -0
  198. package/esm2015/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +78 -0
  199. package/esm2015/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +902 -0
  200. package/esm2015/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +401 -0
  201. package/esm2015/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.js +719 -0
  202. package/esm2015/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +300 -0
  203. package/esm2015/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.js +717 -0
  204. package/esm2015/components/tributos/services/tax-rounding.service.js +18 -0
  205. package/esm2015/components/tributos/stores/tax.store.js +19 -0
  206. package/esm2015/components/tributos/tax-reform-utilities.js +243 -0
  207. package/esm2015/components/tributos/types/context.js +1 -0
  208. package/esm2015/components/tributos/types/controllership-incoming-invoice-context.js +1 -0
  209. package/esm2015/components/tributos/types/controllership-incoming-invoice.js +1 -0
  210. package/esm2015/components/tributos/types/controllership-outgoing-invoice-context.js +1 -0
  211. package/esm2015/components/tributos/types/controllership-outgoing-invoice.js +1 -0
  212. package/esm2015/components/tributos/types/credit-invoice-type.js +1 -0
  213. package/esm2015/components/tributos/types/debit-invoice-type.js +1 -0
  214. package/esm2015/components/tributos/types/group.js +1 -0
  215. package/esm2015/components/tributos/types/incoming-invoice-context.js +1 -0
  216. package/esm2015/components/tributos/types/incoming-invoice-item.js +1 -0
  217. package/esm2015/components/tributos/types/incoming-invoice-type.js +1 -0
  218. package/esm2015/components/tributos/types/incoming-invoice.js +1 -0
  219. package/esm2015/components/tributos/types/item-type.js +1 -0
  220. package/esm2015/components/tributos/types/outgoing-Invoice.js +1 -0
  221. package/esm2015/components/tributos/types/outgoing-invoice-context.js +1 -0
  222. package/esm2015/components/tributos/types/outgoing-invoice-item.js +1 -0
  223. package/esm2015/components/tributos/types/outgoing-invoice-type.js +1 -0
  224. package/esm2015/components/tributos/types/purchase-order-context.js +1 -0
  225. package/esm2015/components/tributos/types/purchase-order-type.js +1 -0
  226. package/esm2015/components/tributos/types/purchase-order.js +1 -0
  227. package/esm2015/components/tributos/types/sale-order-context.js +1 -0
  228. package/esm2015/components/tributos/types/sale-order-type.js +1 -0
  229. package/esm2015/components/tributos/types/sale-order.js +1 -0
  230. package/esm2015/components/tributos/types/tax.js +2 -0
  231. package/esm2015/components/utils/breakpoints.js +11 -0
  232. package/esm2015/components/utils/export-utils.js +71 -0
  233. package/esm2015/components/utils/index.js +4 -0
  234. package/esm2015/components/utils/loading-context.js +20 -0
  235. package/esm2015/components/utils/utils.js +18 -0
  236. package/esm2015/core/entities/entity-service.js +91 -0
  237. package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.js +1 -0
  238. package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.js +62 -0
  239. package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.js +24 -0
  240. package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.js +24 -0
  241. package/esm2015/core/enums/enum-classificacao-tributaria.js +6 -0
  242. package/esm2015/core/enums/enum-tipo-calculo-imposto.js +7 -0
  243. package/esm2015/core/enums/enum-tipo-documento-parametros.js +9 -0
  244. package/esm2015/core/enums/enum-tipo-documento.js +12 -0
  245. package/esm2015/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.js +7 -0
  246. package/esm2015/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.js +10 -0
  247. package/esm2015/locale/fallback.js +56 -0
  248. package/esm2015/public-api.js +8 -0
  249. package/esm2015/senior-gestao-empresarial-erpx-components.js +58 -0
  250. package/esm5/components/breadcrumb/breadcrumb.component.js +91 -0
  251. package/esm5/components/breadcrumb/breadcrumb.module.js +20 -0
  252. package/esm5/components/breadcrumb/index.js +3 -0
  253. package/esm5/components/focus/focus.service.js +35 -0
  254. package/esm5/components/lote-serie/erp-lote-serie.component.js +1830 -0
  255. package/esm5/components/lote-serie/erp-lote-serie.module.js +50 -0
  256. package/esm5/components/lote-serie/erp-lote-serie.service.js +96 -0
  257. package/esm5/components/lote-serie/index.js +3 -0
  258. package/esm5/components/rateio-editor/erp-rateio-editor.component.js +861 -0
  259. package/esm5/components/rateio-editor/erp-rateio-editor.converter.js +68 -0
  260. package/esm5/components/rateio-editor/erp-rateio-editor.module.js +43 -0
  261. package/esm5/components/rateio-editor/erp-rateio-editor.service.js +51 -0
  262. package/esm5/components/rateio-editor/erp-rateio-editor.types.js +5 -0
  263. package/esm5/components/rateio-editor/index.js +4 -0
  264. package/esm5/components/resumo/erp-resumo.component.js +22 -0
  265. package/esm5/components/resumo/erp-resumo.module.js +28 -0
  266. package/esm5/components/resumo/erp-resumo.service.js +16 -0
  267. package/esm5/components/resumo/index.js +2 -0
  268. package/esm5/components/tributos/calculators/effective-tax-rate-calculator.js +58 -0
  269. package/esm5/components/tributos/calculators/gross-amount-calculator.js +39 -0
  270. package/esm5/components/tributos/calculators/tax-amount-calculator.js +91 -0
  271. package/esm5/components/tributos/erp-tributos.component.js +5296 -0
  272. package/esm5/components/tributos/erp-tributos.module.js +36 -0
  273. package/esm5/components/tributos/erp-tributos.service.js +24 -0
  274. package/esm5/components/tributos/erp-tributos.types.js +268 -0
  275. package/esm5/components/tributos/index.js +4 -0
  276. package/esm5/components/tributos/mappings/enum-tip-imp-cst-mapping.js +33 -0
  277. package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.js +46 -0
  278. package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.js +3104 -0
  279. package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +4518 -0
  280. package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.js +296 -0
  281. package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.js +1466 -0
  282. package/esm5/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.js +60 -0
  283. package/esm5/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +77 -0
  284. package/esm5/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.js +92 -0
  285. package/esm5/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.js +83 -0
  286. package/esm5/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.js +87 -0
  287. package/esm5/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +286 -0
  288. package/esm5/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.js +89 -0
  289. package/esm5/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +241 -0
  290. package/esm5/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.js +118 -0
  291. package/esm5/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +200 -0
  292. package/esm5/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.js +330 -0
  293. package/esm5/components/tributos/rules/rules.service.js +139 -0
  294. package/esm5/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.js +1078 -0
  295. package/esm5/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +1319 -0
  296. package/esm5/components/tributos/rules/status/registries/purchase-order-status-rules.registry.js +64 -0
  297. package/esm5/components/tributos/rules/status/registries/sale-order-status-rules.registry.js +19 -0
  298. package/esm5/components/tributos/rules/status/registries/status-rules.registry.js +46 -0
  299. package/esm5/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.js +43 -0
  300. package/esm5/components/tributos/rules/status/rules/tax-classification-status-rule.js +106 -0
  301. package/esm5/components/tributos/rules/status/rules/tax-rate-status-rule.js +68 -0
  302. package/esm5/components/tributos/rules/status/rules/taxable-base-status-rule.js +72 -0
  303. package/esm5/components/tributos/rules/types/available-fields.js +1 -0
  304. package/esm5/components/tributos/rules/types/available-taxes.js +1 -0
  305. package/esm5/components/tributos/rules/types/field-calculation-rule-mapping.js +1 -0
  306. package/esm5/components/tributos/rules/types/field-rule-mapping.js +1 -0
  307. package/esm5/components/tributos/rules/types/field-status-rule-mapping.js +1 -0
  308. package/esm5/components/tributos/rules/types/rule-payload.js +1 -0
  309. package/esm5/components/tributos/rules/types/schemas/incoming-invoice.schema.js +1817 -0
  310. package/esm5/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +2751 -0
  311. package/esm5/components/tributos/rules/types/schemas/purchase-order.schema.js +151 -0
  312. package/esm5/components/tributos/rules/types/schemas/sale-order.schema.js +880 -0
  313. package/esm5/components/tributos/rules/types/strategies-by-document.js +1 -0
  314. package/esm5/components/tributos/rules/types/strategies.js +1 -0
  315. package/esm5/components/tributos/rules/types/tax-rule.js +1 -0
  316. package/esm5/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.js +3608 -0
  317. package/esm5/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +5454 -0
  318. package/esm5/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.js +272 -0
  319. package/esm5/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.js +1394 -0
  320. package/esm5/components/tributos/rules/validation/registries/validation-rules.registry.js +46 -0
  321. package/esm5/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.js +77 -0
  322. package/esm5/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +86 -0
  323. package/esm5/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +968 -0
  324. package/esm5/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +433 -0
  325. package/esm5/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.js +774 -0
  326. package/esm5/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +323 -0
  327. package/esm5/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.js +772 -0
  328. package/esm5/components/tributos/services/tax-rounding.service.js +23 -0
  329. package/esm5/components/tributos/stores/tax.store.js +26 -0
  330. package/esm5/components/tributos/tax-reform-utilities.js +249 -0
  331. package/esm5/components/tributos/types/context.js +1 -0
  332. package/esm5/components/tributos/types/controllership-incoming-invoice-context.js +1 -0
  333. package/esm5/components/tributos/types/controllership-incoming-invoice.js +1 -0
  334. package/esm5/components/tributos/types/controllership-outgoing-invoice-context.js +1 -0
  335. package/esm5/components/tributos/types/controllership-outgoing-invoice.js +1 -0
  336. package/esm5/components/tributos/types/credit-invoice-type.js +1 -0
  337. package/esm5/components/tributos/types/debit-invoice-type.js +1 -0
  338. package/esm5/components/tributos/types/group.js +1 -0
  339. package/esm5/components/tributos/types/incoming-invoice-context.js +1 -0
  340. package/esm5/components/tributos/types/incoming-invoice-item.js +1 -0
  341. package/esm5/components/tributos/types/incoming-invoice-type.js +1 -0
  342. package/esm5/components/tributos/types/incoming-invoice.js +1 -0
  343. package/esm5/components/tributos/types/item-type.js +1 -0
  344. package/esm5/components/tributos/types/outgoing-Invoice.js +1 -0
  345. package/esm5/components/tributos/types/outgoing-invoice-context.js +1 -0
  346. package/esm5/components/tributos/types/outgoing-invoice-item.js +1 -0
  347. package/esm5/components/tributos/types/outgoing-invoice-type.js +1 -0
  348. package/esm5/components/tributos/types/purchase-order-context.js +1 -0
  349. package/esm5/components/tributos/types/purchase-order-type.js +1 -0
  350. package/esm5/components/tributos/types/purchase-order.js +1 -0
  351. package/esm5/components/tributos/types/sale-order-context.js +1 -0
  352. package/esm5/components/tributos/types/sale-order-type.js +1 -0
  353. package/esm5/components/tributos/types/sale-order.js +1 -0
  354. package/esm5/components/tributos/types/tax.js +2 -0
  355. package/esm5/components/utils/breakpoints.js +11 -0
  356. package/esm5/components/utils/export-utils.js +78 -0
  357. package/esm5/components/utils/index.js +4 -0
  358. package/esm5/components/utils/loading-context.js +22 -0
  359. package/esm5/components/utils/utils.js +20 -0
  360. package/esm5/core/entities/entity-service.js +98 -0
  361. package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.js +1 -0
  362. package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.js +67 -0
  363. package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.js +27 -0
  364. package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.js +27 -0
  365. package/esm5/core/enums/enum-classificacao-tributaria.js +6 -0
  366. package/esm5/core/enums/enum-tipo-calculo-imposto.js +7 -0
  367. package/esm5/core/enums/enum-tipo-documento-parametros.js +9 -0
  368. package/esm5/core/enums/enum-tipo-documento.js +12 -0
  369. package/esm5/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.js +7 -0
  370. package/esm5/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.js +10 -0
  371. package/esm5/locale/fallback.js +56 -0
  372. package/esm5/public-api.js +8 -0
  373. package/esm5/senior-gestao-empresarial-erpx-components.js +58 -0
  374. package/fesm2015/senior-gestao-empresarial-erpx-components.js +36350 -0
  375. package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -0
  376. package/fesm5/senior-gestao-empresarial-erpx-components.js +37396 -0
  377. package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -0
  378. package/locale/fallback.d.ts +55 -0
  379. package/package.json +23 -0
  380. package/public-api.d.ts +7 -0
  381. package/senior-gestao-empresarial-erpx-components.d.ts +57 -0
  382. package/senior-gestao-empresarial-erpx-components.metadata.json +1 -0
@@ -0,0 +1,21 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { MenuItem } from 'primeng/api';
4
+ export declare class BreadcrumbComponent implements OnDestroy {
5
+ private activatedRoute;
6
+ private router;
7
+ homeUrl: string;
8
+ home: MenuItem;
9
+ items: MenuItem[];
10
+ title: string;
11
+ private ngUnsubscribe;
12
+ constructor(activatedRoute: ActivatedRoute, router: Router);
13
+ private onNavigationEnd;
14
+ private getValidChildren;
15
+ private getCurrentTitle;
16
+ private getCurrentHome;
17
+ private getCurrentItems;
18
+ private getMenuItem;
19
+ private getTitle;
20
+ ngOnDestroy(): void;
21
+ }
@@ -0,0 +1,2 @@
1
+ export declare class BreadcrumbModule {
2
+ }
@@ -0,0 +1,2 @@
1
+ export * from './breadcrumb.module';
2
+ export * from './breadcrumb.component';
@@ -0,0 +1,4 @@
1
+ export declare class FocusService {
2
+ focusFirstInvalidInput(): void;
3
+ private getNestedInput;
4
+ }
@@ -0,0 +1,183 @@
1
+ import { OnChanges } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { ActivatedRoute } from '@angular/router';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { E210DxpLookup } from '@senior-gestao-empresarial/angular-components';
6
+ import { ButtonPriority, ButtonSize, FormField, TieredMenuItemData } from '@seniorsistemas/angular-components';
7
+ import { MessageService } from 'primeng/api';
8
+ import { Table } from 'primeng/table';
9
+ import { QuantidadeDisponivelDemandaService } from '../../core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service';
10
+ import { ErpLoteSeriesService } from './erp-lote-serie.service';
11
+ export declare class ErpLoteSerieComponent implements OnChanges {
12
+ private readonly translate;
13
+ private readonly route;
14
+ private readonly e210DxpLookup;
15
+ private readonly formBuilder;
16
+ private readonly messageService;
17
+ private readonly batchSeriesService;
18
+ private readonly quantidadeDisponivelDemandaService;
19
+ loteSerieParams: LoteSerieParams;
20
+ blockedFields: boolean;
21
+ showHeader: boolean;
22
+ validateInvalidChars: boolean;
23
+ readonly table: Table;
24
+ readonly ButtonPriority: typeof ButtonPriority;
25
+ readonly ButtonSize: typeof ButtonSize;
26
+ readonly EnumTipoMovimentacao: typeof EnumTipoMovimentacao;
27
+ gridData: any;
28
+ selection: any;
29
+ gridColumns: any[];
30
+ localeConfig: any;
31
+ locale: any;
32
+ private e200lotLookupSuggestionsObservable;
33
+ private e200lotlookupSearchObservable;
34
+ private e200serLookupSuggestionsObservable;
35
+ private e200serlookupSearchObservable;
36
+ private ngUnsubscribe;
37
+ private quantidadeDisponivelDemandaLookupSuggestionsObservable;
38
+ private quantidadeDisponivelDemandalookupSearchObservable;
39
+ formGroupBatchOrSeries: FormGroup;
40
+ batchOrSeriesFields: any[];
41
+ loteLookupDisplayFields: string[];
42
+ serieLookupDisplayFields: string[];
43
+ titleLoteOrSerie: string;
44
+ titleGridLoteOrSerie: string;
45
+ isSerie: boolean;
46
+ qtdAdistribuir: number;
47
+ qtdDistribuida: number;
48
+ qtdRestante: number;
49
+ maxLength: number;
50
+ obrigaValidade: boolean;
51
+ isSaida: boolean;
52
+ disableDataValidade: boolean;
53
+ prefix: string;
54
+ editingFormGroup: FormGroup;
55
+ editingFormFields: FormField[];
56
+ constructor(translate: TranslateService, route: ActivatedRoute, e210DxpLookup: E210DxpLookup, formBuilder: FormBuilder, messageService: MessageService, batchSeriesService: ErpLoteSeriesService, quantidadeDisponivelDemandaService: QuantidadeDisponivelDemandaService);
57
+ ngOnChanges(): void;
58
+ private validaDados;
59
+ private getFormGroupDados;
60
+ getProp(obj: any, path: any): any;
61
+ private getFieldsEntrada;
62
+ private getFieldsSaida;
63
+ private getGridColumns;
64
+ getE200LotSearchFields(): FormField[];
65
+ getE200SerSearchFields(): FormField[];
66
+ private onE200LotSearchRequest;
67
+ getQuantidadeDisponivelDemandaSearchFields(): FormField[];
68
+ getQuantidadeDisponivelDemandaSearchGridFields(): FormField[];
69
+ private onQuantidadeDisponivelDemandaRequest;
70
+ private onE200SerSearchRequest;
71
+ removeBatchOrSeries(rowData: any): void;
72
+ private sum;
73
+ private sub;
74
+ addBatchOrSeries(): void;
75
+ private toCode;
76
+ private toAmount;
77
+ private toNumber;
78
+ private toDate;
79
+ private isDuplicateBatchSeries;
80
+ private clearBatchSeries;
81
+ private validaLoteorSerie;
82
+ private onBlurValidaLoteorSerie;
83
+ private getDatas;
84
+ private processFamilySupplyInfo;
85
+ consultaSaldoEstoque(value: string): void;
86
+ getQuantidadeDistribuida(): number;
87
+ private validateAllFormFields;
88
+ onRouteDataChange(data: any): void;
89
+ getE200LotSearchGridFields(): FormField[];
90
+ getE200SerSearchGridFields(): FormField[];
91
+ onE200LotLookupRequest(value: string): void;
92
+ onE200SerLookupRequest(value: string): void;
93
+ formatDates(requestBody: any, properties: string[]): any;
94
+ formatDatesToCalendar(requestBody: any, properties: string[]): any;
95
+ translateHtml(text: string, value?: any, shortcut?: string): string;
96
+ onDistributeSeries(): void;
97
+ onDelete(): void;
98
+ isDistributeSeriesButtonVisible(): boolean;
99
+ private onBlurQuantity;
100
+ getMenuOptionsPerRow(rowData: any): TieredMenuItemData[];
101
+ onCancelEdit(rowData: any): void;
102
+ onSaveEdit(rowData: any): void;
103
+ }
104
+ export interface LoteSerieParams {
105
+ tipoMovimentacao: EnumTipoMovimentacao;
106
+ tipoControleProduto: EnumTipoControleProduto;
107
+ quantidadeDistribuir: number;
108
+ dadosProduto: DadosProduto;
109
+ lotesOrSeries?: Array<LotesOrSeries>;
110
+ invoiceInformation?: InvoiceInformation;
111
+ orderInformation?: OrderInformation;
112
+ }
113
+ /** Enum para tipo de movimento */
114
+ export declare enum EnumTipoMovimentacao {
115
+ /** Tipo movimentação igual a Entrada */
116
+ Entrada = "Entrada",
117
+ /** Tipo movimentação igual a Saída */
118
+ Saida = "Saida"
119
+ }
120
+ /** Enum para tipo de controle de produto */
121
+ export declare enum EnumTipoControleProduto {
122
+ /** Tipo de controle igual a Lote */
123
+ Lote = "Lote",
124
+ /** Tipo de controle igual a Série */
125
+ Serie = "Serie"
126
+ }
127
+ /** Interface para dados do produto */
128
+ export interface DadosProduto {
129
+ /** ID do produto */
130
+ e075der: string;
131
+ /** ID do depósito */
132
+ e205dep?: string;
133
+ /** ID da família do produto */
134
+ e012fam: string;
135
+ /** Entidade empresa */
136
+ e070emp: string;
137
+ /** Quantidade de casas decimais */
138
+ qtdDec?: number;
139
+ }
140
+ /** Interface para dados da grid dos lotes/séries distribuídos */
141
+ export interface LotesOrSeries {
142
+ /** ID do Lote ou Série */
143
+ id?: string;
144
+ /** Código do Lote ou Série */
145
+ codigo: string;
146
+ /** Data de validade do lote/série */
147
+ dataValidade?: string;
148
+ /** Data de fabricação do lote/série */
149
+ dataFabricacao?: string;
150
+ /** Quantidade **/
151
+ quantidade?: number;
152
+ }
153
+ export declare enum EnumInvoiceOrigin {
154
+ V1 = "V1",
155
+ V2 = "V2",
156
+ V3 = "V3",
157
+ V4 = "V4",
158
+ V5 = "V5",
159
+ V99 = "V99"
160
+ }
161
+ export interface InvoiceItem {
162
+ product: {
163
+ id: string;
164
+ isSerialControlled: boolean;
165
+ };
166
+ }
167
+ export interface InvoiceInformation {
168
+ company: {
169
+ id: string;
170
+ };
171
+ branch: {
172
+ id: string;
173
+ };
174
+ origin: EnumInvoiceOrigin;
175
+ item?: InvoiceItem;
176
+ }
177
+ export interface OrderItem {
178
+ id: string;
179
+ }
180
+ export interface OrderInformation {
181
+ number: number;
182
+ item: OrderItem;
183
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ErpLoteSerieModule {
2
+ }
@@ -0,0 +1,137 @@
1
+ import { HttpClient, HttpParams } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { MessageService } from "primeng/api";
4
+ import { SortMeta } from "primeng/api";
5
+ export interface ObterNecessidadesInput {
6
+ e070empId?: string;
7
+ e070filId?: string;
8
+ e012famId?: string[];
9
+ itensId?: string[];
10
+ tipo?: string;
11
+ documentoId?: string;
12
+ dataInicial?: string;
13
+ dataFinal?: string;
14
+ situacao?: string[];
15
+ numeroDocumentoPai?: string[];
16
+ codigoDemanda?: number;
17
+ somenteUrgentes?: boolean;
18
+ pageRequest?: {
19
+ offset?: number;
20
+ size?: number;
21
+ orderyBy?: [{
22
+ field: string;
23
+ order: string;
24
+ }];
25
+ };
26
+ }
27
+ export interface ObterNecessidadesOutput {
28
+ total: number;
29
+ necessidades: {
30
+ documento: {
31
+ id: string;
32
+ e070emp: {
33
+ id: string;
34
+ codigo: number;
35
+ descricao: string;
36
+ label: string;
37
+ };
38
+ e070fil: {
39
+ id: string;
40
+ codigo: number;
41
+ descricao: string;
42
+ label: string;
43
+ };
44
+ idExterno: string;
45
+ numeroDocumento: string;
46
+ tipoDocumento: string;
47
+ numeroDocumentoPai: number;
48
+ };
49
+ filial: {
50
+ id: string;
51
+ codigo: number;
52
+ descricao: string;
53
+ label: string;
54
+ };
55
+ id: string;
56
+ item: {
57
+ id: string;
58
+ codigo: string;
59
+ descricao: string;
60
+ label: string;
61
+ tipoItem: string;
62
+ unidadeMedida: {
63
+ id: string;
64
+ uniMed: string;
65
+ desMed: string;
66
+ qtdDec: number;
67
+ familia: {
68
+ id: string;
69
+ codigo: string;
70
+ descricao: string;
71
+ label: string;
72
+ };
73
+ };
74
+ quantidadeOriginal: number;
75
+ quantidadePlanejada: number;
76
+ quantidadeAtendida: number;
77
+ dataEntregaPrevista: string;
78
+ situacao: string;
79
+ demanda: {
80
+ id: string;
81
+ codigo: number;
82
+ empresa: string;
83
+ filial: string;
84
+ quantidade: number;
85
+ dataEntregaPrevista: string;
86
+ documento: string;
87
+ situacao: string;
88
+ realizarReserva: boolean;
89
+ };
90
+ };
91
+ }[];
92
+ }
93
+ export interface GetUrlInput {
94
+ identifiers: {
95
+ domainName: string;
96
+ serviceName: string;
97
+ appName: string;
98
+ route: string;
99
+ }[];
100
+ }
101
+ export interface GetUrlOutput {
102
+ frontends: {
103
+ appName: string;
104
+ currentVersion: string;
105
+ domainName: string;
106
+ embeddedURL: string;
107
+ route: string;
108
+ serviceName: string;
109
+ url: string;
110
+ }[];
111
+ }
112
+ export declare class ErpLoteSeriesService {
113
+ protected http: HttpClient;
114
+ protected messageService: MessageService;
115
+ constructor(http: HttpClient, messageService: MessageService);
116
+ private foundationEntitiesUrl;
117
+ private supEntitiesUrl;
118
+ private queryUrl;
119
+ getProductFamily(productID: string): Observable<unknown>;
120
+ getProductFamilySupplyInfo(familyID: string): Observable<unknown>;
121
+ listBatch(params: any): Observable<unknown>;
122
+ listSeries(params: any): Observable<unknown>;
123
+ getBatch(listParams: ListParams): Observable<unknown>;
124
+ getSerie(listParams: ListParams): Observable<unknown>;
125
+ consultarSaldoEstoque(balancePayload: any): Observable<Object>;
126
+ defaultCatch(): any;
127
+ getListQueryParams(listParams: ListParams): HttpParams;
128
+ getUrl(getUrlInput: GetUrlInput): Observable<unknown>;
129
+ obterNecessidades(obterNecessidadesInput: ObterNecessidadesInput): Observable<ObterNecessidadesOutput>;
130
+ }
131
+ export interface ListParams {
132
+ page?: number;
133
+ size?: number;
134
+ sort?: SortMeta[];
135
+ filterQuery?: string;
136
+ displayFields?: string[];
137
+ }
@@ -0,0 +1,2 @@
1
+ export * from './erp-lote-serie.module';
2
+ export * from './erp-lote-serie.component';
@@ -0,0 +1,202 @@
1
+ import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
3
+ import { TranslateService } from '@ngx-translate/core';
4
+ import { E044CcuLookup, E091PlfLookup } from '@senior-gestao-empresarial/angular-components';
5
+ import { ButtonPriority, ButtonSize, FormField } from '@seniorsistemas/angular-components';
6
+ import { Table } from 'primeng/table';
7
+ import { ErpRateioEditorService } from './erp-rateio-editor.service';
8
+ import { RateioChangeEvent, RateioConta, RateioCCusto, RateioEditorConfig, RateioErrorEvent, RateioSaveEvent, RetornarRateioOutput, TipoMovimento, CriterioRateio, ContaFinanceiraLookup, CentroCustoLookup } from './erp-rateio-editor.types';
9
+ import { MessageService } from 'primeng';
10
+ export declare class ErpRateioEditorComponent implements OnChanges, OnDestroy {
11
+ private readonly fb;
12
+ private readonly service;
13
+ private readonly translate;
14
+ private readonly e091PlfLookup;
15
+ private readonly e044CcuLookup;
16
+ private readonly messageService;
17
+ /** Valor de anaSin que indica registro sintético (não analítico). */
18
+ private static readonly ANA_SIN_SINTETICO;
19
+ idMovimento: string;
20
+ tipoMovimento: TipoMovimento;
21
+ readOnly: boolean;
22
+ showSugestaoButton: boolean;
23
+ config: RateioEditorConfig;
24
+ /**
25
+ * Contexto inicial usado quando o componente é alimentado por inputs em vez da API.
26
+ * Aplica-se ao modo standalone (sem idMovimento) e ao modo conectado com
27
+ * loadFromApi = false. Fornece valorBase, filial, critério, agrupadorId, datas, etc.
28
+ * Em modo conectado sem carga via API, é deste contexto que a gravação
29
+ * (gravarRateioManual) obtém e070fil, criRat, dataBase, dataMovimento e agrupadorId.
30
+ */
31
+ initialContext?: Partial<RetornarRateioOutput>;
32
+ /** Rateios iniciais para popular a grid quando alimentado por inputs. */
33
+ initialRateios?: RateioConta[];
34
+ /**
35
+ * Controla se o rateio deve ser carregado automaticamente via API quando
36
+ * idMovimento está presente (modo conectado). Default: true.
37
+ *
38
+ * Defina como false para restaurar um rateio que o usuário já distribuiu e que
39
+ * ainda não foi persistido no backend de rateio: o componente popula a grid a
40
+ * partir de initialContext/initialRateios e mantém o botão Salvar e a gravação
41
+ * vinculada ao movimento.
42
+ */
43
+ loadFromApi: boolean;
44
+ /**
45
+ * ID da empresa usado para filtrar os lookups de conta financeira e centro de custo.
46
+ * Quando informado, sobrescreve o ID derivado do contexto carregado/inicial.
47
+ */
48
+ empresaId: string;
49
+ /**
50
+ * ID da filial usado pela API de sugestão de rateio.
51
+ * Quando informado, tem prioridade sobre o ID derivado do contexto.
52
+ */
53
+ filialId: string;
54
+ /**
55
+ * Critério de rateio padrão usado pela API de sugestão.
56
+ * Default: 'V3' (Despesas — Conta X C. Custos).
57
+ */
58
+ criRat: CriterioRateio;
59
+ /**
60
+ * ID da conta financeira (e091plf) para filtrar a sugestão de rateio.
61
+ * Quando informado, é enviado como parâmetro na API sugerirRateio.
62
+ */
63
+ e091plfId: string;
64
+ /**
65
+ * ID do centro de custo (e044ccu) para filtrar a sugestão de rateio.
66
+ * Quando informado, é enviado como parâmetro na API sugerirRateio.
67
+ */
68
+ e044ccuId: string;
69
+ /**
70
+ * ID da transação usada para filtrar a sugestão de rateio.
71
+ */
72
+ idTransacao: string;
73
+ /**
74
+ * ID da família usada para filtrar a sugestão de rateio.
75
+ */
76
+ idFamilia: string;
77
+ /**
78
+ * ID da derivação usada para filtrar a sugestão de rateio.
79
+ */
80
+ idDerivacao: string;
81
+ /**
82
+ * ID do serviço usado para filtrar a sugestão de rateio.
83
+ */
84
+ idServico: string;
85
+ /**
86
+ * Valor excedente informado para a sugestão de rateio.
87
+ * Quando informado, é enviado como parâmetro na API sugerirRateio.
88
+ */
89
+ valorExcedente: number;
90
+ /**
91
+ * Código ISO da moeda para formatação de valores na grid (ex: 'BRL', 'USD').
92
+ * Se não informado, usa estilo decimal sem símbolo.
93
+ */
94
+ currencyCode: string;
95
+ save: EventEmitter<RateioSaveEvent>;
96
+ cancel: EventEmitter<void>;
97
+ change: EventEmitter<RateioChangeEvent>;
98
+ error: EventEmitter<RateioErrorEvent>;
99
+ readonly table: Table;
100
+ readonly ButtonPriority: typeof ButtonPriority;
101
+ readonly ButtonSize: typeof ButtonSize;
102
+ formGroup: FormGroup;
103
+ loading: boolean;
104
+ loadedContext: RetornarRateioOutput;
105
+ selection: any[];
106
+ /** Seleção de centros de custo por conta financeira (keyed por idContaFinanceira). */
107
+ ccSelection: {
108
+ [idContaFinanceira: string]: RateioCCusto[];
109
+ };
110
+ gridColumns: any[];
111
+ contasDataSource: RateioConta[];
112
+ editingRowBackup: RateioConta | null;
113
+ editingCCBackup: RateioCCusto | null;
114
+ /** Último valor selecionado no lookup de conta (carrega anaSin para validação). */
115
+ selectedConta: ContaFinanceiraLookup | null;
116
+ /** Último valor selecionado no lookup de centro de custo (carrega anaSin/aceRat). */
117
+ selectedCC: CentroCustoLookup | null;
118
+ displayContaDialog: boolean;
119
+ contaDialogFormGroup: FormGroup;
120
+ contaDialogFields: FormField[];
121
+ editingContaIndex: number | null;
122
+ displayCCDialog: boolean;
123
+ ccDialogFormGroup: FormGroup;
124
+ ccDialogFields: FormField[];
125
+ editingCCContaIndex: number | null;
126
+ editingCCIndex: number | null;
127
+ private readonly ngUnsubscribe;
128
+ get effectiveReadOnly(): boolean;
129
+ get contasFormArray(): FormArray;
130
+ get valorBase(): number;
131
+ get percentualRestante(): number;
132
+ get valorRestante(): number;
133
+ /**
134
+ * Valor restante a ser exibido nos cards de resumo.
135
+ * Considera o total já distribuído nos centros de custo de todas as contas
136
+ * (e não o total das contas financeiras), refletindo a distribuição real
137
+ * ponta-a-ponta — centro de custo é sempre obrigatório.
138
+ */
139
+ get valorRestanteDisplay(): number;
140
+ /**
141
+ * Percentual restante a ser exibido nos cards de resumo.
142
+ * Derivado de `valorRestanteDisplay` para manter consistência com o valor.
143
+ */
144
+ get percentualRestanteDisplay(): number;
145
+ get numberFormatOptions(): any;
146
+ constructor(fb: FormBuilder, service: ErpRateioEditorService, translate: TranslateService, e091PlfLookup: E091PlfLookup, e044CcuLookup: E044CcuLookup, messageService: MessageService);
147
+ ngOnChanges(changes: SimpleChanges): void;
148
+ /** Retorna o conteúdo atual da grid (uso standalone — quem consome lê os rateios daqui). */
149
+ get rateios(): RateioConta[];
150
+ /** Indica se o componente está operando sem idMovimento (modo standalone). */
151
+ get isStandalone(): boolean;
152
+ /**
153
+ * Indica se o componente é alimentado por inputs em vez da API:
154
+ * modo standalone (sem idMovimento) OU modo conectado com loadFromApi = false.
155
+ */
156
+ get isInputDriven(): boolean;
157
+ /** Indica se o componente está pronto para exibir UI (carregou via API OU foi inicializado por inputs). */
158
+ get isReady(): boolean;
159
+ ngOnDestroy(): void;
160
+ onSalvar(): void;
161
+ onSugerir(): void;
162
+ openContaDialog(editIndex?: number): void;
163
+ onSaveContaDialog(): void;
164
+ onHideContaDialog(): void;
165
+ openCCDialog(contaIndex: number, editCCIndex?: number): void;
166
+ onSaveCCDialog(): void;
167
+ onHideCCDialog(): void;
168
+ onDeleteSelected(): void;
169
+ /** Remove os centros de custo selecionados de uma conta financeira. */
170
+ onDeleteSelectedCC(conta: RateioConta): void;
171
+ removerConta(index: number): void;
172
+ removerCentroCusto(contaIndex: number, ccIndex: number): void;
173
+ getContaIndex(rowData: RateioConta): number;
174
+ getCCIndex(conta: RateioConta, cc: RateioCCusto): number;
175
+ /** Inicializa o componente a partir dos inputs (sem chamada à API de carga). */
176
+ private inicializarPorInputs;
177
+ private carregarRateio;
178
+ private popularComRateios;
179
+ /**
180
+ * Distribuição completa: restantes globais e de cada conta iguais a zero.
181
+ * Exposto publicamente para que o template possa reagir ao estado real de
182
+ * completude (contas + centros de custo).
183
+ */
184
+ get distribuicaoCompleta(): boolean;
185
+ /** @deprecated Usar o getter `distribuicaoCompleta`. Mantido para compatibilidade interna. */
186
+ private isDistribuicaoCompleta;
187
+ /** Indica se há ao menos uma conta financeira sem nenhum centro de custo vinculado. */
188
+ private hasContaSemCentroCusto;
189
+ /** Restante de % e de valor dos centros de custo de uma conta igual a zero. */
190
+ private isContaCCCompleta;
191
+ private getContaDialogFields;
192
+ private getCCDialogFields;
193
+ /**
194
+ * Sincroniza os campos percentual e valor de um FormGroup de modal.
195
+ * Quando o usuário altera percentual, recalcula valor (percentual/100 * base).
196
+ * Quando o usuário altera valor, recalcula percentual (valor/base * 100).
197
+ * O argumento getBase retorna a base usada no cálculo (valorBase global ou valorRateadoConta da conta pai).
198
+ */
199
+ private setupPercentualValorSync;
200
+ private getGridColumns;
201
+ private emitChange;
202
+ }
@@ -0,0 +1,18 @@
1
+ import { DistribuicaoRateioManualPlana, RateioConta } from './erp-rateio-editor.types';
2
+ /**
3
+ * Converte entre o modelo plano (recDistribuicaoRateioManual — output de sugerirRateio)
4
+ * e o modelo hierárquico (recRateioConta + recRateioCCusto — usado pelo form e pela gravação).
5
+ */
6
+ export declare class ErpRateioEditorConverter {
7
+ /**
8
+ * Agrupa itens planos por conta financeira (e091plf_id), gerando a estrutura
9
+ * hierárquica esperada pelo form e pela API gravarRateioManual.
10
+ *
11
+ * Regras:
12
+ * - Itens com mesmo e091plf_id são agrupados em uma única RateioConta.
13
+ * - Se e044ccu_id estiver preenchido, gera um RateioCCusto dentro da conta.
14
+ * - Percentual e valor da conta são a soma dos itens agrupados.
15
+ * - Labels (contaFinanceira, descCCusto) ficam vazios — devem ser resolvidos via lookup pelo componente.
16
+ */
17
+ static sugestaoPlanaParaHierarquica(planas: DistribuicaoRateioManualPlana[]): RateioConta[];
18
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ErpRateioEditorModule {
2
+ }
@@ -0,0 +1,17 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { MessageService } from 'primeng/api';
3
+ import { Observable } from 'rxjs';
4
+ import { GravarRateioManualInput, RetornarRateioInput, RetornarRateioOutput, SugerirRateioInput, SugestaoRateio } from './erp-rateio-editor.types';
5
+ export declare class ErpRateioEditorService {
6
+ private readonly http;
7
+ private readonly messageService;
8
+ private readonly baseQueries;
9
+ private readonly baseActions;
10
+ constructor(http: HttpClient, messageService: MessageService);
11
+ retornarRateio(input: RetornarRateioInput): Observable<RetornarRateioOutput>;
12
+ sugerirRateio(input: SugerirRateioInput): Observable<{
13
+ sugestao: SugestaoRateio[];
14
+ }>;
15
+ gravarRateioManual(input: GravarRateioManualInput): Observable<void>;
16
+ private defaultCatch;
17
+ }