From de19cc5de2954a8c502fe096bd538942518879a1 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:07:14 +0700 Subject: [PATCH 01/34] feat(FE-331): create PermissionNotFound component --- src/components/helper/PermissionNotFound.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/components/helper/PermissionNotFound.tsx diff --git a/src/components/helper/PermissionNotFound.tsx b/src/components/helper/PermissionNotFound.tsx new file mode 100644 index 00000000..75e48c62 --- /dev/null +++ b/src/components/helper/PermissionNotFound.tsx @@ -0,0 +1,12 @@ +const PermissionNotFound = () => { + return ( +
+

Permission Not Found

+

+ You do not have permission to access this page. +

+
+ ); +}; + +export default PermissionNotFound; From 88b8767ca4264dc332cd3ab67bf9e0cb6a86c3c1 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:07:24 +0700 Subject: [PATCH 02/34] chore: lint --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee8a79a5..935cac46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,8 +165,6 @@ deploy:staging: environment: name: staging url: https://stg-lti-erp.mbugroup.id - - # ====== PRODUCTION ====== # build:production: # <<: *build_template From 4643a39c3ea6d4e7093643dfdd1509968cda07ef Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:07:38 +0700 Subject: [PATCH 03/34] feat(FE-331): create RequirePermission helper component --- src/components/helper/RequirePermission.tsx | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/components/helper/RequirePermission.tsx diff --git a/src/components/helper/RequirePermission.tsx b/src/components/helper/RequirePermission.tsx new file mode 100644 index 00000000..2a7061ed --- /dev/null +++ b/src/components/helper/RequirePermission.tsx @@ -0,0 +1,28 @@ +'use client'; + +import { useAuth } from '@/services/hooks/useAuth'; + +interface RequirePermissionProps { + children: React.ReactNode; + permissions: string | string[]; +} + +const RequirePermission = ({ + children, + permissions, +}: RequirePermissionProps) => { + const { permissionCheck } = useAuth(); + + const isPermitted = + typeof permissions === 'string' + ? permissionCheck(permissions) + : permissions.some((permission) => permissionCheck(permission)); + + if (!isPermitted) { + return null; + } + + return <>{children}; +}; + +export default RequirePermission; From 574fb3b3719c1bf786bda86d2df1739b7137b845 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:07:55 +0700 Subject: [PATCH 04/34] feat(FE-331): create ROUTE_PERMISSION constant --- src/config/route-permission.ts | 150 +++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 src/config/route-permission.ts diff --git a/src/config/route-permission.ts b/src/config/route-permission.ts new file mode 100644 index 00000000..f25de019 --- /dev/null +++ b/src/config/route-permission.ts @@ -0,0 +1,150 @@ +export const ROUTE_PERMISSIONS: Record = { + '/': ['lti.dashboard.list'], + + // Dashboard + '/dashboard/': ['lti.dashboard.list'], + + // Production + // Production - Project Flock + '/production/project-flock/': ['lti.production.project_flocks.list'], + '/production/project-flock/add/': ['lti.production.project_flocks.create'], + '/production/project-flock/detail/': ['lti.production.project_flocks.detail'], + '/production/project-flock/detail/edit/': [ + 'lti.production.project_flocks.update', + ], + '/production/project-flock/chickin/add/kandang/': [ + 'lti.production.chickins.create', + ], + '/production/project-flock/closing/': [ + 'lti.production.project_flock_kandangs.closing', + ], + + // Production - Recording + '/production/recording/': ['lti.production.recording.list'], + '/production/recording/add/': ['lti.production.recording.create'], + '/production/recording/detail/': ['lti.production.recording.detail'], + '/production/recording/detail/edit/': ['lti.production.recording.update'], + + // Production - Transfer to Laying + '/production/transfer-to-laying/': ['lti.production.transfer_to_laying.list'], + '/production/transfer-to-laying/add/': [ + 'lti.production.transfer_to_laying.create', + ], + '/production/transfer-to-laying/detail/': [ + 'lti.production.transfer_to_laying.detail', + ], + '/production/transfer-to-laying/detail/edit/': [ + 'lti.production.transfer_to_laying.update', + ], + + // Purchase + '/purchase/': ['lti.purchase.list'], + '/purchase/add/': ['lti.purchase.create'], + '/purchase/detail/': ['lti.purchase.detail'], + '/purchase/detail/edit/': ['lti.purchase.update'], + + // Marketing + '/marketing/': ['lti.marketing.delivery_order.list'], + '/marketing/add/delivery-orders/': ['lti.marketing.delivery_order.create'], + '/marketing/add/sales-orders/': ['lti.marketing.sales_order.create'], + '/marketing/detail/': ['lti.marketing.detail'], + '/marketing/detail/delivery-orders/edit/': [ + 'lti.marketing.delivery_order.update', + ], + '/marketing/detail/sales-orders/edit/': ['lti.marketing.sales_order.update'], + + // Expense + '/expense/': ['lti.expense.list'], + '/expense/add/': ['lti.expense.create'], + '/expense/detail/': ['lti.expense.detail'], + '/expense/detail/edit/': ['lti.expense.update'], + '/expense/realization/': ['lti.expense.create.realization'], + '/expense/realization/edit/': ['lti.expense.update.realization'], + + // Closing + '/closing/': ['lti.closing.list'], + '/closing/detail/': ['lti.closing.detail'], + + // Inventory + '/inventory/adjustment': ['lti.inventory.list'], + '/inventory/adjustment/add': ['lti.inventory.create'], + '/inventory/adjustment/detail': ['lti.inventory.detail'], + '/inventory/movement': ['lti.inventory.transfer.list'], + '/inventory/movement/add': ['lti.inventory.transfer.create'], + '/inventory/movement/detail': ['lti.inventory.transfer.detail'], + '/inventory/movement/detail/edit': ['lti.inventory.transfer.update'], + '/inventory/product': ['lti.inventory.product_stock.list'], + '/inventory/product/detail': ['lti.inventory.product_stock.detail'], + + // Master Data + '/master-data/product/': ['lti.master.products.list'], + '/master-data/product/add/': ['lti.master.products.create'], + '/master-data/product/detail/': ['lti.master.products.detail'], + '/master-data/product/detail/edit/': ['lti.master.products.update'], + + '/master-data/product-category/': ['lti.master.product_categories.list'], + '/master-data/product-category/add/': [ + 'lti.master.product_categories.create', + ], + '/master-data/product-category/detail/': [ + 'lti.master.product_categories.detail', + ], + '/master-data/product-category/detail/edit/': [ + 'lti.master.product_categories.update', + ], + + '/master-data/bank/': ['lti.master.banks.list'], + '/master-data/bank/add/': ['lti.master.banks.create'], + '/master-data/bank/detail/': ['lti.master.banks.detail'], + '/master-data/bank/detail/edit/': ['lti.master.banks.update'], + + '/master-data/area/': ['lti.master.area.list'], + '/master-data/area/add/': ['lti.master.area.create'], + '/master-data/area/detail/': ['lti.master.area.detail'], + '/master-data/area/detail/edit/': ['lti.master.area.update'], + + '/master-data/location/': ['lti.master.locations.list'], + '/master-data/location/add/': ['lti.master.locations.create'], + '/master-data/location/detail/': ['lti.master.locations.detail'], + '/master-data/location/detail/edit/': ['lti.master.locations.update'], + + '/master-data/kandang/': ['lti.master.kandangs.list'], + '/master-data/kandang/add/': ['lti.master.kandangs.create'], + '/master-data/kandang/detail/': ['lti.master.kandangs.detail'], + '/master-data/kandang/detail/edit/': ['lti.master.kandangs.update'], + + '/master-data/warehouse/': ['lti.master.warehouses.list'], + '/master-data/warehouse/add/': ['lti.master.warehouses.create'], + '/master-data/warehouse/detail/': ['lti.master.warehouses.detail'], + '/master-data/warehouse/detail/edit/': ['lti.master.warehouses.update'], + + '/master-data/customer/': ['lti.master.customer.list'], + '/master-data/customer/add/': ['lti.master.customer.create'], + '/master-data/customer/detail/': ['lti.master.customer.detail'], + '/master-data/customer/detail/edit/': ['lti.master.customer.update'], + + '/master-data/uom/': ['lti.master.uoms.list'], + '/master-data/uom/add/': ['lti.master.uoms.create'], + '/master-data/uom/detail/': ['lti.master.uoms.detail'], + '/master-data/uom/detail/edit/': ['lti.master.uoms.update'], + + '/master-data/nonstock/': ['lti.master.nonstocks.list'], + '/master-data/nonstock/add/': ['lti.master.nonstocks.create'], + '/master-data/nonstock/detail/': ['lti.master.nonstocks.detail'], + '/master-data/nonstock/detail/edit/': ['lti.master.nonstocks.update'], + + '/master-data/fcr/': ['lti.master.fcr.list'], + '/master-data/fcr/add/': ['lti.master.fcr.create'], + '/master-data/fcr/detail/': ['lti.master.fcr.detail'], + '/master-data/fcr/detail/edit/': ['lti.master.fcr.update'], + + '/master-data/supplier/': ['lti.master.suppliers.list'], + '/master-data/supplier/add/': ['lti.master.suppliers.create'], + '/master-data/supplier/detail/': ['lti.master.suppliers.detail'], + '/master-data/supplier/detail/edit/': ['lti.master.suppliers.update'], + + '/master-data/flock/': ['lti.master.flocks.list'], + '/master-data/flock/add/': ['lti.master.flocks.create'], + '/master-data/flock/detail/': ['lti.master.flocks.detail'], + '/master-data/flock/detail/edit/': ['lti.master.flocks.update'], +}; From 1f9992c1c8737debfa6a3aa5a2a74f882a0426b3 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:08:16 +0700 Subject: [PATCH 05/34] feat(FE-331): add permissions to MAIN_DRAWER_LINKS --- src/config/constant.ts | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/config/constant.ts b/src/config/constant.ts index 96fc8401..06ad9c28 100644 --- a/src/config/constant.ts +++ b/src/config/constant.ts @@ -10,14 +10,20 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ text: 'Produksi', link: '/production', icon: 'heroicons-outline:wrench-screwdriver', + permission: [ + 'lti.production.project_flocks.list', + 'lti.production.recording.list', + ], submenu: [ { text: 'Daftar Flock', link: '/production/project-flock', + permission: ['lti.production.project_flocks.list'], }, { text: 'Recording', link: '/production/recording', + permission: ['lti.production.recording.list'], }, { text: 'Transfer to Laying', @@ -29,6 +35,7 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ text: 'Pembelian', link: '/purchase', icon: 'heroicons-outline:shopping-cart', + permission: ['lti.purchase.list'], }, { text: 'Penjualan', @@ -39,28 +46,38 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ text: 'Biaya Operasional', link: '/expense', icon: 'heroicons:wallet', + permission: ['lti.expense.list'], }, { text: 'Closing', link: '/closing', icon: 'heroicons-outline:presentation-chart-bar', + permission: ['lti.closing.list'], }, { text: 'Persediaan', link: '/inventory', icon: 'heroicons-outline:folder', + permission: [ + 'lti.inventory.product_stock.list', + 'lti.inventory.product_warehouses.list', + 'lti.inventory.transfer.list', + ], submenu: [ { text: 'Produk', link: '/inventory/product', + permission: ['lti.inventory.product_stock.list'], }, { text: 'Penyesuaian Stok', link: '/inventory/adjustment', + permission: ['lti.inventory.product_stock.list'], }, { text: 'Transfer Stok', link: '/inventory/movement', + permission: ['lti.inventory.transfer.list'], }, ], }, @@ -68,58 +85,86 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ text: 'Master Data', link: '/master-data', icon: 'heroicons-outline:circle-stack', + permission: [ + 'lti.master.area.list', + 'lti.master.banks.list', + 'lti.master.customer.list', + 'lti.master.fcr.list', + 'lti.master.flocks.list', + 'lti.master.kandangs.list', + 'lti.master.locations.list', + 'lti.master.nonstocks.list', + 'lti.master.product_categories.list', + 'lti.master.products.list', + 'lti.master.suppliers.list', + 'lti.master.uoms.list', + 'lti.master.warehouses.list', + ], submenu: [ { text: 'Produk', link: '/master-data/product', + permission: ['lti.master.products.list'], }, { text: 'Kategori Produk', link: '/master-data/product-category', + permission: ['lti.master.product_categories.list'], }, { text: 'Bank', link: '/master-data/bank', + permission: ['lti.master.banks.list'], }, { text: 'Area', link: '/master-data/area', + permission: ['lti.master.area.list'], }, { text: 'Lokasi', link: '/master-data/location', + permission: ['lti.master.locations.list'], }, { text: 'Kandang', link: '/master-data/kandang', + permission: ['lti.master.kandangs.list'], }, { text: 'Warehouse', link: '/master-data/warehouse', + permission: ['lti.master.warehouses.list'], }, { text: 'Customer', link: '/master-data/customer', + permission: ['lti.master.customer.list'], }, { text: 'UOM', link: '/master-data/uom', + permission: ['lti.master.uoms.list'], }, { text: 'Non-Stock', link: '/master-data/nonstock', + permission: ['lti.master.nonstocks.list'], }, { text: 'FCR', link: '/master-data/fcr', + permission: ['lti.master.fcr.list'], }, { text: 'Supplier', link: '/master-data/supplier', + permission: ['lti.master.suppliers.list'], }, { text: 'Flock', link: '/master-data/flock', + permission: ['lti.master.flocks.list'], }, ], }, From 9e895af62a1236821546beb5e1e1663fd1e97dec Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:08:39 +0700 Subject: [PATCH 06/34] chore: refresh user data every 13 minutes --- src/components/helper/RequireAuth.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/helper/RequireAuth.tsx b/src/components/helper/RequireAuth.tsx index 65adf48c..9dbd2557 100644 --- a/src/components/helper/RequireAuth.tsx +++ b/src/components/helper/RequireAuth.tsx @@ -27,6 +27,9 @@ const RequireAuth = ({ children }: RequireAuthProps) => { SWRHttpKey >('/sso/userinfo', httpClientFetcher, { shouldRetryOnError: false, + + // refresh every 13 minutes + refreshInterval: 13 * 60 * 1000, }); useEffect(() => { From a3be3de3387338e39418c64da06c688ef7fa6d16 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:09:06 +0700 Subject: [PATCH 07/34] feat(FE-331): return PermissionNotFound component if user is not permitted --- src/components/MainDrawer.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/MainDrawer.tsx b/src/components/MainDrawer.tsx index 3a09c0b1..fc8cbb18 100644 --- a/src/components/MainDrawer.tsx +++ b/src/components/MainDrawer.tsx @@ -9,10 +9,13 @@ import Drawer from '@/components/Drawer'; import Navbar from '@/components/Navbar'; import Button from '@/components/Button'; import SidebarMenu from '@/components/molecules/SidebarMenu'; +import PermissionNotFound from '@/components/helper/PermissionNotFound'; import { useUiStore } from '@/stores/ui/ui.store'; import { MAIN_DRAWER_LINKS } from '@/config/constant'; import { isPathActive } from '@/lib/helper'; +import { ROUTE_PERMISSIONS } from '@/config/route-permission'; +import { useAuth } from '@/services/hooks/useAuth'; const MainDrawerContent = () => { const pathname = usePathname(); @@ -62,6 +65,11 @@ const MainDrawer = ({ }>) => { const { mainDrawerOpen, setMainDrawerOpen } = useUiStore(); const pathname = usePathname(); + const { permissionCheck } = useAuth(); + + const isPermitted = ROUTE_PERMISSIONS[pathname]?.some((permission) => + permissionCheck(permission) + ); const getPageTitle = useCallback(() => { let title = ''; @@ -101,6 +109,10 @@ const MainDrawer = ({ setMainDrawerOpen(!mainDrawerOpen); }; + if (!isPermitted) { + return ; + } + return ( Date: Tue, 23 Dec 2025 12:09:49 +0700 Subject: [PATCH 08/34] feat(FE-331): only show menu if user has the permission --- src/components/molecules/SidebarMenu.tsx | 27 ++++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/components/molecules/SidebarMenu.tsx b/src/components/molecules/SidebarMenu.tsx index 6a217dcc..4b85c2c8 100644 --- a/src/components/molecules/SidebarMenu.tsx +++ b/src/components/molecules/SidebarMenu.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; import Menu from '@/components/menu/Menu'; import { Icon } from '@iconify/react'; import { cn, isPathActive } from '@/lib/helper'; +import { useAuth } from '@/services/hooks/useAuth'; export interface SidebarMenuItem { type?: 'item' | 'title'; @@ -9,6 +10,7 @@ export interface SidebarMenuItem { link: string; icon?: string; submenu?: SidebarMenuItem[]; + permission?: string[]; } interface SidebarMenuItemProps { @@ -22,8 +24,17 @@ interface SidebarMenuProps { } const SidebarMenuItem = ({ item, activeLink }: SidebarMenuItemProps) => { + const { permissionCheck } = useAuth(); const isItemActive = isPathActive(activeLink, item.link); + const isUserPermitted = item.permission + ? item.permission?.some((permissionName) => permissionCheck(permissionName)) + : true; + + if (!isUserPermitted) { + return null; + } + const menuItemWithoutSubmenu = (
  • { const SidebarMenu = ({ menu, activeLink }: SidebarMenuProps) => { return ( - {menu.map((menuItem, menuIdx) => ( - - ))} + {menu.map((menuItem, menuIdx) => { + return ( + + ); + })} ); }; From addfaff6920cd9965e30bdcfd49c8f1476c8ccc0 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 12:10:07 +0700 Subject: [PATCH 09/34] feat(FE-331): implement permission guard in master data --- .../pages/master-data/area/AreasTable.tsx | 95 +++++++++------- .../pages/master-data/area/form/AreaForm.tsx | 45 ++++---- .../pages/master-data/bank/BanksTable.tsx | 93 ++++++++------- .../pages/master-data/bank/form/BankForm.tsx | 45 ++++---- .../master-data/customer/CustomersTable.tsx | 89 ++++++++------- .../customer/form/CustomerForm.tsx | 45 ++++---- .../pages/master-data/fcr/FcrsTable.tsx | 93 ++++++++------- .../pages/master-data/fcr/form/FcrForm.tsx | 45 ++++---- .../pages/master-data/flock/FlocksTable.tsx | 107 ++++++++++-------- .../master-data/flock/form/FlockForm.tsx | 43 +++---- .../master-data/kandang/KandangsTable.tsx | 95 +++++++++------- .../master-data/kandang/form/KandangForm.tsx | 45 ++++---- .../master-data/location/LocationsTable.tsx | 95 +++++++++------- .../location/form/LocationForm.tsx | 45 ++++---- .../master-data/nonstock/NonstocksTable.tsx | 93 ++++++++------- .../nonstock/form/NonstockForm.tsx | 45 ++++---- .../product-category/ProductCategoryTable.tsx | 91 ++++++++------- .../form/ProductCategoryForm.tsx | 45 ++++---- .../master-data/product/ProductTable.tsx | 89 ++++++++------- .../master-data/product/form/ProductForm.tsx | 43 +++---- .../master-data/supplier/SupplierTable.tsx | 107 ++++++++++-------- .../supplier/form/SupplierForm.tsx | 45 ++++---- .../pages/master-data/uom/UomsTable.tsx | 93 ++++++++------- .../pages/master-data/uom/form/UomForm.tsx | 45 ++++---- .../master-data/warehouse/WarehousesTable.tsx | 93 ++++++++------- .../warehouse/form/WarehouseForm.tsx | 45 ++++---- 26 files changed, 1002 insertions(+), 812 deletions(-) diff --git a/src/components/pages/master-data/area/AreasTable.tsx b/src/components/pages/master-data/area/AreasTable.tsx index 207fb8a6..45c4fdff 100644 --- a/src/components/pages/master-data/area/AreasTable.tsx +++ b/src/components/pages/master-data/area/AreasTable.tsx @@ -15,6 +15,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Area } from '@/types/api/master-data/area'; import { AreaApi } from '@/services/api/master-data'; @@ -34,40 +35,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -192,15 +199,19 @@ const AreasTable = () => {
    - +
    + + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/bank/BanksTable.tsx b/src/components/pages/master-data/bank/BanksTable.tsx index 58b09ef8..f28f4bd0 100644 --- a/src/components/pages/master-data/bank/BanksTable.tsx +++ b/src/components/pages/master-data/bank/BanksTable.tsx @@ -15,6 +15,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Bank } from '@/types/api/master-data/bank'; import { BankApi } from '@/services/api/master-data'; @@ -34,40 +35,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -205,15 +212,17 @@ const BanksTable = () => {
    - + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/customer/CustomersTable.tsx b/src/components/pages/master-data/customer/CustomersTable.tsx index 89401638..3e442620 100644 --- a/src/components/pages/master-data/customer/CustomersTable.tsx +++ b/src/components/pages/master-data/customer/CustomersTable.tsx @@ -9,6 +9,7 @@ import Table from '@/components/Table'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { ROWS_OPTIONS } from '@/config/constant'; import { isResponseSuccess } from '@/lib/api-helper'; import { cn } from '@/lib/helper'; @@ -32,38 +33,44 @@ const RowOptionsMenu = ({ }) => { return ( - - - + > + + Detail + + + + + + + + ); }; @@ -200,15 +207,17 @@ const CustomersTable = () => {
    - + + +
    {formType !== 'add' && (
    - - - {formType !== 'edit' && ( + + + + {formType !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/fcr/FcrsTable.tsx b/src/components/pages/master-data/fcr/FcrsTable.tsx index b582222e..2d65a406 100644 --- a/src/components/pages/master-data/fcr/FcrsTable.tsx +++ b/src/components/pages/master-data/fcr/FcrsTable.tsx @@ -15,6 +15,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Fcr } from '@/types/api/master-data/fcr'; import { FcrApi } from '@/services/api/master-data'; @@ -34,40 +35,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -192,15 +199,17 @@ const FcrsTable = () => {
    - + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/flock/FlocksTable.tsx b/src/components/pages/master-data/flock/FlocksTable.tsx index 5350c518..ce8f701a 100644 --- a/src/components/pages/master-data/flock/FlocksTable.tsx +++ b/src/components/pages/master-data/flock/FlocksTable.tsx @@ -13,6 +13,7 @@ import { useModal } from '@/components/Modal'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import toast from 'react-hot-toast'; import DebouncedTextInput from '@/components/input/DebouncedTextInput'; import SelectInput, { OptionType } from '@/components/input/SelectInput'; @@ -32,48 +33,54 @@ const RowsOptions = ({ }) => { return ( - - + + + - + > + + Detail + + + + + ); }; @@ -196,15 +203,17 @@ const FlockTable = () => {
    - + + +
    {
    {formType !== 'add' && (
    - - {formType !== 'edit' && ( + + + {formType !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/kandang/KandangsTable.tsx b/src/components/pages/master-data/kandang/KandangsTable.tsx index eebc490a..1bd7badb 100644 --- a/src/components/pages/master-data/kandang/KandangsTable.tsx +++ b/src/components/pages/master-data/kandang/KandangsTable.tsx @@ -20,6 +20,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Kandang } from '@/types/api/master-data/kandang'; import { KandangApi } from '@/services/api/master-data'; @@ -39,40 +40,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -243,15 +250,19 @@ const KandangsTable = () => {
    - +
    + + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/location/LocationsTable.tsx b/src/components/pages/master-data/location/LocationsTable.tsx index 19f11298..10fe46c9 100644 --- a/src/components/pages/master-data/location/LocationsTable.tsx +++ b/src/components/pages/master-data/location/LocationsTable.tsx @@ -20,6 +20,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Location } from '@/types/api/master-data/location'; import { LocationApi } from '@/services/api/master-data'; @@ -39,40 +40,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -230,15 +237,19 @@ const LocationsTable = () => {
    - +
    + + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/nonstock/NonstocksTable.tsx b/src/components/pages/master-data/nonstock/NonstocksTable.tsx index ae38c573..7066c19a 100644 --- a/src/components/pages/master-data/nonstock/NonstocksTable.tsx +++ b/src/components/pages/master-data/nonstock/NonstocksTable.tsx @@ -20,6 +20,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Nonstock } from '@/types/api/master-data/nonstock'; import { NonstockApi } from '@/services/api/master-data'; @@ -39,40 +40,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -242,15 +249,17 @@ const NonstocksTable = () => {
    - + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/product-category/ProductCategoryTable.tsx b/src/components/pages/master-data/product-category/ProductCategoryTable.tsx index 1a6e641c..a9b98bcb 100644 --- a/src/components/pages/master-data/product-category/ProductCategoryTable.tsx +++ b/src/components/pages/master-data/product-category/ProductCategoryTable.tsx @@ -15,6 +15,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { ProductCategory } from '@/types/api/master-data/product-category'; import { ProductCategoryApi } from '@/services/api/master-data'; @@ -34,38 +35,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - + > + + Detail + + + + + + + + + + ); }; @@ -193,15 +202,17 @@ const ProductCategoryTable = () => {
    - + + +
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/product/ProductTable.tsx b/src/components/pages/master-data/product/ProductTable.tsx index 2a94656c..957d0551 100644 --- a/src/components/pages/master-data/product/ProductTable.tsx +++ b/src/components/pages/master-data/product/ProductTable.tsx @@ -20,6 +20,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Product } from '@/types/api/master-data/product'; import { ProductApi } from '@/services/api/master-data'; @@ -38,38 +39,44 @@ const RowOptionsMenu = ({ deleteClickHandler: () => void; }) => ( - - - + > + + Detail + + + + + + + + ); @@ -273,15 +280,17 @@ const ProductsTable = () => {
    - + + +
    {
    {type !== 'add' && (
    - - {type !== 'edit' && ( + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/supplier/SupplierTable.tsx b/src/components/pages/master-data/supplier/SupplierTable.tsx index da84afc0..3e10c9c8 100644 --- a/src/components/pages/master-data/supplier/SupplierTable.tsx +++ b/src/components/pages/master-data/supplier/SupplierTable.tsx @@ -9,6 +9,7 @@ import Table from '@/components/Table'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { ROWS_OPTIONS } from '@/config/constant'; import { isResponseSuccess } from '@/lib/api-helper'; import { cn } from '@/lib/helper'; @@ -32,48 +33,54 @@ const RowOptions = ({ }) => { return ( - - + + + - + > + + Edit + + + + + ); }; @@ -219,15 +226,17 @@ const SuppliersTable = () => {
    - + + +
    {formType !== 'add' && (
    - - - {formType !== 'edit' && ( + + + + {formType !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/uom/UomsTable.tsx b/src/components/pages/master-data/uom/UomsTable.tsx index edf67f34..851647b9 100644 --- a/src/components/pages/master-data/uom/UomsTable.tsx +++ b/src/components/pages/master-data/uom/UomsTable.tsx @@ -15,6 +15,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Uom } from '@/types/api/master-data/uom'; import { UomApi } from '@/services/api/master-data'; @@ -34,40 +35,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -192,15 +199,17 @@ const UomsTable = () => {
    - + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} diff --git a/src/components/pages/master-data/warehouse/WarehousesTable.tsx b/src/components/pages/master-data/warehouse/WarehousesTable.tsx index a61f6f5b..fe694322 100644 --- a/src/components/pages/master-data/warehouse/WarehousesTable.tsx +++ b/src/components/pages/master-data/warehouse/WarehousesTable.tsx @@ -20,6 +20,7 @@ import SelectInput, { OptionType } from '@/components/input/SelectInput'; import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Warehouse } from '@/types/api/master-data/warehouse'; import { WarehouseApi } from '@/services/api/master-data'; @@ -39,40 +40,46 @@ const RowOptionsMenu = ({ }) => { return ( - - - - - + > + + Detail + + + + + + + + + + ); }; @@ -270,15 +277,17 @@ const WarehousesTable = () => {
    - + + +
    {
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} From fcfd2fb576f29e096aa658dbcf2e4f4219eaeaf7 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 15:55:50 +0700 Subject: [PATCH 10/34] Merge branch 'feat/FE/US-304/permission-guard' into feat/FE/US-304/permission-guard-master-data From a200dac23cfb62daeb5801911c9fbb12f3a9f7be Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 16:39:08 +0700 Subject: [PATCH 11/34] chore(FE-331): fix inventory route path --- src/config/route-permission.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/config/route-permission.ts b/src/config/route-permission.ts index f25de019..49e3ff39 100644 --- a/src/config/route-permission.ts +++ b/src/config/route-permission.ts @@ -66,15 +66,15 @@ export const ROUTE_PERMISSIONS: Record = { '/closing/detail/': ['lti.closing.detail'], // Inventory - '/inventory/adjustment': ['lti.inventory.list'], - '/inventory/adjustment/add': ['lti.inventory.create'], - '/inventory/adjustment/detail': ['lti.inventory.detail'], - '/inventory/movement': ['lti.inventory.transfer.list'], - '/inventory/movement/add': ['lti.inventory.transfer.create'], - '/inventory/movement/detail': ['lti.inventory.transfer.detail'], - '/inventory/movement/detail/edit': ['lti.inventory.transfer.update'], - '/inventory/product': ['lti.inventory.product_stock.list'], - '/inventory/product/detail': ['lti.inventory.product_stock.detail'], + '/inventory/adjustment/': ['lti.inventory.list'], + '/inventory/adjustment/add/': ['lti.inventory.create'], + '/inventory/adjustment/detail/': ['lti.inventory.detail'], + '/inventory/movement/': ['lti.inventory.transfer.list'], + '/inventory/movement/add/': ['lti.inventory.transfer.create'], + '/inventory/movement/detail/': ['lti.inventory.transfer.detail'], + '/inventory/movement/detail/edit/': ['lti.inventory.transfer.update'], + '/inventory/product/': ['lti.inventory.product_stock.list'], + '/inventory/product/detail/': ['lti.inventory.product_stock.detail'], // Master Data '/master-data/product/': ['lti.master.products.list'], From de63b6721af6755ca0aa265ebe9bd493b854c620 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 23 Dec 2025 16:40:32 +0700 Subject: [PATCH 12/34] feat(FE-331): implement permission guard in inventory --- .../adjustment/InventoryAdjustmentTable.tsx | 21 ++++++---- .../inventory/movement/MovementTable.tsx | 41 +++++++++++-------- .../product/InventoryProductTable.tsx | 21 ++++++---- 3 files changed, 47 insertions(+), 36 deletions(-) diff --git a/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx b/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx index a3de8a34..7612a081 100644 --- a/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx +++ b/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx @@ -4,6 +4,7 @@ import Badge from '@/components/Badge'; import Button from '@/components/Button'; import SelectInput, { OptionType } from '@/components/input/SelectInput'; import Table from '@/components/Table'; +import RequirePermission from '@/components/helper/RequirePermission'; import { ROWS_OPTIONS } from '@/config/constant'; import { isResponseSuccess } from '@/lib/api-helper'; import { cn } from '@/lib/helper'; @@ -175,15 +176,17 @@ const InventoryAdjustmentTable = () => {
    - + + + {/* ; }) => ( - + + + ); @@ -145,15 +148,17 @@ const MovementTable = () => {
    - + + +
    ; }) => ( - + + + ); From 36ff6d04ee4f243b8612a7ac33d758442cf8d49b Mon Sep 17 00:00:00 2001 From: randy-ar Date: Tue, 23 Dec 2025 17:38:16 +0700 Subject: [PATCH 13/34] feat(FE-337): init slicing UI and define data types --- src/app/finance/add/initial-balance/page.tsx | 5 + src/app/finance/add/page.tsx | 5 + src/app/finance/adjust/page.tsx | 5 + src/app/finance/detail/layout.tsx | 11 + src/app/finance/detail/page.tsx | 41 + src/app/finance/page.tsx | 32 + .../pages/finance/FinanceDetail.tsx | 143 + src/components/pages/finance/FinanceTable.tsx | 97 + .../pages/finance/add/FinanceAdd.schema.ts | 0 .../pages/finance/add/FinanceAdd.tsx | 0 .../FinanceAddInitialBalance.schema.ts | 0 .../FinanceAddInitialBalance.tsx | 0 .../finance/adjust/FinanceAdjust.schema.ts | 0 .../pages/finance/adjust/FinanceAdjust.tsx | 5 + src/config/constant.ts | 6 +- src/dummy/finance/finance.dummy.json | 2702 +++++++++++++++++ src/dummy/finance/finance.dummy.ts | 52 + src/services/api/finance.ts | 60 + src/types/api/finance/finance.d.ts | 31 + 19 files changed, 3194 insertions(+), 1 deletion(-) create mode 100644 src/app/finance/add/initial-balance/page.tsx create mode 100644 src/app/finance/add/page.tsx create mode 100644 src/app/finance/adjust/page.tsx create mode 100644 src/app/finance/detail/layout.tsx create mode 100644 src/app/finance/detail/page.tsx create mode 100644 src/app/finance/page.tsx create mode 100644 src/components/pages/finance/FinanceDetail.tsx create mode 100644 src/components/pages/finance/FinanceTable.tsx create mode 100644 src/components/pages/finance/add/FinanceAdd.schema.ts create mode 100644 src/components/pages/finance/add/FinanceAdd.tsx create mode 100644 src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.schema.ts create mode 100644 src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.tsx create mode 100644 src/components/pages/finance/adjust/FinanceAdjust.schema.ts create mode 100644 src/components/pages/finance/adjust/FinanceAdjust.tsx create mode 100644 src/dummy/finance/finance.dummy.json create mode 100644 src/dummy/finance/finance.dummy.ts create mode 100644 src/services/api/finance.ts create mode 100644 src/types/api/finance/finance.d.ts diff --git a/src/app/finance/add/initial-balance/page.tsx b/src/app/finance/add/initial-balance/page.tsx new file mode 100644 index 00000000..036cb049 --- /dev/null +++ b/src/app/finance/add/initial-balance/page.tsx @@ -0,0 +1,5 @@ +const FinanceAddInitialBalance = () => { + return
    Initial Balance
    ; +}; + +export default FinanceAddInitialBalance; diff --git a/src/app/finance/add/page.tsx b/src/app/finance/add/page.tsx new file mode 100644 index 00000000..93ab79fb --- /dev/null +++ b/src/app/finance/add/page.tsx @@ -0,0 +1,5 @@ +const FinanceAdd = () => { + return
    Finance Add
    ; +}; + +export default FinanceAdd; diff --git a/src/app/finance/adjust/page.tsx b/src/app/finance/adjust/page.tsx new file mode 100644 index 00000000..3536892d --- /dev/null +++ b/src/app/finance/adjust/page.tsx @@ -0,0 +1,5 @@ +const FinanceAdjust = () => { + return
    Finance Adjust
    ; +}; + +export default FinanceAdjust; diff --git a/src/app/finance/detail/layout.tsx b/src/app/finance/detail/layout.tsx new file mode 100644 index 00000000..7220dfa1 --- /dev/null +++ b/src/app/finance/detail/layout.tsx @@ -0,0 +1,11 @@ +import SuspenseHelper from '@/components/helper/SuspenseHelper'; + +const Layout = ({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) => { + return {children}; +}; + +export default Layout; diff --git a/src/app/finance/detail/page.tsx b/src/app/finance/detail/page.tsx new file mode 100644 index 00000000..8807205a --- /dev/null +++ b/src/app/finance/detail/page.tsx @@ -0,0 +1,41 @@ +'use client'; + +import FinanceDetail from '@/components/pages/finance/FinanceDetail'; +import useSWR from 'swr'; +import { useRouter, useSearchParams } from 'next/navigation'; +import { FinanceApi } from '@/services/api/finance'; +import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; + +const FinanceDetailPage = () => { + const router = useRouter(); + const financeId = useSearchParams().get('financeId'); + + const { data: finance } = useSWR(financeId, () => + FinanceApi.getSingleFetcher(financeId as string) + ); + + if (!financeId) { + router.back(); + + return ( +
    + +
    + ); + } + + console.log(finance); + + // if (!finance || isResponseError(finance)) { + // router.replace('/404'); + // return; + // } + + return ( + <> + {isResponseSuccess(finance) && } + + ); +}; + +export default FinanceDetailPage; diff --git a/src/app/finance/page.tsx b/src/app/finance/page.tsx new file mode 100644 index 00000000..b913ace3 --- /dev/null +++ b/src/app/finance/page.tsx @@ -0,0 +1,32 @@ +'use client'; + +import FinanceTable from '@/components/pages/finance/FinanceTable'; +import { isResponseSuccess } from '@/lib/api-helper'; +import { FinanceApi } from '@/services/api/finance'; +import useSWR from 'swr'; + +const Finance = () => { + const { data: finances, isLoading: isLoadingFinances } = useSWR( + `${FinanceApi.basePath}`, + () => FinanceApi.getAllFetcher() + ); + + if (isLoadingFinances) { + return ( +
    + +
    + ); + } + + return ( +
    +

    Finance

    + +
    + ); +}; + +export default Finance; diff --git a/src/components/pages/finance/FinanceDetail.tsx b/src/components/pages/finance/FinanceDetail.tsx new file mode 100644 index 00000000..21fa1580 --- /dev/null +++ b/src/components/pages/finance/FinanceDetail.tsx @@ -0,0 +1,143 @@ +import Card from '@/components/Card'; +import DebouncedTextInput from '@/components/input/DebouncedTextInput'; +import Table from '@/components/Table'; +import { formatCurrency } from '@/lib/helper'; +import { Finance, FinanceReferences } from '@/types/api/finance/finance'; + +const FinanceDetail = ({ finance }: { finance: Finance }) => { + const informasiUmum = [ + { + label: 'ID', + value: finance.id, + }, + { + label: 'Jenis Transaksi', + value: finance.transaction_type, + }, + { + label: 'Pihak', + value: finance.transaction_owner.name, + }, + { + label: 'Tanggal', + value: finance.transaction_date, + }, + { + label: 'Metode Pembayaran', + value: finance.payment_method, + }, + ]; + const informasiTransfer = [ + { + label: 'No. Referensi', + value: finance.references_number, + }, + { + label: 'Nomor Rekening', + value: `${finance.bank_account.alias} - ${finance.bank_account.account_number} - ${finance.bank_account.owner}`, + }, + { + label: 'Rekening Customer', + value: finance.transaction_account_number, + }, + { + label: 'Nominal', + value: formatCurrency(finance.transaction_amount), + }, + { + label: 'Sisa', + value: formatCurrency(finance.balance_amount), + }, + ]; + return ( +
    + +
    + +
    + +
    +
    + +
    + + data={finance.references} + columns={[ + { + header: 'No.', + id: 'index', + accessorFn: (row, index) => index + 1, + }, + { + header: 'No. Referensi', + id: 'references_number', + accessorKey: 'references_number', + }, + { + header: 'Nominal', + id: 'nominal', + accessorFn: (row) => + formatCurrency(Number(row.total_allocation)), + }, + ]} + className={{ + containerClassName: 'mb-6', + }} + /> +
    + + + ); +}; + +export default FinanceDetail; diff --git a/src/components/pages/finance/FinanceTable.tsx b/src/components/pages/finance/FinanceTable.tsx new file mode 100644 index 00000000..eaffbb8d --- /dev/null +++ b/src/components/pages/finance/FinanceTable.tsx @@ -0,0 +1,97 @@ +import Button from '@/components/Button'; +import Dropdown from '@/components/dropdown/Dropdown'; +import Menu from '@/components/menu/Menu'; +import MenuItem from '@/components/menu/MenuItem'; +import Table from '@/components/Table'; +import Tooltip from '@/components/Tooltip'; +import { formatCurrency, formatDate } from '@/lib/helper'; +import { Finance } from '@/types/api/finance/finance'; +import { Row } from '@tanstack/react-table'; +import { useMemo } from 'react'; + +const FinanceTable = ({ finances }: { finances: Finance[] }) => { + const columns = useMemo(() => { + return [ + { + header: 'ID', + accessorKey: 'id', + }, + { + header: 'Alokasi', + accessorFn: (finance: Finance) => finance.references.length, + cell: ({ row }: { row: Row }) => ( + ref.references_number) + .join(', ')} + > + + {row.original.references.length} + + + ), + }, + { + header: 'References Number', + accessorKey: 'references_number', + }, + { + header: 'Jenis Transaksi', + accessorKey: 'transaction_type', + }, + { + header: 'Pihak', + accessorFn: (finance: Finance) => finance.transaction_owner.name, + }, + { + header: 'Tanggal', + accessorFn: (finance: Finance) => + formatDate(finance.transaction_date, 'DD MMM YYYY'), + }, + { + header: 'Metode Pembayaran', + accessorKey: 'payment_method', + }, + { + header: 'Bank', + accessorFn: (finance: Finance) => + `${finance.bank_account.alias} - ${finance.bank_account.account_number} - ${finance.bank_account.owner}`, + }, + { + header: 'Pengeluaran (Rp)', + accessorFn: (finance: Finance) => + formatCurrency(finance.balance_amount), + }, + { + header: 'Pemasukan (Rp)', + accessorFn: (finance: Finance) => + formatCurrency(finance.transaction_amount), + }, + { + header: 'Aksi', + cell: ({ row }: { row: Row }) => ( + ...} + direction='bottom' + align='end' + > + + + + + ), + }, + ]; + }, []); + return ( +
    + data={finances} columns={columns} /> +
    + ); +}; + +export default FinanceTable; diff --git a/src/components/pages/finance/add/FinanceAdd.schema.ts b/src/components/pages/finance/add/FinanceAdd.schema.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/components/pages/finance/add/FinanceAdd.tsx b/src/components/pages/finance/add/FinanceAdd.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.schema.ts b/src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.schema.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.tsx b/src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/components/pages/finance/adjust/FinanceAdjust.schema.ts b/src/components/pages/finance/adjust/FinanceAdjust.schema.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/components/pages/finance/adjust/FinanceAdjust.tsx b/src/components/pages/finance/adjust/FinanceAdjust.tsx new file mode 100644 index 00000000..3536892d --- /dev/null +++ b/src/components/pages/finance/adjust/FinanceAdjust.tsx @@ -0,0 +1,5 @@ +const FinanceAdjust = () => { + return
    Finance Adjust
    ; +}; + +export default FinanceAdjust; diff --git a/src/config/constant.ts b/src/config/constant.ts index 5c629c73..b9e02852 100644 --- a/src/config/constant.ts +++ b/src/config/constant.ts @@ -35,6 +35,11 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ link: '/marketing', icon: 'heroicons-outline:currency-dollar', }, + { + text: 'Keuangan', + link: '/finance', + icon: 'heroicons-outline:banknotes', + }, { text: 'Biaya Operasional', link: '/expense', @@ -60,7 +65,6 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ }, ], }, - { text: 'Persediaan', link: '/inventory', diff --git a/src/dummy/finance/finance.dummy.json b/src/dummy/finance/finance.dummy.json new file mode 100644 index 00000000..7c5c093b --- /dev/null +++ b/src/dummy/finance/finance.dummy.json @@ -0,0 +1,2702 @@ +[ + { + "id": "PAY-IN-CUST-00022_17", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_57", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_11", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_40", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_1", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_64", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_43", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_76", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_4", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_47", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_95", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_50", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_92", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_77", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_100", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_35", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_32", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_18", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_60", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_78", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_39", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_69", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_20", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_81", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_5", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_80", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_68", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_84", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_53", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_12", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_23", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_25", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_90", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_55", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_73", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_63", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_15", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_30", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_45", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_24", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_82", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_34", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_38", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_71", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_8", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_49", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_21", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_22", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_65", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_26", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_56", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_28", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_36", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_89", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_97", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_94", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_58", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_59", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_14", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_75", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_41", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_87", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_91", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_83", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_13", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_31", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_79", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_52", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_27", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_37", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_62", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_61", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_2", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_70", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_6", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_66", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_44", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_98", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_19", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_29", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_16", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_46", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_96", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00020_85", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T15:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12750000", + "balance_amount": "0", + "notes": "Batch Payment B2", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "12750000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_74", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_33", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_93", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_99", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00025_10", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "12000000", + "balance_amount": "0", + "notes": "Final settlement Group C", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "12000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_48", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00016_51", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T09:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "25000000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A1", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "25000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00018_3", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-21T08:15:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "10000000", + "balance_amount": "0", + "notes": "Cicilan ke-1 Ref A", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "10000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00021_86", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T16:20:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "33000000", + "balance_amount": "0", + "notes": "Batch Payment B3", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "33000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_67", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00023_88", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T12:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "8200000", + "balance_amount": "0", + "notes": "Pembayaran PO-991", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "8200000" + } + ] + }, + { + "id": "PAY-IN-CUST-00019_54", + "references_number": "0", + "bank_account": { + "alias": "MANDIRI", + "name": "BANK MANDIRI", + "account_number": "1234567890", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 3, + "name": "Siti Aminah" + }, + "transaction_account_number": "0888111222", + "transaction_date": "2025-12-22T14:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "45000000", + "balance_amount": "0", + "notes": "Batch Payment B1", + "references": [ + { + "references_number": "PAY-REF-B202", + "total_allocation": "45000000" + } + ] + }, + { + "id": "PAY-IN-CUST-00022_7", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T11:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "7500000", + "balance_amount": "0", + "notes": "Pembayaran PO-990", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "7500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_72", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + }, + { + "id": "PAY-IN-CUST-00024_9", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 4, + "name": "Rizky Pratama" + }, + "transaction_account_number": "0549998887", + "transaction_date": "2025-12-23T13:00:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "2100000", + "balance_amount": "0", + "notes": "Pembayaran PO-992", + "references": [ + { + "references_number": "PAY-REF-C303", + "total_allocation": "2100000" + } + ] + }, + { + "id": "PAY-IN-CUST-00017_42", + "references_number": "0", + "bank_account": { + "alias": "BCA", + "name": "BANK CENTRAL ASIA", + "account_number": "0541348513", + "owner": "MITRA BERLIAN UNGGAS PT" + }, + "transaction_type": "CUSTOMER", + "transaction_owner": { + "id": 2, + "name": "Budi Santoso" + }, + "transaction_account_number": "0542222444", + "transaction_date": "2025-12-20T10:30:00Z", + "payment_method": "TRANSFER", + "transaction_amount": "15500000", + "balance_amount": "0", + "notes": "Pelunasan Invoice A2", + "references": [ + { + "references_number": "PAY-REF-A101", + "total_allocation": "15500000" + } + ] + } +] diff --git a/src/dummy/finance/finance.dummy.ts b/src/dummy/finance/finance.dummy.ts new file mode 100644 index 00000000..6a6f7c9b --- /dev/null +++ b/src/dummy/finance/finance.dummy.ts @@ -0,0 +1,52 @@ +/** + * Dummy data for Finance[] + * Generated from: finance.json + * + * This file is auto-generated. Do not edit manually. + */ + +import { + FinanceBankAccount, + FinanceTransactionOwner, + FinanceReferences, + Finance, +} from '../../types/api/finance/finance'; +import { BaseApiResponse } from '@/types/api/api-general'; +import dummyData from './finance.dummy.json'; + +/** + * Get dummy Finance[] data + * @returns Promise with BaseApiResponse containing Finance[] + */ +export async function getAllDummyFinance(): Promise< + BaseApiResponse +> { + return new Promise((resolve) => { + setTimeout(() => { + resolve({ + code: 200, + status: 'success', + message: 'Data retrieved successfully', + data: dummyData as unknown as Finance[], + }); + }, 500); + }); +} + +export async function getSingleDummyFinance( + id: string +): Promise> { + console.log(dummyData as unknown as Finance[]); + return new Promise((resolve) => { + setTimeout(() => { + resolve({ + code: 200, + status: 'success', + message: 'Data retrieved successfully', + data: (dummyData as unknown as Finance[]).find( + (finance) => finance.id === id + ) as Finance, + }); + }, 500); + }); +} diff --git a/src/services/api/finance.ts b/src/services/api/finance.ts new file mode 100644 index 00000000..15ba0284 --- /dev/null +++ b/src/services/api/finance.ts @@ -0,0 +1,60 @@ +import axios from 'axios'; +import { BaseApiService } from '@/services/api/base'; +import { BaseApiResponse } from '@/types/api/api-general'; +import { httpClient } from '@/services/http/client'; +import { Finance } from '@/types/api/finance/finance'; +// DUMMY_START +import { + getAllDummyFinance, + getSingleDummyFinance, +} from '@/dummy/finance/finance.dummy'; +// DUMMY_END + +export class FinanceApiService extends BaseApiService< + Finance, + unknown, + unknown +> { + constructor(basePath: string) { + super(basePath); + } + + async getAllFetcher(): Promise> { + // DUMMY_START + return await getAllDummyFinance(); + // DUMMY_END + + // LIVE_START + // try { + // const path = `${this.basePath}/`; + // return await httpClient>(path); + // } catch (error) { + // if (axios.isAxiosError>(error)) { + // return error.response?.data; + // } + // return undefined; + // } + // LIVE_END + } + + async getSingleFetcher(id: string): Promise> { + // DUMMY_START + console.log(id); + return await getSingleDummyFinance(id); + // DUMMY_END + + // LIVE_START + // try { + // const path = `${this.basePath}/`; + // return await httpClient>(path); + // } catch (error) { + // if (axios.isAxiosError>(error)) { + // return error.response?.data; + // } + // return undefined; + // } + // LIVE_END + } +} + +export const FinanceApi = new FinanceApiService('/finances'); diff --git a/src/types/api/finance/finance.d.ts b/src/types/api/finance/finance.d.ts new file mode 100644 index 00000000..82ec93ea --- /dev/null +++ b/src/types/api/finance/finance.d.ts @@ -0,0 +1,31 @@ +export interface Finance { + id: string; + references_number: string; + bank_account: FinanceBankAccount; + transaction_type: string; + transaction_owner: FinanceTransactionOwner; + transaction_account_number: string; + transaction_date: string; + payment_method: string; + transaction_amount: number; + balance_amount: number; + notes: string; + references: FinanceReferences[]; +} + +export interface FinanceReferences { + references_number: string; + total_allocation: number; +} + +export interface FinanceTransactionOwner { + id: number; + name: string; +} + +export interface FinanceBankAccount { + alias: string; + name: string; + account_number: string; + owner: string; +} From f41899dbc955a64c9290912f94588566905a3a65 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 24 Dec 2025 09:24:16 +0700 Subject: [PATCH 14/34] feat(FE-331): add /report route to ROUTE_PERMISSIONS --- src/config/route-permission.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config/route-permission.ts b/src/config/route-permission.ts index 49e3ff39..af4dd5a1 100644 --- a/src/config/route-permission.ts +++ b/src/config/route-permission.ts @@ -65,6 +65,11 @@ export const ROUTE_PERMISSIONS: Record = { '/closing/': ['lti.closing.list'], '/closing/detail/': ['lti.closing.detail'], + // Report + '/report/logistic-stock/': ['lti.report.purchasesupplier.list'], + '/report/expense/': ['lti.report.expense.list'], + '/report/marketing/': ['lti.report.expense.list'], + // Inventory '/inventory/adjustment/': ['lti.inventory.list'], '/inventory/adjustment/add/': ['lti.inventory.create'], From 9d9b9d93db9142c8b8ef41f861b11a07d4730846 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 24 Dec 2025 09:41:48 +0700 Subject: [PATCH 15/34] feat(FE-331): implement permission guard in closing --- .../pages/closing/ClosingsTable.tsx | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/pages/closing/ClosingsTable.tsx b/src/components/pages/closing/ClosingsTable.tsx index 91e78c8c..e6574d4f 100644 --- a/src/components/pages/closing/ClosingsTable.tsx +++ b/src/components/pages/closing/ClosingsTable.tsx @@ -15,6 +15,8 @@ import SelectInput, { import RowDropdownOptions from '@/components/table/RowDropdownOptions'; import RowCollapseOptions from '@/components/table/RowCollapseOptions'; import RowOptionsMenuWrapper from '@/components/table/RowOptionsMenuWrapper'; +import RequirePermission from '@/components/helper/RequirePermission'; + import { cn, formatCurrency, formatDate } from '@/lib/helper'; import { isResponseSuccess } from '@/lib/api-helper'; import { useTableFilter } from '@/services/hooks/useTableFilter'; @@ -43,17 +45,18 @@ const RowOptionsMenu = ({ }) => { return ( - {/* TODO: apply RBAC */}
    - + + +
    ); From dda29e10d11beee2f496b197a6a9e877cc01dbc0 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 24 Dec 2025 11:07:40 +0700 Subject: [PATCH 16/34] chore: change "Biaya Operasional" menu text to "Biaya" --- src/config/constant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/constant.ts b/src/config/constant.ts index 554eceb1..e07731fb 100644 --- a/src/config/constant.ts +++ b/src/config/constant.ts @@ -43,7 +43,7 @@ export const MAIN_DRAWER_LINKS: SidebarMenuItem[] = [ icon: 'heroicons-outline:currency-dollar', }, { - text: 'Biaya Operasional', + text: 'Biaya', link: '/expense', icon: 'heroicons:wallet', permission: ['lti.expense.list'], From 6ed7dcfa6d8953dba671fcefca6abc670f33adfe Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 24 Dec 2025 11:08:37 +0700 Subject: [PATCH 17/34] feat(FE-331): implement permission guard in expense --- .../expense/ExpenseRealizationContent.tsx | 82 +++--- .../pages/expense/ExpenseRequestContent.tsx | 234 ++++++++++-------- .../pages/expense/ExpensesTable.tsx | 200 ++++++++------- .../expense/form/ExpenseRealizationForm.tsx | 63 ++--- .../pages/expense/form/ExpenseRequestForm.tsx | 77 +++--- 5 files changed, 362 insertions(+), 294 deletions(-) diff --git a/src/components/pages/expense/ExpenseRealizationContent.tsx b/src/components/pages/expense/ExpenseRealizationContent.tsx index 2b5b0a0a..c69f089f 100644 --- a/src/components/pages/expense/ExpenseRealizationContent.tsx +++ b/src/components/pages/expense/ExpenseRealizationContent.tsx @@ -4,6 +4,7 @@ import toast from 'react-hot-toast'; import Link from 'next/link'; import { Icon } from '@iconify/react'; import Button from '@/components/Button'; +import RequirePermission from '@/components/helper/RequirePermission'; import Card from '@/components/Card'; import DropFileInput from '@/components/input/DropFileInput'; @@ -62,16 +63,17 @@ const ExpenseRealizationContent = ({
    - {/* TODO: apply RBAC */} - + + +
    @@ -124,36 +126,38 @@ const ExpenseRealizationContent = ({ )}
    -
    - + +
    + - {formik.values.documents && - formik.values.documents.length > 0 && ( - - )} -
    + {formik.values.documents && + formik.values.documents.length > 0 && ( + + )} +
    + diff --git a/src/components/pages/expense/ExpenseRequestContent.tsx b/src/components/pages/expense/ExpenseRequestContent.tsx index 0d7d959d..b937c5bc 100644 --- a/src/components/pages/expense/ExpenseRequestContent.tsx +++ b/src/components/pages/expense/ExpenseRequestContent.tsx @@ -19,6 +19,7 @@ import { useModal } from '@/components/Modal'; import ConfirmationModal from '@/components/modal/ConfirmationModal'; import ConfirmationModalWithNotes from '@/components/modal/ConfirmationModalWithNotes'; import ExpensePDFPreviewButton from '@/components/pages/expense//pdf/ExpensePDFButton'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Expense } from '@/types/api/expense'; import { formatCurrency, formatDate } from '@/lib/helper'; @@ -255,100 +256,119 @@ const ExpenseRequestContent = ({
    {isCurrentApprovalOnManager && ( - + + + )} {isCurrentApprovalOnFinance && ( - + + + )} {isCurrentApprovalOnRealization && ( - + + + )} {showRejectButton && ( - + + )} {isExpenseCanBeRealized && ( - + + + )}
    {showEditButton && ( - + + + )} - + + +
    @@ -485,36 +505,42 @@ const ExpenseRequestContent = ({ )} -
    - + +
    + - {formik.values.documents && - formik.values.documents.length > 0 && ( - - )} -
    + {formik.values.documents && + formik.values.documents.length > 0 && ( + + )} +
    + diff --git a/src/components/pages/expense/ExpensesTable.tsx b/src/components/pages/expense/ExpensesTable.tsx index bbcb6c4e..9ae3ed34 100644 --- a/src/components/pages/expense/ExpensesTable.tsx +++ b/src/components/pages/expense/ExpensesTable.tsx @@ -28,6 +28,7 @@ import ExpenseStatusBadge from '@/components/pages/expense/ExpenseStatusBadge'; import CheckboxInput from '@/components/input/CheckboxInput'; import ConfirmationModalWithNotes from '@/components/modal/ConfirmationModalWithNotes'; import DateInput from '@/components/input/DateInput'; +import RequirePermission from '@/components/helper/RequirePermission'; import { Expense } from '@/types/api/expense'; import { ExpenseApi } from '@/services/api/expense'; @@ -67,58 +68,70 @@ const RowOptionsMenu = ({ return (
    - - - {showEditButton && ( + + + + {showEditButton && ( + + + )} {showRealizationButton && ( - + + + )} - + + +
    ); @@ -559,57 +572,70 @@ const ExpensesTable = () => {
    - + + + {selectedRowIds.length > 0 && ( <> - + + + - + + + - + + )}
    diff --git a/src/components/pages/expense/form/ExpenseRealizationForm.tsx b/src/components/pages/expense/form/ExpenseRealizationForm.tsx index a7ebdbca..d1c7c5f2 100644 --- a/src/components/pages/expense/form/ExpenseRealizationForm.tsx +++ b/src/components/pages/expense/form/ExpenseRealizationForm.tsx @@ -16,6 +16,7 @@ import DateInput from '@/components/input/DateInput'; import DropFileInput from '@/components/input/DropFileInput'; import ExpenseKandangsTable from '@/components/pages/expense/form/ExpenseKandangsTable'; import ExpenseRealizationKandangDetailExpense from '@/components/pages/expense/form/ExpenseRealizationKandangDetailExpense'; +import RequirePermission from '@/components/helper/RequirePermission'; import { CreateExpenseRealizationPayload, @@ -290,21 +291,23 @@ const ExpenseRealizationForm = ({ className={{ wrapper: 'col-span-12' }} /> - + + + {formik.values.existing_documents && formik.values.existing_documents.length > 0 && ( @@ -357,20 +360,22 @@ const ExpenseRealizationForm = ({ {type !== 'add' && (
    {type !== 'edit' && ( - + + + )}
    )} diff --git a/src/components/pages/expense/form/ExpenseRequestForm.tsx b/src/components/pages/expense/form/ExpenseRequestForm.tsx index d52bde0d..71160785 100644 --- a/src/components/pages/expense/form/ExpenseRequestForm.tsx +++ b/src/components/pages/expense/form/ExpenseRequestForm.tsx @@ -18,6 +18,7 @@ import DateInput from '@/components/input/DateInput'; import ExpenseKandangsTable from '@/components/pages/expense/form/ExpenseKandangsTable'; import DropFileInput from '@/components/input/DropFileInput'; import ExpenseRequestKandangDetailExpense from '@/components/pages/expense/form/ExpenseRequestKandangDetailExpense'; +import RequirePermission from '@/components/helper/RequirePermission'; import { ExpenseRequestFormSchema, @@ -385,21 +386,23 @@ const ExpenseRequestForm = ({ className={{ wrapper: 'col-span-12' }} /> - + + + {formik.values.existing_documents && formik.values.existing_documents.length > 0 && ( @@ -461,36 +464,40 @@ const ExpenseRequestForm = ({
    {type !== 'add' && (
    - - - {type !== 'edit' && ( + + + + {type !== 'edit' && ( + + + )}
    )} From 42a56a08d7adad55b43befc4052bde1405f33eb2 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 24 Dec 2025 15:31:50 +0700 Subject: [PATCH 18/34] chore(FE-331): update /marketing/detail/ permission name --- src/config/route-permission.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/route-permission.ts b/src/config/route-permission.ts index af4dd5a1..3c44b07b 100644 --- a/src/config/route-permission.ts +++ b/src/config/route-permission.ts @@ -47,7 +47,7 @@ export const ROUTE_PERMISSIONS: Record = { '/marketing/': ['lti.marketing.delivery_order.list'], '/marketing/add/delivery-orders/': ['lti.marketing.delivery_order.create'], '/marketing/add/sales-orders/': ['lti.marketing.sales_order.create'], - '/marketing/detail/': ['lti.marketing.detail'], + '/marketing/detail/': ['lti.marketing.delivery_order.detail'], '/marketing/detail/delivery-orders/edit/': [ 'lti.marketing.delivery_order.update', ], From df6c1ae49d7bdef347409d96a0c8a3eafb60b805 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 24 Dec 2025 15:43:45 +0700 Subject: [PATCH 19/34] feat(FE-331): implement permission guard in marketing --- .../pages/marketing/MarketingTable.tsx | 155 ++++++++++-------- .../marketing/detail/MarketingDetail.tsx | 108 +++++++----- .../pages/marketing/form/MarketingForm.tsx | 21 ++- 3 files changed, 165 insertions(+), 119 deletions(-) diff --git a/src/components/pages/marketing/MarketingTable.tsx b/src/components/pages/marketing/MarketingTable.tsx index d1d5940a..bb6c5569 100644 --- a/src/components/pages/marketing/MarketingTable.tsx +++ b/src/components/pages/marketing/MarketingTable.tsx @@ -26,6 +26,8 @@ import { useRouter } from 'next/navigation'; import { useCallback, useState } from 'react'; import toast from 'react-hot-toast'; import useSWR from 'swr'; +import RequirePermission from '@/components/helper/RequirePermission'; +import { useAuth } from '@/services/hooks/useAuth'; const RowsOptionsMenu = ({ type = 'dropdown', @@ -50,57 +52,71 @@ const RowsOptionsMenu = ({ )} >
    - - {props.row.original.latest_approval.step_number != 1 && ( + + + {props.row.original.latest_approval.step_number != 1 && ( + + + )} {props.row.original.latest_approval.step_number != 3 && ( - + + + )} - + + +
    ); @@ -116,6 +132,7 @@ const MarketingTable = () => { ); const [selectedItem, setSelectedItem] = useState(null); const [rowSelection, setRowSelection] = useState>({}); + const { permissionCheck } = useAuth(); const router = useRouter(); @@ -270,10 +287,14 @@ const MarketingTable = () => {
    { }} />
    - + + + - + + +
    {initialValues?.latest_approval?.step_number == 1 && ( <> - - + + + + + + + )} {initialValues?.latest_approval?.step_number != 1 && ( - + + )}
    @@ -413,19 +427,23 @@ const MarketingDetail = ({ )}
    {initialValues?.latest_approval?.step_number != 3 && ( - + + + )} - + + +
    - + + +
    )} From 8c95dc8327883e995b08223a344506ab7ada87a1 Mon Sep 17 00:00:00 2001 From: randy-ar Date: Wed, 24 Dec 2025 16:44:53 +0700 Subject: [PATCH 20/34] feat(FE-350): add filtering table --- .husky/pre-commit | 2 +- src/app/finance/detail/page.tsx | 2 +- src/app/finance/page.tsx | 24 +- src/components/helper/RequireAuth.tsx | 238 +- .../pages/finance/FinanceDetail.tsx | 66 +- src/components/pages/finance/FinanceTable.tsx | 329 +- src/dummy/finance/finance.dummy.json | 3040 +++-------------- src/dummy/finance/finance.dummy.ts | 23 +- src/services/api/finance.ts | 12 +- src/types/api/finance/finance.d.ts | 40 +- 10 files changed, 933 insertions(+), 2843 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 3782914b..ff51d55a 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,3 @@ npm run format npm run lint -npm run build \ No newline at end of file +npx tsc --noEmit \ No newline at end of file diff --git a/src/app/finance/detail/page.tsx b/src/app/finance/detail/page.tsx index 8807205a..1d20e9f5 100644 --- a/src/app/finance/detail/page.tsx +++ b/src/app/finance/detail/page.tsx @@ -11,7 +11,7 @@ const FinanceDetailPage = () => { const financeId = useSearchParams().get('financeId'); const { data: finance } = useSWR(financeId, () => - FinanceApi.getSingleFetcher(financeId as string) + FinanceApi.getSingle(Number(financeId)) ); if (!financeId) { diff --git a/src/app/finance/page.tsx b/src/app/finance/page.tsx index b913ace3..ec78820c 100644 --- a/src/app/finance/page.tsx +++ b/src/app/finance/page.tsx @@ -1,30 +1,12 @@ 'use client'; import FinanceTable from '@/components/pages/finance/FinanceTable'; -import { isResponseSuccess } from '@/lib/api-helper'; -import { FinanceApi } from '@/services/api/finance'; -import useSWR from 'swr'; const Finance = () => { - const { data: finances, isLoading: isLoadingFinances } = useSWR( - `${FinanceApi.basePath}`, - () => FinanceApi.getAllFetcher() - ); - - if (isLoadingFinances) { - return ( -
    - -
    - ); - } - return ( -
    -

    Finance

    - +
    +
    +
    ); }; diff --git a/src/components/helper/RequireAuth.tsx b/src/components/helper/RequireAuth.tsx index 65adf48c..dbd4b6bc 100644 --- a/src/components/helper/RequireAuth.tsx +++ b/src/components/helper/RequireAuth.tsx @@ -1,87 +1,197 @@ 'use client'; import { ReactNode, useEffect } from 'react'; -import useSWR from 'swr'; +import { useRouter } from 'next/navigation'; +import useSWRImmutable from 'swr/immutable'; import { useAuth } from '@/services/hooks/useAuth'; import { httpClientFetcher, SWRHttpKey } from '@/services/http/client'; -import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; -import { BaseApiResponse, GetMeResponse } from '@/types/api/api-general'; -import { AxiosError } from 'axios'; -import { redirectToSSO } from '@/lib/auth-helper'; +import { isResponseSuccess } from '@/lib/api-helper'; +import { GetMeResponse } from '@/types/api/api-general'; + +// TODO: delete this later, DONT HARDCODE USER DATA +const DUMMY_USER = { + id: 1, + email: 'admin@mbugroup.id', + npk: '0001', + name: 'Super Admin', + image: null, + created_at: '2025-09-30T03:24:20.899229Z', + updated_at: '2025-09-30T03:24:20.899229Z', + roles: [ + { + id: 1, + key: 'mbu.super_admin', + name: 'MBU Administrator', + client: { + id: 1, + name: 'PT Mitra Berlian Unggas', + alias: 'MBU', + }, + permissions: [ + { + id: 1, + name: 'mbu:purchase:read', + action: 'read', + client: { + id: 1, + name: 'PT Mitra Berlian Unggas', + alias: 'MBU', + }, + }, + { + id: 2, + name: 'mbu:purchase:create', + action: 'create', + client: { + id: 1, + name: 'PT Mitra Berlian Unggas', + alias: 'MBU', + }, + }, + { + id: 3, + name: 'mbu:purchase:approve', + action: 'approve', + client: { + id: 1, + name: 'PT Mitra Berlian Unggas', + alias: 'MBU', + }, + }, + ], + }, + { + id: 2, + key: 'lti.super_admin', + name: 'LTI Administrator', + client: { + id: 2, + name: 'PT Lumbung Telur Indonesia', + alias: 'LTI', + }, + permissions: [ + { + id: 4, + name: 'lti:purchase:read', + action: 'read', + client: { + id: 2, + name: 'PT Lumbung Telur Indonesia', + alias: 'LTI', + }, + }, + { + id: 5, + name: 'lti:purchase:create', + action: 'create', + client: { + id: 2, + name: 'PT Lumbung Telur Indonesia', + alias: 'LTI', + }, + }, + { + id: 6, + name: 'lti:purchase:approve', + action: 'approve', + client: { + id: 2, + name: 'PT Lumbung Telur Indonesia', + alias: 'LTI', + }, + }, + ], + }, + { + id: 3, + key: 'manbu.super_admin', + name: 'MANBU Administrator', + client: { + id: 3, + name: 'PT Mandiri Berlian Unggas', + alias: 'MANBU', + }, + permissions: [ + { + id: 7, + name: 'manbu:purchase:read', + action: 'read', + client: { + id: 3, + name: 'PT Mandiri Berlian Unggas', + alias: 'MANBU', + }, + }, + { + id: 8, + name: 'manbu:purchase:create', + action: 'create', + client: { + id: 3, + name: 'PT Mandiri Berlian Unggas', + alias: 'MANBU', + }, + }, + { + id: 9, + name: 'manbu:purchase:approve', + action: 'approve', + client: { + id: 3, + name: 'PT Mandiri Berlian Unggas', + alias: 'MANBU', + }, + }, + ], + }, + ], +}; interface RequireAuthProps { children?: ReactNode; } const RequireAuth = ({ children }: RequireAuthProps) => { - const { user, setUser, setIsLoadingUser } = useAuth(); + const router = useRouter(); + const { setUser, setIsLoadingUser } = useAuth(); - const { - data: userResponse, - isLoading: isLoadingUserResponse, - error: userErrorResponse, - } = useSWR< - GetMeResponse & { ok?: boolean }, - AxiosError, - SWRHttpKey - >('/sso/userinfo', httpClientFetcher, { - shouldRetryOnError: false, - }); + const { data: userResponse, isLoading: isLoadingUserResponse } = + useSWRImmutable( + '/auth/sso/userinfo', + httpClientFetcher, + { + shouldRetryOnError: false, + revalidateOnFocus: false, + revalidateOnReconnect: false, + refreshInterval: 0, + } + ); + + useEffect(() => { + setIsLoadingUser(isLoadingUserResponse); + }, [isLoadingUserResponse, setIsLoadingUser]); useEffect(() => { if (isResponseSuccess(userResponse)) { setUser(userResponse.data); + } else { + // router.replace(process.env.NEXT_PUBLIC_SSO_LOGIN_URL as string); + // TODO: remove this later, DONT HARDCODE USER DATA + setUser(DUMMY_USER); } - }, [userResponse, setUser]); + }, [userResponse, setIsLoadingUser, setUser]); - // Explicitly handle 401 redirect from the component level - useEffect(() => { - if ( - isResponseError(userResponse) && - userErrorResponse?.response?.status === 401 - ) { - // Clear cache to prevent stale data from rendering children - // mutate('/sso/userinfo', undefined, { revalidate: false }); // Optional: if using global mutate - setUser(undefined); - redirectToSSO(); - } - }, [userErrorResponse, setUser, userResponse]); + // TODO: uncomment this later + // if (isLoadingUserResponse && !userResponse) { + // return ( + //
    + // + //
    + // ); + // } - useEffect(() => { - setIsLoadingUser(isLoadingUserResponse); - }, [isLoadingUserResponse]); - - if ( - (isLoadingUserResponse && !userResponse && !userErrorResponse) || - (!userResponse && !userErrorResponse) - ) { - return ( -
    - -
    - ); - } - - if (userErrorResponse) { - return ( -
    -

    Authentication Failed

    -

    - Please try refreshing the page or contact support if the problem - persists. -

    - -
    - ); - } - - return <>{isResponseSuccess(userResponse) && user && children}; + return <>{children}; }; export default RequireAuth; diff --git a/src/components/pages/finance/FinanceDetail.tsx b/src/components/pages/finance/FinanceDetail.tsx index 21fa1580..d022d20e 100644 --- a/src/components/pages/finance/FinanceDetail.tsx +++ b/src/components/pages/finance/FinanceDetail.tsx @@ -1,14 +1,15 @@ import Card from '@/components/Card'; +import { FormHeader } from '@/components/helper/form/FormHeader'; import DebouncedTextInput from '@/components/input/DebouncedTextInput'; import Table from '@/components/Table'; -import { formatCurrency } from '@/lib/helper'; -import { Finance, FinanceReferences } from '@/types/api/finance/finance'; +import { formatCurrency, formatTitleCase } from '@/lib/helper'; +import { Finance } from '@/types/api/finance/finance'; const FinanceDetail = ({ finance }: { finance: Finance }) => { const informasiUmum = [ { label: 'ID', - value: finance.id, + value: finance.payment_code, }, { label: 'Jenis Transaksi', @@ -16,41 +17,47 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => { }, { label: 'Pihak', - value: finance.transaction_owner.name, + value: finance.party.name, }, { label: 'Tanggal', - value: finance.transaction_date, + value: finance.payment_date, }, { label: 'Metode Pembayaran', value: finance.payment_method, }, + { + label: 'Catatan', + value: finance.notes || '-', + }, ]; const informasiTransfer = [ { label: 'No. Referensi', - value: finance.references_number, + value: finance.reference_number, }, { label: 'Nomor Rekening', - value: `${finance.bank_account.alias} - ${finance.bank_account.account_number} - ${finance.bank_account.owner}`, + value: `${finance.bank.alias} - ${finance.bank.account_number} - ${finance.bank.owner}`, }, { - label: 'Rekening Customer', - value: finance.transaction_account_number, + label: `Rekening ${formatTitleCase(finance.party.type)}`, + value: finance.party.account_number, }, { label: 'Nominal', - value: formatCurrency(finance.transaction_amount), + value: formatCurrency(finance.expense_amount), }, { label: 'Sisa', - value: formatCurrency(finance.balance_amount), + value: formatCurrency(finance.income_amount), }, ]; return ( -
    +
    + + { }} />
    -
    -
    - -
    - - data={finance.references} - columns={[ - { - header: 'No.', - id: 'index', - accessorFn: (row, index) => index + 1, - }, - { - header: 'No. Referensi', - id: 'references_number', - accessorKey: 'references_number', - }, - { - header: 'Nominal', - id: 'nominal', - accessorFn: (row) => - formatCurrency(Number(row.total_allocation)), - }, - ]} - className={{ - containerClassName: 'mb-6', - }} - /> -
    ); diff --git a/src/components/pages/finance/FinanceTable.tsx b/src/components/pages/finance/FinanceTable.tsx index eaffbb8d..e6776521 100644 --- a/src/components/pages/finance/FinanceTable.tsx +++ b/src/components/pages/finance/FinanceTable.tsx @@ -1,39 +1,208 @@ +import { ChangeEventHandler, useMemo, useState } from 'react'; +import { Row } from '@tanstack/react-table'; +import { useSearchParams } from 'next/navigation'; +import useSWR from 'swr'; + import Button from '@/components/Button'; +import Card from '@/components/Card'; import Dropdown from '@/components/dropdown/Dropdown'; +import DateInput from '@/components/input/DateInput'; +import DebouncedTextInput from '@/components/input/DebouncedTextInput'; +import SelectInput, { + OptionType, + useSelect, +} from '@/components/input/SelectInput'; import Menu from '@/components/menu/Menu'; import MenuItem from '@/components/menu/MenuItem'; import Table from '@/components/Table'; import Tooltip from '@/components/Tooltip'; import { formatCurrency, formatDate } from '@/lib/helper'; +import { useTableFilter } from '@/services/hooks/useTableFilter'; import { Finance } from '@/types/api/finance/finance'; -import { Row } from '@tanstack/react-table'; -import { useMemo } from 'react'; +import { ROWS_OPTIONS } from '@/config/constant'; +import { FinanceApi } from '@/services/api/finance'; +import { isResponseSuccess } from '@/lib/api-helper'; +import { BankApi, CustomerApi, SupplierApi } from '@/services/api/master-data'; +import { Bank } from '@/types/api/master-data/bank'; + +const FinanceTable = () => { + const { + state: tableFilterState, + updateFilter, + setPage, + setPageSize, + toQueryString: getTableFilterQueryString, + } = useTableFilter({ + initial: { + search: '', + transactionType: '', + bankId: '', + partyType: '', + sortBy: '', + startDate: '', + endDate: '', + }, + paramMap: { + page: 'page', + pageSize: 'limit', + transactionType: 'transaction_type', + bankId: 'bank_id', + partyType: 'party_type', + sortBy: 'sort_date', + startDate: 'start_date', + endDate: 'end_date', + }, + }); + + // ===== State ===== + const [searchParams, setSearchParams] = useSearchParams(); + const [pendingFilters, setPendingFilters] = useState({ + search: '', + transactionType: '', + bankId: '', + partyType: '', + sortBy: '', + startDate: '', + endDate: '', + }); + const [selectedTransactionType, setSelectedTransactionType] = + useState(null); + const [selectedBank, setSelectedBank] = useState(null); + const [selectedPartyType, setSelectedPartyType] = useState( + null + ); + const [selectedSortBy, setSelectedSortBy] = useState(null); + + // ===== Fetch Data ===== + const { + data: finances, + isLoading, + mutate: refreshFinances, + } = useSWR( + `${FinanceApi.basePath}${getTableFilterQueryString()}`, + FinanceApi.getAllFetcher + ); + + // ===== Options ===== + const transactionTypeOptions = useMemo(() => { + return [ + { label: 'Transfer', value: 'TRANSFER' }, + { label: 'Cash', value: 'CASH' }, + { label: 'Card', value: 'CARD' }, + { label: 'Cheque', value: 'CHEQUE' }, + { label: 'Saldo', value: 'SALDO' }, + ]; + }, []); + const partyTypeOptions = useMemo(() => { + return [ + { label: 'Customer', value: 'CUSTOMER' }, + { label: 'Supplier', value: 'SUPPLIER' }, + ]; + }, []); + const sortByOptions = useMemo(() => { + return [ + { label: 'Tanggal Pembayaran', value: 'payment_date' }, + { label: 'Tanggal Dibuat', value: 'created_at' }, + ]; + }, []); + const { options: bankOptions, rawData: bankRawData } = useSelect( + BankApi.basePath, + 'id', + 'alias', + '', + { + limit: 'limit', + } + ); + + // ===== Handler ===== + const searchChangeHandler: ChangeEventHandler = (e) => { + setPendingFilters((prev) => ({ ...prev, search: e.target.value })); + }; + const transactionTypeChangeHandler = ( + val: OptionType | OptionType[] | null + ) => { + setSelectedTransactionType(val as OptionType); + setPendingFilters((prev) => ({ + ...prev, + transactionType: val ? ((val as OptionType).value as string) : '', + })); + }; + const bankChangeHandler = (val: OptionType | OptionType[] | null) => { + setSelectedBank(val as OptionType); + setPendingFilters((prev) => ({ + ...prev, + bankId: val ? ((val as OptionType).value as string) : '', + })); + }; + const partyTypeChangeHandler = (val: OptionType | OptionType[] | null) => { + setSelectedPartyType(val as OptionType); + setPendingFilters((prev) => ({ + ...prev, + partyType: val ? ((val as OptionType).value as string) : '', + })); + }; + const sortByChangeHandler = (val: OptionType | OptionType[] | null) => { + setSelectedSortBy(val as OptionType); + setPendingFilters((prev) => ({ + ...prev, + sortBy: val ? ((val as OptionType).value as string) : '', + })); + }; + const startDateChangeHandler: ChangeEventHandler = (e) => { + setPendingFilters((prev) => ({ ...prev, startDate: e.target.value })); + }; + const endDateChangeHandler: ChangeEventHandler = (e) => { + setPendingFilters((prev) => ({ ...prev, endDate: e.target.value })); + }; + const pageSizeChangeHandler = (val: OptionType | OptionType[] | null) => { + const newVal = val as OptionType; + setPageSize(newVal.value as number); + }; + const submitFilterHandler = () => { + updateFilter('search', pendingFilters.search); + updateFilter('transactionType', pendingFilters.transactionType); + updateFilter('bankId', pendingFilters.bankId); + updateFilter('partyType', pendingFilters.partyType); + updateFilter('sortBy', pendingFilters.sortBy); + updateFilter('startDate', pendingFilters.startDate); + updateFilter('endDate', pendingFilters.endDate); + }; + const resetFilterHandler = () => { + setSelectedTransactionType(null); + setSelectedBank(null); + setSelectedPartyType(null); + setSelectedSortBy(null); + + const emptyFilters = { + search: '', + transactionType: '', + bankId: '', + partyType: '', + sortBy: '', + startDate: '', + endDate: '', + }; + setPendingFilters(emptyFilters); + + updateFilter('search', ''); + updateFilter('transactionType', ''); + updateFilter('bankId', ''); + updateFilter('partyType', ''); + updateFilter('sortBy', ''); + updateFilter('startDate', ''); + updateFilter('endDate', ''); + }; -const FinanceTable = ({ finances }: { finances: Finance[] }) => { const columns = useMemo(() => { return [ { header: 'ID', - accessorKey: 'id', - }, - { - header: 'Alokasi', - accessorFn: (finance: Finance) => finance.references.length, - cell: ({ row }: { row: Row }) => ( - ref.references_number) - .join(', ')} - > - - {row.original.references.length} - - - ), + accessorKey: 'payment_code', }, { header: 'References Number', - accessorKey: 'references_number', + accessorKey: 'reference_number', }, { header: 'Jenis Transaksi', @@ -41,12 +210,12 @@ const FinanceTable = ({ finances }: { finances: Finance[] }) => { }, { header: 'Pihak', - accessorFn: (finance: Finance) => finance.transaction_owner.name, + accessorFn: (finance: Finance) => finance.party.name, }, { header: 'Tanggal', accessorFn: (finance: Finance) => - formatDate(finance.transaction_date, 'DD MMM YYYY'), + formatDate(finance.payment_date, 'DD MMM YYYY'), }, { header: 'Metode Pembayaran', @@ -55,17 +224,16 @@ const FinanceTable = ({ finances }: { finances: Finance[] }) => { { header: 'Bank', accessorFn: (finance: Finance) => - `${finance.bank_account.alias} - ${finance.bank_account.account_number} - ${finance.bank_account.owner}`, + `${finance.bank.alias} - ${finance.bank.account_number} - ${finance.bank.owner}`, }, { header: 'Pengeluaran (Rp)', accessorFn: (finance: Finance) => - formatCurrency(finance.balance_amount), + formatCurrency(finance.expense_amount), }, { header: 'Pemasukan (Rp)', - accessorFn: (finance: Finance) => - formatCurrency(finance.transaction_amount), + accessorFn: (finance: Finance) => formatCurrency(finance.income_amount), }, { header: 'Aksi', @@ -88,8 +256,113 @@ const FinanceTable = ({ finances }: { finances: Finance[] }) => { ]; }, []); return ( -
    - data={finances} columns={columns} /> +
    +
    + + + +
    + + + +
    + } + > +
    + + {isResponseSuccess(bankRawData) && ( + ({ + label: + bankRawData.data.find((data) => data.id === bank.value) + ?.alias + + ' - ' + + bankRawData.data.find((data) => data.id === bank.value) + ?.account_number + + ' - ' + + bankRawData.data.find((data) => data.id === bank.value) + ?.owner, + value: bank.value, + }))} + label='Bank' + value={selectedBank} + onChange={bankChangeHandler} + isClearable + /> + )} + + + + + +
    + + + data={isResponseSuccess(finances) ? finances.data : []} + columns={columns} + pageSize={tableFilterState.pageSize} + page={tableFilterState.page} + onPageChange={setPage} + isLoading={isLoading} + /> ); }; diff --git a/src/dummy/finance/finance.dummy.json b/src/dummy/finance/finance.dummy.json index 7c5c093b..c6237259 100644 --- a/src/dummy/finance/finance.dummy.json +++ b/src/dummy/finance/finance.dummy.json @@ -1,2702 +1,470 @@ [ { - "id": "PAY-IN-CUST-00022_17", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 9, + "payment_code": "PAY-OUT-SUPP-00-9", + "reference_number": "DO.MBU.496", + "transaction_type": "Penjualan", + "party": { + "id": 9268, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_57", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_11", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "07-Sep-2025", + "created_at": "25-Aug-2025", + "payment_method": "Giro", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] + "expense_amount": 27352139, + "income_amount": 0, + "nominal": 27352139, + "note": "" }, { - "id": "PAY-IN-CUST-00025_40", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 8, + "payment_code": "PAY-OUT-SUPP-00-8", + "reference_number": "DO.MBU.534", + "transaction_type": "Penjualan", + "party": { + "id": 9805, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "123000888999" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" + "payment_date": "30-Aug-2025", + "created_at": "22-Aug-2025", + "payment_method": "Giro", + "bank": { + "id": 3, + "name": "Bank Mandiri", + "alias": "MANDIRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "123000888999" }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] + "expense_amount": 70365908, + "income_amount": 0, + "nominal": 70365908, + "note": "" }, { - "id": "PAY-IN-CUST-00016_1", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 7, + "payment_code": "PAY-OUT-CUST-00-7", + "reference_number": "DO.MBU.822", + "transaction_type": "Penjualan", + "party": { + "id": 1676, + "name": "ADIN ARDIAN", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "05-Aug-2025", + "created_at": "04-Aug-2025", + "payment_method": "Giro", + "bank": { + "id": 3, + "name": "Bank Mandiri", + "alias": "MANDIRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "123000888999" + }, + "expense_amount": 57255311, + "income_amount": 0, + "nominal": 57255311, + "note": "" + }, + { + "id": 6, + "payment_code": "PAY-OUT-SUPP-00-6", + "reference_number": "DO.MBU.900", + "transaction_type": "Penjualan", + "party": { + "id": 2615, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "0541348513" + }, + "payment_date": "09-Aug-2025", + "created_at": "01-Aug-2025", + "payment_method": "Giro", + "bank": { + "id": 1, + "name": "Bank Central Asia", + "alias": "BCA", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "0541348513" + }, + "expense_amount": 46143594, + "income_amount": 0, + "nominal": 46143594, + "note": "" + }, + { + "id": 5, + "payment_code": "PAY-IN-CUST-00-5", + "reference_number": "DO.MBU.008", + "transaction_type": "Penjualan", + "party": { + "id": 5926, + "name": "AJRIL HAYAT, SE", + "type": "CUSTOMER", + "account_number": "038901000983305" + }, + "payment_date": "07-Sep-2025", + "created_at": "15-Sep-2025", + "payment_method": "Transfer", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] + "expense_amount": 0, + "income_amount": 57934816, + "nominal": 57934816, + "note": "" }, { - "id": "PAY-IN-CUST-00019_64", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 4, + "payment_code": "PAY-OUT-CUST-00-4", + "reference_number": "DO.MBU.889", + "transaction_type": "Penjualan", + "party": { + "id": 105, + "name": "AMAT RAHMAT", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_43", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "01-Sep-2025", + "created_at": "08-Aug-2025", + "payment_method": "Cash", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] + "expense_amount": 40208329, + "income_amount": 0, + "nominal": 40208329, + "note": "" }, { - "id": "PAY-IN-CUST-00021_76", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 3, + "payment_code": "PAY-OUT-CUST-00-3", + "reference_number": "DO.MBU.574", + "transaction_type": "Penjualan", + "party": { + "id": 4789, + "name": "AJRIL HAYAT, SE", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_4", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_47", - "references_number": "0", - "bank_account": { + "payment_date": "14-Sep-2025", + "created_at": "09-Aug-2025", + "payment_method": "Cash", + "bank": { + "id": 1, + "name": "Bank Central Asia", "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "0541348513" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] + "expense_amount": 53206601, + "income_amount": 0, + "nominal": 53206601, + "note": "" }, { - "id": "PAY-IN-CUST-00020_95", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 2, + "payment_code": "PAY-OUT-CUST-00-2", + "reference_number": "DO.MBU.581", + "transaction_type": "Penjualan", + "party": { + "id": 2834, + "name": "ADIN ARDIAN", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_50", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_92", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "28-Sep-2025", + "created_at": "24-Aug-2025", + "payment_method": "Cash", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] + "expense_amount": 42584188, + "income_amount": 0, + "nominal": 42584188, + "note": "" }, { - "id": "PAY-IN-CUST-00022_77", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 1, + "payment_code": "PAY-IN-SUPP-00-1", + "reference_number": "DO.MBU.498", + "transaction_type": "Penjualan", + "party": { + "id": 6937, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_100", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_35", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_32", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "15-Aug-2025", + "created_at": "05-Sep-2025", + "payment_method": "Transfer", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] + "expense_amount": 0, + "income_amount": 73312519, + "nominal": 73312519, + "note": "" }, { - "id": "PAY-IN-CUST-00023_18", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 9, + "payment_code": "PAY-OUT-SUPP-00-9", + "reference_number": "DO.MBU.496", + "transaction_type": "Penjualan", + "party": { + "id": 9268, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_60", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_78", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_39", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_69", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_20", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_81", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "07-Sep-2025", + "created_at": "25-Aug-2025", + "payment_method": "Giro", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] + "expense_amount": 27352139, + "income_amount": 0, + "nominal": 27352139, + "note": "" }, { - "id": "PAY-IN-CUST-00020_5", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 8, + "payment_code": "PAY-OUT-SUPP-00-8", + "reference_number": "DO.MBU.534", + "transaction_type": "Penjualan", + "party": { + "id": 9805, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "123000888999" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "30-Aug-2025", + "created_at": "22-Aug-2025", + "payment_method": "Giro", + "bank": { "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_80", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_68", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_84", - "references_number": "0", - "bank_account": { + "name": "Bank Mandiri", "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "123000888999" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] + "expense_amount": 70365908, + "income_amount": 0, + "nominal": 70365908, + "note": "" }, { - "id": "PAY-IN-CUST-00018_53", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 7, + "payment_code": "PAY-OUT-CUST-00-7", + "reference_number": "DO.MBU.822", + "transaction_type": "Penjualan", + "party": { + "id": 1676, + "name": "ADIN ARDIAN", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "05-Aug-2025", + "created_at": "04-Aug-2025", + "payment_method": "Giro", + "bank": { + "id": 3, + "name": "Bank Mandiri", + "alias": "MANDIRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "123000888999" + }, + "expense_amount": 57255311, + "income_amount": 0, + "nominal": 57255311, + "note": "" + }, + { + "id": 6, + "payment_code": "PAY-OUT-SUPP-00-6", + "reference_number": "DO.MBU.900", + "transaction_type": "Penjualan", + "party": { + "id": 2615, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "0541348513" + }, + "payment_date": "09-Aug-2025", + "created_at": "01-Aug-2025", + "payment_method": "Giro", + "bank": { + "id": 1, + "name": "Bank Central Asia", + "alias": "BCA", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "0541348513" + }, + "expense_amount": 46143594, + "income_amount": 0, + "nominal": 46143594, + "note": "" + }, + { + "id": 5, + "payment_code": "PAY-IN-CUST-00-5", + "reference_number": "DO.MBU.008", + "transaction_type": "Penjualan", + "party": { + "id": 5926, + "name": "AJRIL HAYAT, SE", + "type": "CUSTOMER", + "account_number": "038901000983305" + }, + "payment_date": "07-Sep-2025", + "created_at": "15-Sep-2025", + "payment_method": "Transfer", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] + "expense_amount": 0, + "income_amount": 57934816, + "nominal": 57934816, + "note": "" }, { - "id": "PAY-IN-CUST-00017_12", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 4, + "payment_code": "PAY-OUT-CUST-00-4", + "reference_number": "DO.MBU.889", + "transaction_type": "Penjualan", + "party": { + "id": 105, + "name": "AMAT RAHMAT", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "01-Sep-2025", + "created_at": "08-Aug-2025", + "payment_method": "Cash", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] + "expense_amount": 40208329, + "income_amount": 0, + "nominal": 40208329, + "note": "" }, { - "id": "PAY-IN-CUST-00018_23", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 3, + "payment_code": "PAY-OUT-CUST-00-3", + "reference_number": "DO.MBU.574", + "transaction_type": "Penjualan", + "party": { + "id": 4789, + "name": "AJRIL HAYAT, SE", + "type": "CUSTOMER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "14-Sep-2025", + "created_at": "09-Aug-2025", + "payment_method": "Cash", + "bank": { + "id": 1, + "name": "Bank Central Asia", + "alias": "BCA", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "0541348513" + }, + "expense_amount": 53206601, + "income_amount": 0, + "nominal": 53206601, + "note": "" + }, + { + "id": 2, + "payment_code": "PAY-OUT-CUST-00-2", + "reference_number": "DO.MBU.581", + "transaction_type": "Penjualan", + "party": { + "id": 2834, + "name": "ADIN ARDIAN", + "type": "CUSTOMER", + "account_number": "038901000983305" + }, + "payment_date": "28-Sep-2025", + "created_at": "24-Aug-2025", + "payment_method": "Cash", + "bank": { "id": 2, - "name": "Budi Santoso" + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] + "expense_amount": 42584188, + "income_amount": 0, + "nominal": 42584188, + "note": "" }, { - "id": "PAY-IN-CUST-00020_25", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" + "id": 1, + "payment_code": "PAY-IN-SUPP-00-1", + "reference_number": "DO.MBU.498", + "transaction_type": "Penjualan", + "party": { + "id": 6937, + "name": "PT. PAKAN NUSANTARA JAYA", + "type": "SUPPLIER", + "account_number": "038901000983305" }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_90", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_55", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_73", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { + "payment_date": "15-Aug-2025", + "created_at": "05-Sep-2025", + "payment_method": "Transfer", + "bank": { "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_63", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_15", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_30", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_45", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_24", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_82", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_34", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_38", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_71", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_8", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_49", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_21", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_22", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_65", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_26", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_56", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_28", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_36", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_89", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_97", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_94", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_58", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_59", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_14", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_75", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_41", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_87", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_91", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_83", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_13", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_31", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_79", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_52", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_27", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_37", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_62", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_61", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_2", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_70", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_6", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_66", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_44", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_98", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_19", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_29", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_16", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_46", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_96", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00020_85", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T15:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12750000", - "balance_amount": "0", - "notes": "Batch Payment B2", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "12750000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_74", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_33", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_93", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_99", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00025_10", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "12000000", - "balance_amount": "0", - "notes": "Final settlement Group C", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "12000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_48", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00016_51", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T09:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "25000000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A1", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "25000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00018_3", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-21T08:15:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "10000000", - "balance_amount": "0", - "notes": "Cicilan ke-1 Ref A", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "10000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00021_86", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T16:20:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "33000000", - "balance_amount": "0", - "notes": "Batch Payment B3", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "33000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_67", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00023_88", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T12:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "8200000", - "balance_amount": "0", - "notes": "Pembayaran PO-991", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "8200000" - } - ] - }, - { - "id": "PAY-IN-CUST-00019_54", - "references_number": "0", - "bank_account": { - "alias": "MANDIRI", - "name": "BANK MANDIRI", - "account_number": "1234567890", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 3, - "name": "Siti Aminah" - }, - "transaction_account_number": "0888111222", - "transaction_date": "2025-12-22T14:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "45000000", - "balance_amount": "0", - "notes": "Batch Payment B1", - "references": [ - { - "references_number": "PAY-REF-B202", - "total_allocation": "45000000" - } - ] - }, - { - "id": "PAY-IN-CUST-00022_7", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T11:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "7500000", - "balance_amount": "0", - "notes": "Pembayaran PO-990", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "7500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_72", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] - }, - { - "id": "PAY-IN-CUST-00024_9", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 4, - "name": "Rizky Pratama" - }, - "transaction_account_number": "0549998887", - "transaction_date": "2025-12-23T13:00:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "2100000", - "balance_amount": "0", - "notes": "Pembayaran PO-992", - "references": [ - { - "references_number": "PAY-REF-C303", - "total_allocation": "2100000" - } - ] - }, - { - "id": "PAY-IN-CUST-00017_42", - "references_number": "0", - "bank_account": { - "alias": "BCA", - "name": "BANK CENTRAL ASIA", - "account_number": "0541348513", - "owner": "MITRA BERLIAN UNGGAS PT" - }, - "transaction_type": "CUSTOMER", - "transaction_owner": { - "id": 2, - "name": "Budi Santoso" - }, - "transaction_account_number": "0542222444", - "transaction_date": "2025-12-20T10:30:00Z", - "payment_method": "TRANSFER", - "transaction_amount": "15500000", - "balance_amount": "0", - "notes": "Pelunasan Invoice A2", - "references": [ - { - "references_number": "PAY-REF-A101", - "total_allocation": "15500000" - } - ] + "name": "Bank Rakyat Indonesia", + "alias": "BRI", + "owner": "MITRA BERLIAN UNGGAS PT", + "account_number": "038901000983305" + }, + "expense_amount": 0, + "income_amount": 73312519, + "nominal": 73312519, + "note": "" } ] diff --git a/src/dummy/finance/finance.dummy.ts b/src/dummy/finance/finance.dummy.ts index 6a6f7c9b..c2cd51d6 100644 --- a/src/dummy/finance/finance.dummy.ts +++ b/src/dummy/finance/finance.dummy.ts @@ -1,16 +1,11 @@ /** * Dummy data for Finance[] - * Generated from: finance.json + * Generated from: finance_payments.json * * This file is auto-generated. Do not edit manually. */ -import { - FinanceBankAccount, - FinanceTransactionOwner, - FinanceReferences, - Finance, -} from '../../types/api/finance/finance'; +import { FinanceBank, Finance } from '../../types/api/finance/finance'; import { BaseApiResponse } from '@/types/api/api-general'; import dummyData from './finance.dummy.json'; @@ -18,9 +13,7 @@ import dummyData from './finance.dummy.json'; * Get dummy Finance[] data * @returns Promise with BaseApiResponse containing Finance[] */ -export async function getAllDummyFinance(): Promise< - BaseApiResponse -> { +export async function getAllFetcher(): Promise> { return new Promise((resolve) => { setTimeout(() => { resolve({ @@ -33,19 +26,17 @@ export async function getAllDummyFinance(): Promise< }); } -export async function getSingleDummyFinance( - id: string +export async function getFetcher( + id: number ): Promise> { - console.log(dummyData as unknown as Finance[]); return new Promise((resolve) => { setTimeout(() => { + const data = dummyData.find((item) => item.id === id); resolve({ code: 200, status: 'success', message: 'Data retrieved successfully', - data: (dummyData as unknown as Finance[]).find( - (finance) => finance.id === id - ) as Finance, + data: data as unknown as Finance, }); }, 500); }); diff --git a/src/services/api/finance.ts b/src/services/api/finance.ts index 15ba0284..c277cfde 100644 --- a/src/services/api/finance.ts +++ b/src/services/api/finance.ts @@ -4,10 +4,7 @@ import { BaseApiResponse } from '@/types/api/api-general'; import { httpClient } from '@/services/http/client'; import { Finance } from '@/types/api/finance/finance'; // DUMMY_START -import { - getAllDummyFinance, - getSingleDummyFinance, -} from '@/dummy/finance/finance.dummy'; +import { getAllFetcher, getFetcher } from '@/dummy/finance/finance.dummy'; // DUMMY_END export class FinanceApiService extends BaseApiService< @@ -21,7 +18,7 @@ export class FinanceApiService extends BaseApiService< async getAllFetcher(): Promise> { // DUMMY_START - return await getAllDummyFinance(); + return await getAllFetcher(); // DUMMY_END // LIVE_START @@ -37,10 +34,9 @@ export class FinanceApiService extends BaseApiService< // LIVE_END } - async getSingleFetcher(id: string): Promise> { + async getSingle(id: number): Promise> { // DUMMY_START - console.log(id); - return await getSingleDummyFinance(id); + return await getFetcher(id); // DUMMY_END // LIVE_START diff --git a/src/types/api/finance/finance.d.ts b/src/types/api/finance/finance.d.ts index 82ec93ea..574ee4d6 100644 --- a/src/types/api/finance/finance.d.ts +++ b/src/types/api/finance/finance.d.ts @@ -1,31 +1,29 @@ export interface Finance { - id: string; - references_number: string; - bank_account: FinanceBankAccount; + id: number; + payment_code: string; + reference_number: string; transaction_type: string; - transaction_owner: FinanceTransactionOwner; - transaction_account_number: string; - transaction_date: string; + party: FinanceParty; + payment_date: string; + created_at: string; payment_method: string; - transaction_amount: number; - balance_amount: number; + bank: FinanceBank; + expense_amount: number; + income_amount: number; + nominal: number; notes: string; - references: FinanceReferences[]; } -export interface FinanceReferences { - references_number: string; - total_allocation: number; -} - -export interface FinanceTransactionOwner { +export interface FinanceParty { id: number; name: string; -} - -export interface FinanceBankAccount { - alias: string; - name: string; + type: string; + account_number: string; +} +export interface FinanceBank { + id: number; + name: string; + alias: string; + owner: string; account_number: string; - owner: string; } From 4ddd1dc8e3e434cad55fdabffdcfdc4a799d4e91 Mon Sep 17 00:00:00 2001 From: randy-ar Date: Wed, 24 Dec 2025 18:45:33 +0700 Subject: [PATCH 21/34] feat(FE-337): slicing ui form add finance --- src/app/finance/add/page.tsx | 8 +- src/components/pages/finance/FinanceTable.tsx | 44 +- .../finance/add/FormFinanceAdd.schema.ts | 75 ++++ .../pages/finance/add/FormFinanceAdd.tsx | 378 ++++++++++++++++++ .../FinanceAddInitialBalance.tsx | 0 .../FormFinanceAddInitialBalance.schema.ts} | 0 .../FormFinanceAddInitialBalance.tsx} | 0 .../finance/adjust/FinanceAdjust.schema.ts | 0 .../pages/finance/adjust/FinanceAdjust.tsx | 5 - .../FormFinanceAdjust.schema.ts} | 0 .../finance/adjust/FormFinanceAdjust.tsx | 5 + src/config/constant.ts | 13 + 12 files changed, 499 insertions(+), 29 deletions(-) create mode 100644 src/components/pages/finance/add/FormFinanceAdd.schema.ts create mode 100644 src/components/pages/finance/add/FormFinanceAdd.tsx delete mode 100644 src/components/pages/finance/add/initial-balance/FinanceAddInitialBalance.tsx rename src/components/pages/finance/add/{FinanceAdd.schema.ts => initial-balance/FormFinanceAddInitialBalance.schema.ts} (100%) rename src/components/pages/finance/add/{FinanceAdd.tsx => initial-balance/FormFinanceAddInitialBalance.tsx} (100%) delete mode 100644 src/components/pages/finance/adjust/FinanceAdjust.schema.ts delete mode 100644 src/components/pages/finance/adjust/FinanceAdjust.tsx rename src/components/pages/finance/{add/initial-balance/FinanceAddInitialBalance.schema.ts => adjust/FormFinanceAdjust.schema.ts} (100%) create mode 100644 src/components/pages/finance/adjust/FormFinanceAdjust.tsx diff --git a/src/app/finance/add/page.tsx b/src/app/finance/add/page.tsx index 93ab79fb..162cd7ec 100644 --- a/src/app/finance/add/page.tsx +++ b/src/app/finance/add/page.tsx @@ -1,5 +1,7 @@ -const FinanceAdd = () => { - return
    Finance Add
    ; +import FormFinanceAdd from '@/components/pages/finance/add/FormFinanceAdd'; + +const FinanceAddPage = () => { + return ; }; -export default FinanceAdd; +export default FinanceAddPage; diff --git a/src/components/pages/finance/FinanceTable.tsx b/src/components/pages/finance/FinanceTable.tsx index e6776521..b4b4e60c 100644 --- a/src/components/pages/finance/FinanceTable.tsx +++ b/src/components/pages/finance/FinanceTable.tsx @@ -264,7 +264,7 @@ const FinanceTable = () => { - @@ -300,26 +300,28 @@ const FinanceTable = () => { onChange={transactionTypeChangeHandler} isClearable /> - {isResponseSuccess(bankRawData) && ( - ({ - label: - bankRawData.data.find((data) => data.id === bank.value) - ?.alias + - ' - ' + - bankRawData.data.find((data) => data.id === bank.value) - ?.account_number + - ' - ' + - bankRawData.data.find((data) => data.id === bank.value) - ?.owner, - value: bank.value, - }))} - label='Bank' - value={selectedBank} - onChange={bankChangeHandler} - isClearable - /> - )} + ({ + label: + bankRawData.data.find((data) => data.id === bank.value) + ?.alias + + ' - ' + + bankRawData.data.find((data) => data.id === bank.value) + ?.account_number + + ' - ' + + bankRawData.data.find((data) => data.id === bank.value) + ?.owner, + value: bank.value, + })) + : [] + } + label='Bank' + value={selectedBank} + onChange={bankChangeHandler} + isClearable + /> { + const router = useRouter(); + + // ===== Formik ===== + const formikInitialValues = useMemo((): FinanceFormValues => { + return { + party_type_option: initialValues?.party_type_option || null, + party_id_option: initialValues?.party_id_option || null, + payment_date: initialValues?.payment_date || '', + payment_method_option: initialValues?.payment_method_option || null, + bank_id_option: initialValues?.bank_id_option || null, + party_account_number: initialValues?.party_account_number || '', + reference_number: initialValues?.reference_number || '', + nominal: initialValues?.nominal || '', + notes: initialValues?.notes || '', + }; + }, [initialValues]); + + const formik = useFormik({ + initialValues: formikInitialValues, + validationSchema: FinanceFormSchema, + onSubmit: async (values) => { + const payload = transformFormValuesToPayload(values); + + switch (type) { + case 'add': + await createFinance(payload); + break; + + case 'edit': + if (initialValues?.id) { + await updateFinance(initialValues.id, payload); + } + break; + } + }, + }); + + // ===== Options ===== + const { options: partyOptions, isLoadingOptions: isLoadingPartyOptions } = + useSelect( + formik.values.party_type_option?.value === 'CUSTOMER' + ? CustomerApi.basePath + : SupplierApi.basePath, + 'id', + 'name', + '', + { limit: 'limit' } + ); + const { + options: bankOptions, + rawData: bankRawData, + isLoadingOptions: isLoadingBankOptions, + } = useSelect(BankApi.basePath, 'id', 'name', '', { limit: 'limit' }); + + // ===== Helper Functions ===== + const transformFormValuesToPayload = ( + values: FinanceFormValues + ): FinancePayload => { + return { + party_id: Number(values.party_id_option?.value) || 0, + party_type: (values.party_type_option?.value as string) || '', + payment_date: values.payment_date, + payment_method: (values.payment_method_option?.value as string) || '', + bank_id: Number(values.bank_id_option?.value) || 0, + reference_number: values.reference_number, + nominal: Number(values.nominal.replace(/\D/g, '')) || 0, + notes: values.notes, + }; + }; + + // ===== Handler ===== + const createFinance = useCallback( + async (payload: FinancePayload) => { + const response = await FinanceApi.create(payload); + + if (isResponseError(response)) { + toast.error(response.message); + return; + } + + toast.success('Data berhasil ditambahkan'); + router.refresh(); + router.push('/finance'); + }, + [router] + ); + const updateFinance = useCallback( + async (financeId: number, payload: FinancePayload) => { + const response = await FinanceApi.update(financeId, payload); + + if (isResponseError(response)) { + toast.error(response.message); + return; + } + + toast.success('Data berhasil diperbarui'); + router.refresh(); + router.push('/finance'); + }, + [router] + ); + + return ( + <> +
    +
    + +
    + { + formik.setFieldValue('party_type_option', value); + formik.setFieldTouched('party_type_option', true); + }} + isError={ + !!( + formik.touched.party_type_option && + formik.errors.party_type_option + ) + } + errorMessage={ + formik.touched.party_type_option && + formik.errors.party_type_option + ? String(formik.errors.party_type_option) + : '' + } + required + isClearable + /> + { + formik.setFieldValue('party_id_option', value); + formik.setFieldTouched('party_id_option', true); + }} + isLoading={isLoadingPartyOptions} + isError={ + !!( + formik.touched.party_id_option && + formik.errors.party_id_option + ) + } + errorMessage={ + formik.touched.party_id_option && formik.errors.party_id_option + ? String(formik.errors.party_id_option) + : '' + } + required + isClearable + isDisabled={!formik.values.party_type_option?.value} + /> + + { + formik.setFieldValue('payment_method_option', value); + formik.setFieldTouched('payment_method_option', true); + }} + isError={ + !!( + formik.touched.payment_method_option && + formik.errors.payment_method_option + ) + } + errorMessage={ + formik.touched.payment_method_option && + formik.errors.payment_method_option + ? String(formik.errors.payment_method_option) + : '' + } + required + isClearable + /> + ({ + label: + bankRawData.data?.find( + (item) => item.id === option.value + )?.alias + + ' - ' + + bankRawData.data?.find( + (item) => item.id === option.value + )?.account_number + + ' - ' + + bankRawData.data?.find( + (item) => item.id === option.value + )?.owner, + value: option.value, + })) + : [] + } + value={formik.values.bank_id_option} + onChange={(value) => { + formik.setFieldValue('bank_id_option', value); + formik.setFieldTouched('bank_id_option', true); + }} + isLoading={isLoadingBankOptions} + isError={ + !!( + formik.touched.bank_id_option && formik.errors.bank_id_option + ) + } + errorMessage={ + formik.touched.bank_id_option && formik.errors.bank_id_option + ? String(formik.errors.bank_id_option) + : '' + } + required + isClearable + /> + + + +