@rangka-os/create 0.5.0-alpha.14 → 0.5.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/base/apps/grosir_distribusi/app.rk +2 -1
- package/template/base/apps/jasa_proyek/app.rk +4 -0
- package/template/base/apps/jasa_proyek/dashboards/rekap_absen.rk +1 -1
- package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +17 -1
- package/template/base/apps/kelas_kursus/app.rk +3 -0
- package/template/base/apps/langganan_jasa/app.rk +8 -1
- package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +1 -1
- package/template/base/apps/ritel_cabang/app.rk +3 -0
- package/template/base/apps/sewa_alat/app.rk +6 -1
- package/template/base/connectors/doku/mock/doku_mock.py +16 -5
- package/template/base/connectors/moka/connector.rk +6 -5
- package/template/base/connectors/moka/mock/moka_mock.py +210 -0
- package/template/base/connectors/xendit/mock/xendit_mock.py +231 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked.rk +12 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked_released.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +11 -1
- package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +23 -5
- package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +56 -14
- package/template/base/modules/bank_statement/models/bank_transaction.rk +27 -4
- package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +1 -1
- package/template/base/modules/catalogue/models/item.rk +9 -0
- package/template/base/modules/catalogue/models/item_category.rk +2 -0
- package/template/base/modules/contacts/models/customer.rk +10 -1
- package/template/base/modules/contacts/models/vendor.rk +10 -1
- package/template/base/modules/coretax/module.rk +2 -2
- package/template/base/modules/coretax/print/coretax_faktur.rk +1 -1
- package/template/base/modules/coretax/print/coretax_faktur.xml +13 -7
- package/template/base/modules/courses/flows/session_attendance_checked.rk +14 -0
- package/template/base/modules/courses/flows/session_of_the_day.rk +34 -0
- package/template/base/modules/courses/models/course_attendance.rk +2 -0
- package/template/base/modules/courses/models/course_session.rk +1 -0
- package/template/base/modules/courses/module.rk +1 -1
- package/template/base/modules/courses/screens/absen_kelas.rk +17 -0
- package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +1 -1
- package/template/base/modules/delivery/module.rk +1 -1
- package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +2 -2
- package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +2 -2
- package/template/base/modules/distribution/module.rk +1 -1
- package/template/base/modules/invoicing/models/sales_invoice.rk +31 -4
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +7 -0
- package/template/base/modules/invoicing/module.rk +1 -1
- package/template/base/modules/invoicing/print/sales_invoice.html +15 -2
- package/template/base/modules/orders/models/customer_order.rk +2 -0
- package/template/base/modules/orders/models/customer_order_item.rk +10 -0
- package/template/base/modules/orders/module.rk +1 -1
- package/template/base/modules/outlet_sales/flows/moka_api_opened.rk +30 -0
- package/template/base/modules/outlet_sales/flows/moka_held_release.rk +35 -0
- package/template/base/modules/outlet_sales/flows/moka_line_mapped.rk +12 -3
- package/template/base/modules/outlet_sales/flows/moka_transaction_refused.rk +15 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_staged.rk +31 -11
- package/template/base/modules/outlet_sales/models/moka_sale_line.rk +9 -1
- package/template/base/modules/outlets/models/outlet.rk +13 -1
- package/template/base/modules/payments/flows/payment_refund_from_doku.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +2 -2
- package/template/base/modules/payroll/flows/payslip_advance_guard.rk +3 -0
- package/template/base/modules/payroll/flows/payslip_from_recap.rk +30 -1
- package/template/base/modules/payroll/flows/payslip_ytd_guard.rk +18 -1
- package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +28 -1
- package/template/base/modules/payroll/models/payslip.rk +19 -1
- package/template/base/modules/payroll/module.rk +2 -2
- package/template/base/modules/pos/screens/kasir.rk +1 -1
- package/template/base/modules/production/models/production_batch.rk +3 -0
- package/template/base/modules/production/module.rk +1 -1
- package/template/base/modules/projects/flows/attendance_close_on_submit.rk +6 -2
- package/template/base/modules/projects/flows/attendance_log_guard_created.rk +3 -1
- package/template/base/modules/projects/flows/attendance_log_guard_submitted.rk +8 -4
- package/template/base/modules/projects/flows/attendance_log_guard_updated.rk +2 -1
- package/template/base/modules/projects/models/assignment.rk +3 -0
- package/template/base/modules/projects/models/attendance_close.rk +4 -0
- package/template/base/modules/projects/models/attendance_guard.rk +1 -1
- package/template/base/modules/projects/models/attendance_log.rk +63 -66
- package/template/base/modules/projects/models/work_site.rk +2 -1
- package/template/base/modules/projects/module.rk +1 -1
- package/template/base/modules/projects/roles/field_worker.rk +2 -0
- package/template/base/modules/projects/screens/absen.rk +21 -0
- package/template/base/modules/quotation/models/quotation.rk +14 -4
- package/template/base/modules/quotation/models/quotation_item.rk +13 -0
- package/template/base/modules/quotation/module.rk +1 -1
- package/template/base/modules/quotation/print/quotation.html +16 -2
- package/template/base/modules/rental/flows/rental_return_on_cancel.rk +5 -3
- package/template/base/modules/rental/models/rental_checkout.rk +10 -15
- package/template/base/modules/rental/models/rental_return.rk +3 -11
- package/template/base/modules/rental/models/rental_schedule.rk +8 -0
- package/template/base/modules/rental/models/rental_unit.rk +7 -0
- package/template/base/modules/rental/module.rk +1 -1
- package/template/base/modules/rental/screens/alat_keluar.rk +19 -0
- package/template/base/modules/rental/screens/alat_kembali.rk +19 -0
- package/template/base/modules/rental/screens/jadwal_alat.rk +21 -0
- package/template/base/modules/subscriptions/models/collection_visit.rk +47 -0
- package/template/base/modules/subscriptions/models/subscription.rk +3 -1
- package/template/base/modules/subscriptions/module.rk +1 -1
- package/template/base/modules/subscriptions/screens/catat_tagih.rk +18 -0
- package/template/base/modules/subscriptions/screens/rute_tagih.rk +25 -0
|
@@ -15,15 +15,18 @@ title_field: worker_name
|
|
|
15
15
|
# the distance and the photo; a rejected log stays a draft and is not counted. Nothing is refused for being far away
|
|
16
16
|
# (contract 0030 §4, as Talenta and Gadjian do).
|
|
17
17
|
#
|
|
18
|
-
# Distance: the
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
# the squared radius, so no square root is needed. A faked position (fake GPS) is not detected; the supervisor checks the
|
|
22
|
-
# photo (contract 0030 §4).
|
|
18
|
+
# Distance: the phone sends its position as a `geo` value {lat, lng, accuracy_m, at} (contract 0030 §4, WS6) and the
|
|
19
|
+
# kernel measures it against the site's point with distance_m (haversine). What the phone shows is only an estimate; the
|
|
20
|
+
# computes below decide. A faked position (fake GPS) is not detected; the supervisor checks the photo (contract 0030 §4).
|
|
23
21
|
#
|
|
24
|
-
# Photos are attachments of the record (contract 0011
|
|
25
|
-
#
|
|
26
|
-
#
|
|
22
|
+
# Photos are attachments of the record (contract 0011); in_photo and out_photo (type image) hold the attachment id, and
|
|
23
|
+
# the kernel accepts only an image attachment of this same log (contract 0030 §4). The clock screen (screens/absen.rk)
|
|
24
|
+
# creates the log with the position, attaches the photo, then sets the photo and the clock-in time together.
|
|
25
|
+
#
|
|
26
|
+
# The clock-in and clock-out time, position and photo are set_once (contract 0030 §4): a worker fills them once and can
|
|
27
|
+
# never move a clock-in the kernel measured as outside, and nobody else can either: amend copies them, locked. A wrong
|
|
28
|
+
# value is corrected by the project admin cancelling the log and making a new one for the day (not an amendment; the
|
|
29
|
+
# cancelled log stays as the trail, attendance_close counts only submitted logs). Audit 2026-11-12 F5.
|
|
27
30
|
#
|
|
28
31
|
# Not linked to by any record while it is a draft (contract 0030 §10), so it can be submittable.
|
|
29
32
|
permissions:
|
|
@@ -72,28 +75,28 @@ fields:
|
|
|
72
75
|
default: today()
|
|
73
76
|
in_list: true
|
|
74
77
|
# Clock-in
|
|
78
|
+
# Set by the clock screen together with the photo (a default would block that write: set_once). Required at submit.
|
|
75
79
|
- name: clock_in
|
|
76
80
|
type: datetime
|
|
77
81
|
label: {id: Jam masuk}
|
|
78
|
-
|
|
79
|
-
default: now()
|
|
82
|
+
set_once: true
|
|
80
83
|
in_list: true
|
|
81
|
-
- {name:
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- {name:
|
|
86
|
-
- {name: in_photo, type: image, label: {id: Foto masuk
|
|
84
|
+
- {name: in_pos, type: geo, label: {id: Posisi masuk}, set_once: true}
|
|
85
|
+
# Before the geo fields (projects 1.1) the position was two numbers. Kept read-only so a log made before the upgrade
|
|
86
|
+
# is still measured from where it was taken (audit 2026-11-12 F1); new logs leave them 0.
|
|
87
|
+
- {name: in_lat, type: float, label: {id: Lintang masuk (lama)}, hidden: true, read_only: true}
|
|
88
|
+
- {name: in_lng, type: float, label: {id: Bujur masuk (lama)}, hidden: true, read_only: true}
|
|
89
|
+
- {name: in_photo, type: image, label: {id: Foto masuk}, set_once: true}
|
|
87
90
|
# Clock-out
|
|
88
91
|
- name: clock_out
|
|
89
92
|
type: datetime
|
|
90
93
|
label: {id: Jam keluar}
|
|
94
|
+
set_once: true
|
|
91
95
|
in_list: true
|
|
92
|
-
- {name:
|
|
93
|
-
- {name:
|
|
94
|
-
- {name:
|
|
95
|
-
- {name:
|
|
96
|
-
- {name: out_photo, type: image, label: {id: Foto keluar (lampiran)}}
|
|
96
|
+
- {name: out_pos, type: geo, label: {id: Posisi keluar}, set_once: true}
|
|
97
|
+
- {name: out_lat, type: float, label: {id: Lintang keluar (lama)}, hidden: true, read_only: true}
|
|
98
|
+
- {name: out_lng, type: float, label: {id: Bujur keluar (lama)}, hidden: true, read_only: true}
|
|
99
|
+
- {name: out_photo, type: image, label: {id: Foto keluar}, set_once: true}
|
|
97
100
|
- name: overtime_hours
|
|
98
101
|
type: float
|
|
99
102
|
label: {id: Jam lembur}
|
|
@@ -106,54 +109,33 @@ fields:
|
|
|
106
109
|
- {name: site_lat, type: float, label: {id: Lintang lokasi}, read_only: true, compute: "work_site != '' ? work_site.lat : 0"}
|
|
107
110
|
- {name: site_lng, type: float, label: {id: Bujur lokasi}, read_only: true, compute: "work_site != '' ? work_site.lng : 0"}
|
|
108
111
|
- {name: site_radius_m, type: int, label: {id: Radius lokasi (m)}, read_only: true, compute: "work_site != '' ? work_site.radius_m : 0"}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
hidden: true
|
|
114
|
-
read_only: true
|
|
115
|
-
compute: "111320.0 * (1.0 - (site_lat * 0.0174532925) * (site_lat * 0.0174532925) / 2.0 + (site_lat * 0.0174532925) * (site_lat * 0.0174532925) * (site_lat * 0.0174532925) * (site_lat * 0.0174532925) / 24.0 - (site_lat * 0.0174532925) * (site_lat * 0.0174532925) * (site_lat * 0.0174532925) * (site_lat * 0.0174532925) * (site_lat * 0.0174532925) * (site_lat * 0.0174532925) / 720.0)"
|
|
116
|
-
- {name: in_located, type: check, label: {id: Lokasi masuk ada}, read_only: true, compute: "in_lat != 0 || in_lng != 0"}
|
|
117
|
-
- {name: in_dx, type: float, label: {id: Selisih timur masuk (m)}, hidden: true, read_only: true, compute: "(in_lng - site_lng) * site_m_per_lng"}
|
|
118
|
-
- {name: in_ax, type: float, label: {id: Selisih timur masuk mutlak}, hidden: true, read_only: true, compute: "in_dx < 0 ? -in_dx : in_dx"}
|
|
119
|
-
- {name: in_ay, type: float, label: {id: Selisih utara masuk mutlak}, hidden: true, read_only: true, compute: "in_dy < 0 ? -in_dy : in_dy"}
|
|
120
|
-
# Square root of dx^2 + dy^2 by two Newton steps from the octagonal estimate (max + 0.4 min, within 4%): within
|
|
121
|
-
# 0.01% of the flat-earth distance.
|
|
122
|
-
- {name: in_r0, type: float, label: {id: Jarak awal masuk}, hidden: true, read_only: true, compute: "(in_ax > in_ay ? in_ax : in_ay) + 0.4 * (in_ax > in_ay ? in_ay : in_ax)"}
|
|
123
|
-
- {name: in_r1, type: float, label: {id: Jarak langkah 1 masuk}, hidden: true, read_only: true, compute: "in_r0 == 0 ? 0.0 : (in_r0 + (in_dx * in_dx + in_dy * in_dy) / in_r0) / 2.0"}
|
|
124
|
-
- {name: in_r2, type: float, label: {id: Jarak langkah 2 masuk}, hidden: true, read_only: true, compute: "in_r1 == 0 ? 0.0 : (in_r1 + (in_dx * in_dx + in_dy * in_dy) / in_r1) / 2.0"}
|
|
125
|
-
- {name: in_dy, type: float, label: {id: Selisih utara masuk (m)}, hidden: true, read_only: true, compute: "(in_lat - site_lat) * 110574.0"}
|
|
112
|
+
- {name: site_point, type: geo, label: {id: Titik lokasi}, hidden: true, read_only: true, compute: "work_site != '' ? {'lat': site_lat, 'lng': site_lng} : ''"}
|
|
113
|
+
# distance_m is 1e9 without a position (contract 0030 §4): "no position" counts as far.
|
|
114
|
+
- {name: in_m, type: float, label: {id: Jarak masuk dari titik (m)}, hidden: true, read_only: true, compute: "distance_m(in_pos, site_point) < 100000000.0 ? distance_m(in_pos, site_point) : (in_lat != 0 || in_lng != 0 ? distance_m({'lat': in_lat, 'lng': in_lng}, site_point) : distance_m(in_pos, site_point))"}
|
|
115
|
+
- {name: in_located, type: check, label: {id: Lokasi masuk ada}, read_only: true, compute: "in_m < 100000000.0"}
|
|
126
116
|
- name: in_inside
|
|
127
117
|
type: check
|
|
128
118
|
label: {id: Masuk di dalam radius}
|
|
129
119
|
read_only: true
|
|
130
|
-
compute: "in_located && work_site != '' &&
|
|
131
|
-
# Distance in metres for people to read (
|
|
120
|
+
compute: "in_located && work_site != '' && in_m <= site_radius_m"
|
|
121
|
+
# Distance in metres for people to read (0 without a position).
|
|
132
122
|
- name: in_site_m
|
|
133
123
|
type: int
|
|
134
124
|
label: {id: Jarak masuk dari lokasi (m)}
|
|
135
125
|
read_only: true
|
|
136
|
-
compute: "!in_located || work_site == '' ? 0 : round(
|
|
137
|
-
- {name:
|
|
138
|
-
- {name:
|
|
139
|
-
- {name: out_ax, type: float, label: {id: Selisih timur keluar mutlak}, hidden: true, read_only: true, compute: "out_dx < 0 ? -out_dx : out_dx"}
|
|
140
|
-
- {name: out_ay, type: float, label: {id: Selisih utara keluar mutlak}, hidden: true, read_only: true, compute: "out_dy < 0 ? -out_dy : out_dy"}
|
|
141
|
-
# Square root of dx^2 + dy^2 by two Newton steps from the octagonal estimate (max + 0.4 min, within 4%): within
|
|
142
|
-
# 0.01% of the flat-earth distance.
|
|
143
|
-
- {name: out_r0, type: float, label: {id: Jarak awal keluar}, hidden: true, read_only: true, compute: "(out_ax > out_ay ? out_ax : out_ay) + 0.4 * (out_ax > out_ay ? out_ay : out_ax)"}
|
|
144
|
-
- {name: out_r1, type: float, label: {id: Jarak langkah 1 keluar}, hidden: true, read_only: true, compute: "out_r0 == 0 ? 0.0 : (out_r0 + (out_dx * out_dx + out_dy * out_dy) / out_r0) / 2.0"}
|
|
145
|
-
- {name: out_r2, type: float, label: {id: Jarak langkah 2 keluar}, hidden: true, read_only: true, compute: "out_r1 == 0 ? 0.0 : (out_r1 + (out_dx * out_dx + out_dy * out_dy) / out_r1) / 2.0"}
|
|
146
|
-
- {name: out_dy, type: float, label: {id: Selisih utara keluar (m)}, hidden: true, read_only: true, compute: "(out_lat - site_lat) * 110574.0"}
|
|
126
|
+
compute: "!in_located || work_site == '' ? 0 : round(in_m)"
|
|
127
|
+
- {name: out_m, type: float, label: {id: Jarak keluar dari titik (m)}, hidden: true, read_only: true, compute: "distance_m(out_pos, site_point) < 100000000.0 ? distance_m(out_pos, site_point) : (out_lat != 0 || out_lng != 0 ? distance_m({'lat': out_lat, 'lng': out_lng}, site_point) : distance_m(out_pos, site_point))"}
|
|
128
|
+
- {name: out_located, type: check, label: {id: Lokasi keluar ada}, read_only: true, compute: "out_m < 100000000.0"}
|
|
147
129
|
- name: out_inside
|
|
148
130
|
type: check
|
|
149
131
|
label: {id: Keluar di dalam radius}
|
|
150
132
|
read_only: true
|
|
151
|
-
compute: "out_located && work_site != '' &&
|
|
133
|
+
compute: "out_located && work_site != '' && out_m <= site_radius_m"
|
|
152
134
|
- name: out_site_m
|
|
153
135
|
type: int
|
|
154
136
|
label: {id: Jarak keluar dari lokasi (m)}
|
|
155
137
|
read_only: true
|
|
156
|
-
compute: "!out_located || work_site == '' ? 0 : round(
|
|
138
|
+
compute: "!out_located || work_site == '' ? 0 : round(out_m)"
|
|
157
139
|
# Outside: clock-in not inside the radius (or no position), or a clock-out entered and not inside.
|
|
158
140
|
- name: outside_site
|
|
159
141
|
type: check
|
|
@@ -190,30 +172,45 @@ rules:
|
|
|
190
172
|
on: save
|
|
191
173
|
check: work_date <= today()
|
|
192
174
|
message: {id: 'Tidak bisa absen untuk tanggal yang belum datang'}
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
- name: photo_is_attachment
|
|
175
|
+
# The clock-in falls on the day being paid (audit 8 Nov L9). A clock-in with a local offset (+07:00) starts with the
|
|
176
|
+
# local date. A UTC one (Z or +00:00, how the store keeps it) falls between 00:00 WIT and 24:00 WIB of that date:
|
|
177
|
+
# 15:00 UTC the day before up to 17:00 UTC (audit apps-low F3). The org timezone is not readable in CEL.
|
|
178
|
+
- name: clock_in_on_work_date
|
|
198
179
|
on: save
|
|
199
|
-
check:
|
|
200
|
-
|
|
180
|
+
check: >-
|
|
181
|
+
clock_in == '' || ((clock_in.endsWith('Z') || clock_in.endsWith('+00:00'))
|
|
182
|
+
? ((clock_in.startsWith(work_date) && clock_in < work_date + 'T17:00:00')
|
|
183
|
+
|| (clock_in.startsWith(work_date - duration(1)) && clock_in >= (work_date - duration(1)) + 'T15:00:00'))
|
|
184
|
+
: clock_in.startsWith(work_date))
|
|
185
|
+
message: {id: 'Jam masuk harus di tanggal absen'}
|
|
201
186
|
- name: out_after_in
|
|
202
187
|
on: save
|
|
203
|
-
check: clock_out == '' || clock_out > clock_in
|
|
188
|
+
check: clock_out == '' || (clock_in != '' && clock_out > clock_in)
|
|
204
189
|
message: {id: 'Jam keluar harus sesudah jam masuk'}
|
|
205
190
|
- name: overtime_range
|
|
206
191
|
on: save
|
|
207
192
|
check: overtime_hours >= 0 && overtime_hours <= 12
|
|
208
193
|
message: {id: 'Jam lembur 0 sampai 12 jam per hari'}
|
|
194
|
+
# The reason is asked at the clock-in (the clock screen shows the box only then, contract 0030 §2 clock). A clock-out
|
|
195
|
+
# outside the radius needs none: it still marks the log outside_site, so the submit waits for the supervisor, who
|
|
196
|
+
# sees the distance and the photo.
|
|
209
197
|
- name: reason_when_outside
|
|
210
198
|
on: save
|
|
211
|
-
check: "
|
|
199
|
+
check: "in_inside || size(reason) >= 5"
|
|
212
200
|
message: {id: 'Kamu di luar radius lokasi kerja (atau lokasi tidak terbaca): tulis alasannya'}
|
|
213
201
|
- name: reason_when_overtime
|
|
214
202
|
on: save
|
|
215
203
|
check: overtime_hours == 0 || size(reason) >= 5
|
|
216
204
|
message: {id: 'Tulis alasan atau pekerjaan lemburnya'}
|
|
205
|
+
- name: clocked_in
|
|
206
|
+
on: submit
|
|
207
|
+
check: clock_in != ''
|
|
208
|
+
message: {id: 'Isi jam masuk dulu (absen masuk) sebelum diajukan'}
|
|
209
|
+
# The clock-out photo is its own evidence, not the clock-in photo again (audit 2026-11-12 F4).
|
|
210
|
+
- name: out_photo_own
|
|
211
|
+
on: save
|
|
212
|
+
check: out_photo == '' || out_photo != in_photo
|
|
213
|
+
message: {id: 'Foto keluar harus foto baru, bukan foto masuk'}
|
|
217
214
|
- name: clocked_out
|
|
218
215
|
on: submit
|
|
219
216
|
check: clock_out != ''
|
|
@@ -253,12 +250,12 @@ views:
|
|
|
253
250
|
- [work_date, overtime_hours, outside_site]
|
|
254
251
|
- section: {id: Masuk}
|
|
255
252
|
columns:
|
|
256
|
-
- [clock_in, in_photo
|
|
257
|
-
- [
|
|
253
|
+
- [clock_in, in_photo]
|
|
254
|
+
- [in_pos, in_site_m, in_inside]
|
|
258
255
|
- section: {id: Keluar}
|
|
259
256
|
columns:
|
|
260
|
-
- [clock_out, out_photo
|
|
261
|
-
- [
|
|
257
|
+
- [clock_out, out_photo]
|
|
258
|
+
- [out_pos, out_site_m, out_inside]
|
|
262
259
|
- section: {id: Alasan}
|
|
263
260
|
fields: [reason]
|
|
264
261
|
- section: {id: Lokasi kerja}
|
|
@@ -37,6 +37,8 @@ fields:
|
|
|
37
37
|
type: float
|
|
38
38
|
label: {id: Bujur (lng)}
|
|
39
39
|
required: true
|
|
40
|
+
# The point as a position (contract 0030 §4 geo) for distance_m and the clock screen's site slot.
|
|
41
|
+
- {name: point, type: geo, label: {id: Titik lokasi}, read_only: true, compute: "{'lat': lat, 'lng': lng}"}
|
|
40
42
|
- name: radius_m
|
|
41
43
|
type: int
|
|
42
44
|
label: {id: Radius absen (meter)}
|
|
@@ -55,7 +57,6 @@ rules:
|
|
|
55
57
|
on: save
|
|
56
58
|
check: lat >= -90 && lat <= 90 && lng >= -180 && lng <= 180 && (lat != 0 || lng != 0)
|
|
57
59
|
message: {id: 'Titik lokasi tidak valid: lintang -90 sampai 90, bujur -180 sampai 180'}
|
|
58
|
-
# The distance check (attendance_log) is a flat-earth approximation, good to well under a metre for these distances.
|
|
59
60
|
- name: radius_range
|
|
60
61
|
on: save
|
|
61
62
|
check: radius_m >= 20 && radius_m <= 5000
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
2
|
name: projects
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
title: {id: Proyek, en: Projects}
|
|
5
5
|
summary:
|
|
6
6
|
id: Proyek dengan penugasan, absensi, biaya, termin tagihan dan untung per proyek.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
name: field_worker
|
|
3
3
|
label: {id: Pekerja lapangan}
|
|
4
4
|
description: {id: 'Absen masuk dan pulang di lokasi kerja, dan melihat absennya sendiri'}
|
|
5
|
+
# Works from the phone: the clock screen full screen (work shell, contract 0030 §3), no sidebar.
|
|
6
|
+
desk: false
|
|
5
7
|
# Contract 0010 §5: records whose worker is the member's own worker record (rangka user add --record WRK-0001), so a
|
|
6
8
|
# worker sees only their own logs and assignments. Pay and selling rates of an assignment are hidden (contract 0027).
|
|
7
9
|
scope: {field: worker, from: '[user.name]'}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
|
|
2
|
+
name: absen
|
|
3
|
+
type: clock
|
|
4
|
+
label: {id: Absen, en: Clock in}
|
|
5
|
+
icon: clock
|
|
6
|
+
# A worker clocks in and out at the client's site from their phone (plans/layar-kerja.md §3 #2, contract 0030 §2 clock).
|
|
7
|
+
# The site is today's assignment (the worker cannot read the firm's list of client sites, only their own assignments),
|
|
8
|
+
# its point and radius come from the work site. A clock-in outside the radius or without a position is saved with the
|
|
9
|
+
# reason and waits for the site supervisor (attendance_log approvals); the record's own computes decide, not the phone.
|
|
10
|
+
# No offline queue: every clock-in carries a photo, which needs the connection (contract 0030 §7).
|
|
11
|
+
roles: [field_worker]
|
|
12
|
+
device: phone
|
|
13
|
+
needs: [location, photo]
|
|
14
|
+
clock:
|
|
15
|
+
# The worker's own logs (row scope worker); the open one is the newest with a clock-in and no clock-out.
|
|
16
|
+
record: {model: attendance_log, filter: "docstatus == 0", set: {worker: user.name}}
|
|
17
|
+
in: {field: clock_in, location: in_pos, photo: in_photo}
|
|
18
|
+
out: {field: clock_out, location: out_pos, photo: out_photo}
|
|
19
|
+
site: {model: assignment, link: assignment, filter: "start_date <= today() && end_date >= today() && work_site != ''", title: site_name, location: site_point, radius_m: site_radius_m}
|
|
20
|
+
reason: reason
|
|
21
|
+
submit: true
|
|
@@ -73,10 +73,20 @@ fields:
|
|
|
73
73
|
# Not read_only: a generic amend zeroes read-only fields, and a zero dpp_den would break ppn (kernel follow-up).
|
|
74
74
|
- {name: dpp_num, type: int, label: {id: DPP nilai lain (pembilang)}, default: 'tax.dpp_num'}
|
|
75
75
|
- {name: dpp_den, type: int, label: {id: DPP nilai lain (penyebut)}, default: 'tax.dpp_den'}
|
|
76
|
+
# The PPN base as on the invoice (sales_invoice.ppn_base): the DPP, or with config tax.ppn_fee_only the share of the
|
|
77
|
+
# lines not marked ppn_exclude, so the quoted total equals the invoice's. No down payment on a quotation.
|
|
78
|
+
- name: ppn_base
|
|
79
|
+
type: currency
|
|
80
|
+
label: {id: Dasar PPN}
|
|
81
|
+
compute: >-
|
|
82
|
+
!('ppn_fee_only' in tax && tax.ppn_fee_only) ? dpp :
|
|
83
|
+
(currency != '' && currency != 'IDR'
|
|
84
|
+
? (items.map(i, i.amount_fx_idr).sum() == 0 ? 0 : round(dpp * 1.0 * items.map(i, i.ppn_exclude ? 0 : i.amount_fx_idr).sum() / items.map(i, i.amount_fx_idr).sum()))
|
|
85
|
+
: (subtotal == 0 ? 0 : round(dpp * 1.0 * items.map(i, i.ppn_exclude ? 0 : i.amount).sum() / subtotal)))
|
|
76
86
|
- name: ppn
|
|
77
87
|
type: currency
|
|
78
|
-
label: {id: PPN (
|
|
79
|
-
compute: "round(
|
|
88
|
+
label: {id: PPN (dasar PPN x rasio DPP nilai lain x tarif)}
|
|
89
|
+
compute: "round(ppn_base * dpp_num / dpp_den * tax_rate / 100)"
|
|
80
90
|
- name: grand_total
|
|
81
91
|
type: currency
|
|
82
92
|
label: {id: Total}
|
|
@@ -111,7 +121,7 @@ fields:
|
|
|
111
121
|
- {name: exchange_rate, type: float, label: {id: Kurs}, default: '1'}
|
|
112
122
|
- {name: subtotal_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Subtotal (valas)}, compute: "sum(items.map(i, i.amount_fx))"}
|
|
113
123
|
- {name: dpp_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: DPP (valas)}, compute: "subtotal_fx"}
|
|
114
|
-
- {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "round(dpp_fx * dpp_num / dpp_den * tax_rate / 100, 2)"}
|
|
124
|
+
- {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "dpp == 0 ? 0 : round(dpp_fx * (ppn_base * 1.0 / dpp) * dpp_num / dpp_den * tax_rate / 100, 2)"}
|
|
115
125
|
- {name: grand_total_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Total (valas)}, compute: "dpp_fx + ppn_fx"}
|
|
116
126
|
rules:
|
|
117
127
|
- name: foreign_needs_rate
|
|
@@ -186,7 +196,7 @@ views:
|
|
|
186
196
|
- section: {id: Harga}
|
|
187
197
|
columns:
|
|
188
198
|
- [subtotal, dpp]
|
|
189
|
-
- [tax_rate, dpp_num, dpp_den, ppn, grand_total]
|
|
199
|
+
- [tax_rate, dpp_num, dpp_den, ppn_base, ppn, grand_total]
|
|
190
200
|
- section: {id: Syarat}
|
|
191
201
|
columns:
|
|
192
202
|
- [payment_terms, delivery_terms]
|
|
@@ -32,6 +32,19 @@ fields:
|
|
|
32
32
|
type: currency
|
|
33
33
|
label: {id: Jumlah}
|
|
34
34
|
compute: round(qty * rate * (1 - discount / 100))
|
|
35
|
+
# The workers' wages or a reimbursed cost quoted on their own line: outside the PPh 23 base of the invoice made from
|
|
36
|
+
# the quotation (carried by the kernel conversions through the order); the quotation itself has no PPh 23.
|
|
37
|
+
- name: pph23_exclude
|
|
38
|
+
type: check
|
|
39
|
+
label: {id: Bukan dasar PPh 23}
|
|
40
|
+
default: 'false'
|
|
41
|
+
# The workers' wages quoted on their own line: outside the PPN base when the org charges PPN on its fee only
|
|
42
|
+
# (config tax.ppn_fee_only, PMK 83/2012), as on the invoice (sales_invoice_item.ppn_exclude).
|
|
43
|
+
- name: ppn_exclude
|
|
44
|
+
type: check
|
|
45
|
+
label: {id: Upah tenaga kerja (di luar dasar PPN)}
|
|
46
|
+
help: {id: 'Centang untuk baris upah pekerja yang dirinci terpisah; hanya berlaku bila usaha memakai PPN atas fee'}
|
|
47
|
+
default: 'false'
|
|
35
48
|
|
|
36
49
|
- {name: rate_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Harga (valas)}, default: '0'}
|
|
37
50
|
- {name: amount_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Jumlah (valas)}, compute: "round(qty * rate_fx * (1 - discount / 100), 2)"}
|
|
@@ -48,8 +48,22 @@
|
|
|
48
48
|
{{end}}
|
|
49
49
|
<table class="totals">
|
|
50
50
|
<tr><td>Subtotal</td><td class="num">{{rupiah .Doc.subtotal}}</td></tr>
|
|
51
|
-
<tr><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>
|
|
52
|
-
{{if taxrate .Doc .Tax}}<tr><td>
|
|
51
|
+
{{if not (taxrate .Doc .Tax)}}<tr><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>{{end}}
|
|
52
|
+
{{if taxrate .Doc .Tax}}<tr><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>
|
|
53
|
+
{{- /* As on the faktur pajak (Coretax, PMK 131/2024): the base, then DPP nilai lain, then PPN = rate x DPP nilai lain.
|
|
54
|
+
An invoice of an org with PPN on the fee only (tax.ppn_fee_only, PMK 83/2012) shows the wages left out first; an
|
|
55
|
+
invoice from before ppn_base existed was taxed on its whole DPP. */}}
|
|
56
|
+
{{- /* the DPP only for a document from before ppn_base that charged PPN (as ppn_dp_base reads it); a base of 0 with
|
|
57
|
+
no PPN (wages only, or a settlement whose base the down payment used up) is that 0 */}}
|
|
58
|
+
{{- $pb := .Doc.dpp}}{{if or .Doc.ppn_base (not .Doc.ppn)}}{{$pb = or .Doc.ppn_base 0}}{{end}}
|
|
59
|
+
{{- if ne (dec $pb) (dec .Doc.dpp)}}
|
|
60
|
+
<tr><td>Upah tenaga kerja di luar dasar PPN (PMK 83/2012)</td><td class="num">-{{rupiah (sub .Doc.dpp $pb)}}</td></tr>
|
|
61
|
+
<tr><td>Dasar PPN</td><td class="num">{{rupiah $pb}}</td></tr>
|
|
62
|
+
{{- end}}
|
|
63
|
+
{{- if ne .Doc.dpp_num .Doc.dpp_den}}
|
|
64
|
+
<tr><td>DPP nilai lain {{.Doc.dpp_num}}/{{.Doc.dpp_den}}</td><td class="num">{{rupiah (round (div (mul $pb .Doc.dpp_num) .Doc.dpp_den))}}</td></tr>
|
|
65
|
+
{{- end}}
|
|
66
|
+
<tr><td>PPN {{number (taxrate .Doc .Tax)}}%</td><td class="num">{{rupiah .Doc.ppn}}</td></tr>{{end}}
|
|
53
67
|
<tr class="grand"><td>Total</td><td class="num">{{rupiah .Doc.grand_total}}</td></tr>
|
|
54
68
|
</table>
|
|
55
69
|
<p class="note"><strong>Terbilang:</strong> {{terbilang .Doc.grand_total}}</p>
|
|
@@ -3,7 +3,9 @@ name: rental_return_on_cancel
|
|
|
3
3
|
label: {id: Alat kembali dibatalkan}
|
|
4
4
|
# A return entered by mistake: the schedule goes back to out (the deposit journal is reversed by gl_rental_return_reverse),
|
|
5
5
|
# refused while the invoice for what the deposit did not cover is submitted (cancel that first). Its units go back out
|
|
6
|
-
# with the booking in the condition they left in, refused for a unit that went out again since.
|
|
6
|
+
# with the booking in the condition they left in, refused for a unit that went out again or moved to another item since. Each unit's last checkout
|
|
7
|
+
# becomes this booking's checkout again (the schedule keeps it), so that checkout can still be cancelled after a
|
|
8
|
+
# checkout of another booking took the unit and was cancelled in between (audit 8 Nov L1).
|
|
7
9
|
on: rental_return.cancelled
|
|
8
10
|
steps:
|
|
9
11
|
- {find: rental_schedule, where: booking == event.booking, as: s}
|
|
@@ -19,8 +21,8 @@ steps:
|
|
|
19
21
|
do:
|
|
20
22
|
- {find: rental_unit, where: name == row.unit, as: u}
|
|
21
23
|
- create: rental_guard
|
|
22
|
-
if: "u == null || u.state != 'in' || u.last_return != event.name"
|
|
24
|
+
if: "u == null || u.state != 'in' || u.last_return != event.name || u.rental_item != event.rental_item"
|
|
23
25
|
set: {reason: "'unit_moved'", document: event.name}
|
|
24
26
|
- update: u
|
|
25
27
|
if: u != null
|
|
26
|
-
set: {state: "'out'", booking: event.booking, condition: u.out_condition, last_return: "''"}
|
|
28
|
+
set: {state: "'out'", booking: event.booking, condition: u.out_condition, last_return: "''", last_checkout: "s != null ? s.checkout : ''"}
|
|
@@ -10,9 +10,10 @@ title_field: booking
|
|
|
10
10
|
# Handover (berita acara serah terima): the checklist lists each unit handed over and its condition; an item with
|
|
11
11
|
# track_units must list exactly the booked number of units, and the customer who receives them signs (signed_by,
|
|
12
12
|
# required on submit). A photo and the drawn signature are attachments of this record (contract 0011); their ids are
|
|
13
|
-
# kept in photo and signature
|
|
14
|
-
#
|
|
15
|
-
#
|
|
13
|
+
# kept in photo and signature (image and signature fields: the kernel accepts only an image attachment of this same
|
|
14
|
+
# record, contract 0030 §4). The warehouse fills it on the handover screen alat_keluar (opened from jadwal_alat with
|
|
15
|
+
# the booking prefilled): scan units, photo, signature, submit, BAST. The BAST prints from rental_bast_out. The flow
|
|
16
|
+
# marks each unit out with this booking and refuses a unit that is already out.
|
|
16
17
|
permissions:
|
|
17
18
|
- {role: sales_manager, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
18
19
|
# warehouse staff hand the equipment over (no money moves on a checkout); undoing one is the admin's
|
|
@@ -33,19 +34,21 @@ fields:
|
|
|
33
34
|
- {name: notes, type: text, label: {id: 'Catatan (kondisi alat, kelengkapan)'}}
|
|
34
35
|
- {name: signed_by, type: data, label: {id: Diterima oleh (nama penyewa)}, in_list: true}
|
|
35
36
|
- {name: handed_by, type: data, label: {id: Diserahkan oleh (petugas)}}
|
|
36
|
-
- {name: photo, type: image, label: {id: Foto alat saat keluar}, help: {id: '
|
|
37
|
-
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: '
|
|
37
|
+
- {name: photo, type: image, label: {id: Foto alat saat keluar}, help: {id: 'Foto pertama dari layar serah terima; foto lain ikut terlampir di catatan ini'}}
|
|
38
|
+
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: 'Ditandatangani di layar serah terima'}}
|
|
38
39
|
rules:
|
|
39
40
|
- name: booking_submitted
|
|
40
41
|
on: save
|
|
41
42
|
check: booking.docstatus == 1
|
|
42
43
|
message: {id: Pesanan sewa belum diajukan atau sudah batal}
|
|
44
|
+
# The handover screen (screens/alat_keluar.rk) creates the draft from the schedule, then saves the checklist one
|
|
45
|
+
# scan at a time: the count is checked when it is submitted (the unit moves happen at submit).
|
|
43
46
|
- name: units_required
|
|
44
|
-
on:
|
|
47
|
+
on: submit
|
|
45
48
|
check: "!track_units || units.size() > 0"
|
|
46
49
|
message: {id: 'Alat ini diserahkan per unit: isi checklist unit yang keluar'}
|
|
47
50
|
- name: units_match_qty
|
|
48
|
-
on:
|
|
51
|
+
on: submit
|
|
49
52
|
check: units.size() == 0 || units.size() == qty
|
|
50
53
|
message: {id: Jumlah unit di checklist harus sama dengan jumlah unit pesanan}
|
|
51
54
|
- name: units_of_item
|
|
@@ -68,14 +71,6 @@ rules:
|
|
|
68
71
|
on: save
|
|
69
72
|
check: signature == '' || signed_by != ''
|
|
70
73
|
message: {id: Tanda tangan perlu nama penyewa yang menandatangani}
|
|
71
|
-
- name: photo_is_attachment
|
|
72
|
-
on: save
|
|
73
|
-
check: "photo == '' || photo.startsWith('att_')"
|
|
74
|
-
message: {id: 'Foto harus berupa lampiran catatan ini (id att_...)'}
|
|
75
|
-
- name: signature_is_attachment
|
|
76
|
-
on: save
|
|
77
|
-
check: "signature == '' || signature.startsWith('att_')"
|
|
78
|
-
message: {id: 'Tanda tangan harus berupa lampiran catatan ini (id att_...)'}
|
|
79
74
|
views:
|
|
80
75
|
list:
|
|
81
76
|
columns: [name, booking, customer, rental_item, out_date, signed_by, status]
|
|
@@ -63,8 +63,8 @@ fields:
|
|
|
63
63
|
- {value: transfer, label: {id: Transfer bank}}
|
|
64
64
|
- {name: signed_by, type: data, label: {id: Diserahkan kembali oleh (nama penyewa)}, in_list: true}
|
|
65
65
|
- {name: received_by, type: data, label: {id: Diterima oleh (petugas)}}
|
|
66
|
-
- {name: photo, type: image, label: {id: Foto alat saat kembali}, help: {id: '
|
|
67
|
-
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: '
|
|
66
|
+
- {name: photo, type: image, label: {id: Foto alat saat kembali}, help: {id: 'Foto pertama dari layar serah terima; foto kerusakan lain ikut terlampir di catatan ini'}}
|
|
67
|
+
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: 'Ditandatangani di layar serah terima'}}
|
|
68
68
|
rules:
|
|
69
69
|
- name: booking_submitted
|
|
70
70
|
on: save
|
|
@@ -84,7 +84,7 @@ rules:
|
|
|
84
84
|
check: "damage_fee >= 0 && units.map(r, r.fee < 0 ? 1 : 0).sum() == 0"
|
|
85
85
|
message: {id: Biaya kerusakan tidak boleh minus}
|
|
86
86
|
- name: units_match_qty
|
|
87
|
-
on:
|
|
87
|
+
on: submit
|
|
88
88
|
check: units.size() == 0 || units.size() == qty
|
|
89
89
|
message: {id: 'Jumlah unit di checklist harus sama dengan jumlah unit pesanan (unit hilang tetap dicatat, kondisi Hilang)'}
|
|
90
90
|
- name: units_of_item
|
|
@@ -108,14 +108,6 @@ rules:
|
|
|
108
108
|
on: save
|
|
109
109
|
check: signature == '' || signed_by != ''
|
|
110
110
|
message: {id: Tanda tangan perlu nama penyewa yang menandatangani}
|
|
111
|
-
- name: photo_is_attachment
|
|
112
|
-
on: save
|
|
113
|
-
check: "photo == '' || photo.startsWith('att_')"
|
|
114
|
-
message: {id: 'Foto harus berupa lampiran catatan ini (id att_...)'}
|
|
115
|
-
- name: signature_is_attachment
|
|
116
|
-
on: save
|
|
117
|
-
check: "signature == '' || signature.startsWith('att_')"
|
|
118
|
-
message: {id: 'Tanda tangan harus berupa lampiran catatan ini (id att_...)'}
|
|
119
111
|
views:
|
|
120
112
|
list:
|
|
121
113
|
columns: [name, booking, customer, return_date, late_days, signed_by, deposit_refund, extra_due, status]
|
|
@@ -37,6 +37,14 @@ fields:
|
|
|
37
37
|
- {name: returned_date, type: date, label: {id: Tanggal kembali aktual}, read_only: true}
|
|
38
38
|
- {name: checkout, type: link, to: rental_checkout, label: {id: Bukti alat keluar}, read_only: true}
|
|
39
39
|
- {name: rental_return, type: link, to: rental_return, label: {id: Bukti alat kembali}, read_only: true}
|
|
40
|
+
# For the warehouse's route of the day (screens/jadwal_alat.rk): what to do with this booking today.
|
|
41
|
+
- {name: item_title, type: data, label: {id: Nama alat}, read_only: true, compute: "rental_item.title"}
|
|
42
|
+
- {name: customer_name, type: data, label: {id: Nama pelanggan}, read_only: true, compute: "customer.customer_name"}
|
|
43
|
+
- name: todo
|
|
44
|
+
type: data
|
|
45
|
+
label: {id: Tugas hari ini}
|
|
46
|
+
read_only: true
|
|
47
|
+
compute: "state == 'booked' ? 'Serahkan ke ' + customer_name : (state == 'out' ? 'Terima kembali dari ' + customer_name : '')"
|
|
40
48
|
rules:
|
|
41
49
|
# Made by rental_booking_on_submit inside the booking's submit; a row for a draft booking (made by hand) would hold
|
|
42
50
|
# units for a booking that was never confirmed, and would block that booking's own row (booking is unique).
|
|
@@ -54,6 +54,13 @@ fields:
|
|
|
54
54
|
- {name: last_return, type: link, to: rental_return, label: {id: Alat kembali terakhir}, read_only: true}
|
|
55
55
|
- {name: active, type: check, label: {id: Masih dipakai}, default: 'true'}
|
|
56
56
|
- {name: notes, type: text, label: {id: Catatan}}
|
|
57
|
+
rules:
|
|
58
|
+
# A unit out with a booking stays a unit of the booked item until it comes back (audit 8 Nov L2): moving it to another
|
|
59
|
+
# item's pool while out would lock the booking's return (units_of_item) and count it twice.
|
|
60
|
+
- name: item_locked_while_out
|
|
61
|
+
on: save
|
|
62
|
+
check: state != 'out' || booking == '' || rental_item == booking.rental_item
|
|
63
|
+
message: {id: 'Unit sedang keluar: alatnya tidak bisa diganti sampai unit kembali'}
|
|
57
64
|
views:
|
|
58
65
|
list:
|
|
59
66
|
columns: [code, rental_item, serial_no, condition, state, booking]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
2
|
name: rental
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
title: {id: Sewa alat, en: Equipment rental}
|
|
5
5
|
summary:
|
|
6
6
|
id: Sewa alat dengan jadwal tanpa bentrok, alat keluar dan kembali.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
|
|
2
|
+
name: alat_keluar
|
|
3
|
+
type: handover
|
|
4
|
+
label: {id: Serah alat keluar, en: Equipment out}
|
|
5
|
+
icon: truck
|
|
6
|
+
# Equipment goes out with proof (contract 0030 §2 handover, WS8): scan each unit (rental_unit.code), mark its
|
|
7
|
+
# condition, at least one photo, the renter signs, submit, print the BAST. Opened from jadwal_alat, the new draft gets
|
|
8
|
+
# the booking of that stop; otherwise the warehouse's drafts are offered. Units, deposit and schedule move in
|
|
9
|
+
# rental_checkout and its submit flow (audited there), not in the screen. Photos and the signature need the connection.
|
|
10
|
+
roles: [rental_staff, sales_manager]
|
|
11
|
+
device: tablet
|
|
12
|
+
needs: [scan, photo, signature, print]
|
|
13
|
+
handover:
|
|
14
|
+
document: {model: rental_checkout, find: "docstatus == 0", create: true, set: {booking: stop.booking}, title: item_title, subtitle: customer_name}
|
|
15
|
+
rows: {table: units, unit: unit, condition: condition, note: notes}
|
|
16
|
+
scan: {match: code}
|
|
17
|
+
photos: {field: photo, min: 1}
|
|
18
|
+
signature: {field: signature, by: signed_by}
|
|
19
|
+
print: rental_bast_out
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
|
|
2
|
+
name: alat_kembali
|
|
3
|
+
type: handover
|
|
4
|
+
label: {id: Terima alat kembali, en: Equipment back}
|
|
5
|
+
icon: undo
|
|
6
|
+
# Equipment comes back with proof (contract 0030 §2 handover): scan each unit, mark its condition (Hilang for a lost
|
|
7
|
+
# one), photos of the damage, the renter signs. The warehouse only saves the checklist (submit: false): the damage
|
|
8
|
+
# fees and the submit, which pays the deposit back, stay with the admin (rental_return permissions). Opened from
|
|
9
|
+
# jadwal_alat the new draft gets the booking; return_date defaults to today, the actual day.
|
|
10
|
+
roles: [rental_staff, sales_manager]
|
|
11
|
+
device: tablet
|
|
12
|
+
needs: [scan, photo, signature]
|
|
13
|
+
handover:
|
|
14
|
+
document: {model: rental_return, find: "docstatus == 0", create: true, set: {booking: stop.booking}, title: item_title, subtitle: customer_name}
|
|
15
|
+
rows: {table: units, unit: unit, condition: condition, note: notes}
|
|
16
|
+
scan: {match: code}
|
|
17
|
+
photos: {field: photo, min: 1}
|
|
18
|
+
signature: {field: signature, by: signed_by}
|
|
19
|
+
submit: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
|
|
2
|
+
name: jadwal_alat
|
|
3
|
+
type: route
|
|
4
|
+
label: {id: Jadwal alat hari ini, en: Today's equipment}
|
|
5
|
+
icon: calendar
|
|
6
|
+
# The warehouse's list of the day (plans/layar-kerja.md §3 #6-7): bookings whose equipment goes out today (or is
|
|
7
|
+
# overdue to go out) and those due back today or late. Each opens the handover screen with the booking prefilled
|
|
8
|
+
# (contract 0030 §2 route actions, ?stop=rental_schedule/<name>). No visit record and no position: the stops are at
|
|
9
|
+
# the counter, not places to drive to.
|
|
10
|
+
roles: [rental_staff, sales_manager]
|
|
11
|
+
device: tablet
|
|
12
|
+
route:
|
|
13
|
+
stops:
|
|
14
|
+
model: rental_schedule
|
|
15
|
+
filter: "(state == 'booked' && start_date <= today()) || (state == 'out' && end_date <= today())"
|
|
16
|
+
sort: start_date
|
|
17
|
+
title: item_title
|
|
18
|
+
subtitle: todo
|
|
19
|
+
actions:
|
|
20
|
+
- {label: {id: Serah keluar, en: Hand out}, screen: alat_keluar}
|
|
21
|
+
- {label: {id: Terima kembali, en: Take back}, screen: alat_kembali}
|