@rangka-os/create 0.5.0-alpha.10 → 0.5.0-alpha.11
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/dapur/app.rk +35 -0
- package/template/base/apps/dapur/dashboards/dapur_hari_ini.rk +26 -0
- package/template/base/apps/fnb_cabang/app.rk +2 -2
- package/template/base/apps/fnb_cabang/dashboards/outlet_harian.rk +36 -0
- package/template/base/apps/jasa_proyek/app.rk +5 -2
- package/template/base/apps/jasa_proyek/dashboards/absen_saya.rk +15 -0
- package/template/base/apps/jasa_proyek/dashboards/rekap_absen.rk +18 -0
- package/template/base/apps/kelas_kursus/app.rk +1 -1
- package/template/base/apps/kelas_kursus/dashboards/kelas_saya.rk +41 -0
- package/template/base/apps/penjualan_harian/app.rk +1 -1
- package/template/base/apps/ritel_cabang/app.rk +1 -1
- package/template/base/apps/sewa_alat/app.rk +7 -5
- package/template/base/apps/sewa_alat/dashboards/alat_hari_ini.rk +90 -0
- package/template/base/apps/stok_outlet/app.rk +1 -1
- package/template/base/apps/stok_outlet/dashboards/outlet_hari_ini.rk +33 -0
- package/template/base/connectors/doku/connector.rk +128 -0
- package/template/base/connectors/doku/fixtures/create_checkout.json +6 -0
- package/template/base/connectors/doku/fixtures/expect.json +38 -0
- package/template/base/connectors/doku/fixtures/payment_notified.json +5 -0
- package/template/base/connectors/doku/fixtures/payment_notified_failed.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_no_type.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_null_type.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_refund.json +3 -0
- package/template/base/connectors/doku/mock/doku_mock.py +206 -0
- package/template/base/connectors/moka/connector.rk +46 -12
- package/template/base/connectors/moka/fixtures/expect.json +44 -0
- package/template/base/connectors/moka/fixtures/latest_transactions.json +79 -0
- package/template/base/connectors/moka/fixtures/list_items.json +4 -0
- package/template/base/connectors/moka/fixtures/list_outlets.json +4 -0
- package/template/base/connectors/moka/fixtures/transaction_created.json +44 -0
- package/template/base/connectors/moka/fixtures/transaction_created_refund.json +39 -0
- package/template/base/connectors/moka/fixtures/transaction_created_refund_later.json +51 -0
- package/template/base/modules/courses/models/course_batch.rk +7 -0
- package/template/base/modules/courses/models/course_session.rk +4 -1
- package/template/base/modules/courses/module.rk +1 -1
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_sale.rk +29 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_update.rk +26 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_void.rk +15 -0
- package/template/base/modules/kitchen/models/kitchen_guard.rk +35 -0
- package/template/base/modules/kitchen/models/kitchen_route.rk +26 -0
- package/template/base/modules/kitchen/models/kitchen_station.rk +40 -0
- package/template/base/modules/kitchen/models/kitchen_ticket.rk +78 -0
- package/template/base/modules/kitchen/models/kitchen_ticket_item.rk +10 -0
- package/template/base/modules/kitchen/module.rk +18 -0
- package/template/base/modules/kitchen/print/kitchen_ticket.html +29 -0
- package/template/base/modules/kitchen/print/kitchen_ticket.rk +9 -0
- package/template/base/modules/kitchen/roles/kitchen.rk +6 -0
- package/template/base/modules/kitchen/screens/dapur.rk +22 -0
- package/template/base/modules/outlet_sales/flows/moka_daily_sales.rk +57 -0
- package/template/base/modules/outlet_sales/flows/moka_line_mapped.rk +14 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_staged.rk +90 -0
- package/template/base/modules/outlet_sales/models/moka_sale_line.rk +53 -0
- package/template/base/modules/outlet_sales/models/moka_transaction.rk +26 -0
- package/template/base/modules/outlet_sales/models/outlet_sales.rk +4 -3
- package/template/base/modules/outlet_sales/module.rk +1 -1
- package/template/base/modules/outlets/models/outlet.rk +9 -0
- package/template/base/modules/payments/flows/payment_from_doku.rk +73 -0
- package/template/base/modules/payments/models/payment.rk +1 -0
- package/template/base/modules/payments/module.rk +1 -1
- package/template/base/modules/projects/flows/attendance_close_cancel_guard.rk +15 -0
- package/template/base/modules/projects/flows/attendance_close_on_submit.rk +64 -0
- package/template/base/modules/projects/flows/attendance_log_cancel_guard.rk +14 -0
- package/template/base/modules/projects/flows/attendance_log_guard_created.rk +15 -0
- package/template/base/modules/projects/flows/attendance_log_guard_submitted.rk +34 -0
- package/template/base/modules/projects/flows/attendance_log_guard_updated.rk +14 -0
- package/template/base/modules/projects/flows/timesheet_attendance_overlap_guard.rk +20 -0
- package/template/base/modules/projects/models/assignment.rk +21 -1
- package/template/base/modules/projects/models/attendance_close.rk +63 -0
- package/template/base/modules/projects/models/attendance_guard.rk +57 -0
- package/template/base/modules/projects/models/attendance_log.rk +266 -0
- package/template/base/modules/projects/models/timesheet.rk +7 -1
- package/template/base/modules/projects/models/work_site.rk +73 -0
- package/template/base/modules/projects/module.rk +1 -1
- package/template/base/modules/projects/roles/field_worker.rk +7 -0
- package/template/base/modules/projects/roles/site_supervisor.rk +7 -0
- package/template/base/modules/rental/flows/rental_checkout_on_cancel.rk +11 -0
- package/template/base/modules/rental/flows/rental_checkout_on_submit.rk +13 -1
- package/template/base/modules/rental/flows/rental_return_on_cancel.rk +12 -1
- package/template/base/modules/rental/flows/rental_return_on_submit.rk +17 -0
- package/template/base/modules/rental/models/rental_booking.rk +1 -0
- package/template/base/modules/rental/models/rental_checkout.rk +61 -2
- package/template/base/modules/rental/models/rental_checkout_unit.rk +22 -0
- package/template/base/modules/rental/models/rental_guard.rk +21 -0
- package/template/base/modules/rental/models/rental_item.rk +10 -2
- package/template/base/modules/rental/models/rental_return.rk +67 -8
- package/template/base/modules/rental/models/rental_return_unit.rk +29 -0
- package/template/base/modules/rental/models/rental_schedule.rk +2 -0
- package/template/base/modules/rental/models/rental_unit.rk +73 -0
- package/template/base/modules/rental/module.rk +7 -1
- package/template/base/modules/rental/print/rental_bast_in.html +107 -0
- package/template/base/modules/rental/print/rental_bast_in.rk +9 -0
- package/template/base/modules/rental/print/rental_bast_out.html +98 -0
- package/template/base/modules/rental/print/rental_bast_out.rk +11 -0
- package/template/base/modules/rental/roles/rental_staff.rk +7 -0
|
@@ -5,10 +5,13 @@ icon: stock
|
|
|
5
5
|
naming: ALT-{####}
|
|
6
6
|
title_field: title
|
|
7
7
|
# A catalogue item rented out by the day: how many units there are, the rate per unit per day, the deposit per unit
|
|
8
|
-
# and the late fee per unit per day. A booking copies the rate, deposit and late fee when it is made.
|
|
8
|
+
# and the late fee per unit per day. A booking copies the rate, deposit and late fee when it is made. With track_units
|
|
9
|
+
# on, its units are registered one by one (rental_unit) and every checkout and return lists which units, with a
|
|
10
|
+
# condition checklist, the customer's signature and a printed BAST (berita acara serah terima).
|
|
9
11
|
permissions:
|
|
10
12
|
- {role: finance_manager, read: true, create: true, write: true, export: true, print: true}
|
|
11
13
|
- {role: sales_manager, read: true, export: true}
|
|
14
|
+
- {role: rental_staff, read: true}
|
|
12
15
|
- {role: head_office, read: true, export: true}
|
|
13
16
|
fields:
|
|
14
17
|
- name: item
|
|
@@ -44,6 +47,11 @@ fields:
|
|
|
44
47
|
label: {id: Denda telat per hari}
|
|
45
48
|
help: {id: Per unit untuk setiap hari lewat dari tanggal kembali}
|
|
46
49
|
default: '0'
|
|
50
|
+
- name: track_units
|
|
51
|
+
type: check
|
|
52
|
+
label: {id: Serah terima per unit}
|
|
53
|
+
help: {id: 'Nyalakan kalau tiap unit punya kode atau nomor seri: alat keluar dan kembali wajib mencatat unit, kondisi, dan nama penyewa'}
|
|
54
|
+
default: 'false'
|
|
47
55
|
- name: active
|
|
48
56
|
type: check
|
|
49
57
|
label: {id: Masih disewakan}
|
|
@@ -69,7 +77,7 @@ views:
|
|
|
69
77
|
layout:
|
|
70
78
|
- section: {id: Alat}
|
|
71
79
|
columns:
|
|
72
|
-
- [item, title, units, active]
|
|
80
|
+
- [item, title, units, track_units, active]
|
|
73
81
|
- [daily_rate, deposit_per_unit, late_fee_per_day]
|
|
74
82
|
- section: {id: Catatan}
|
|
75
83
|
fields: [notes]
|
|
@@ -11,14 +11,27 @@ title_field: booking
|
|
|
11
11
|
# deposit does not cover (extra_due) becomes a draft invoice to the customer. Submitting it moves the schedule from
|
|
12
12
|
# out to returned (flow rental_return_on_submit); cancelling it moves it back, refused once the extra invoice is
|
|
13
13
|
# submitted. The late fee counts at most 60 days; a loss beyond that is charged as damage (Biaya kerusakan atau hilang).
|
|
14
|
+
# Handover: the checklist lists each unit back, its condition and what its damage or loss costs (fee per row). The
|
|
15
|
+
# fees of the rows (unit_damage) plus any other damage typed in damage_fee are the damage (total_damage) kept from the
|
|
16
|
+
# deposit after the late fee. A return must bring back exactly the units that went out with the booking (the lost
|
|
17
|
+
# ones as rows marked hilang; checked by flow rental_return_on_submit, so a booking that went out by count before
|
|
18
|
+
# track_units was switched on still comes back by count), and for an item with track_units the customer signs. Photo and signature are attachments,
|
|
19
|
+
# as on the checkout. The BAST prints from rental_bast_in. Warehouse staff fill the checklist; the admin submits,
|
|
20
|
+
# since the submit pays the deposit back.
|
|
14
21
|
permissions:
|
|
15
22
|
- {role: sales_manager, read: true, create: true, write: true, delete: true, submit: true, export: true, print: true}
|
|
23
|
+
- {role: rental_staff, read: true, create: true, write: true, delete: true, export: true, print: true}
|
|
16
24
|
- {role: finance_manager, read: true, cancel: true, amend: true, export: true, print: true}
|
|
17
25
|
- {role: head_office, read: true, export: true, print: true}
|
|
18
26
|
fields:
|
|
19
27
|
- {name: booking, type: link, to: rental_booking, label: {id: Pesanan sewa}, required: true, in_list: true}
|
|
20
28
|
- {name: customer, type: data, label: {id: Pelanggan}, compute: booking.customer, in_list: true}
|
|
21
29
|
- {name: rental_item, type: data, label: {id: Alat}, compute: booking.rental_item}
|
|
30
|
+
- {name: track_units, type: check, label: {id: Serah terima per unit}, compute: booking.rental_item.track_units}
|
|
31
|
+
- {name: qty, type: int, label: {id: Jumlah unit}, compute: booking.qty}
|
|
32
|
+
# names for the BAST (prints only resolve top-level links)
|
|
33
|
+
- {name: customer_name, type: data, label: {id: Nama pelanggan}, hidden: true, compute: booking.customer.customer_name}
|
|
34
|
+
- {name: item_title, type: data, label: {id: Nama alat}, hidden: true, compute: booking.rental_item.title}
|
|
22
35
|
- {name: return_date, type: date, label: {id: Tanggal kembali aktual}, required: true, default: today(), in_list: true}
|
|
23
36
|
- {name: planned_end, type: date, label: {id: Seharusnya kembali}, compute: booking.end_date}
|
|
24
37
|
- name: late_days
|
|
@@ -29,15 +42,18 @@ fields:
|
|
|
29
42
|
(booking.end_date + duration(1) <= return_date ? 1 : 0) + (booking.end_date + duration(2) <= return_date ? 1 : 0) + (booking.end_date + duration(3) <= return_date ? 1 : 0) + (booking.end_date + duration(4) <= return_date ? 1 : 0) + (booking.end_date + duration(5) <= return_date ? 1 : 0) + (booking.end_date + duration(6) <= return_date ? 1 : 0) + (booking.end_date + duration(7) <= return_date ? 1 : 0) + (booking.end_date + duration(8) <= return_date ? 1 : 0) + (booking.end_date + duration(9) <= return_date ? 1 : 0) + (booking.end_date + duration(10) <= return_date ? 1 : 0) + (booking.end_date + duration(11) <= return_date ? 1 : 0) + (booking.end_date + duration(12) <= return_date ? 1 : 0) + (booking.end_date + duration(13) <= return_date ? 1 : 0) + (booking.end_date + duration(14) <= return_date ? 1 : 0) + (booking.end_date + duration(15) <= return_date ? 1 : 0) + (booking.end_date + duration(16) <= return_date ? 1 : 0) + (booking.end_date + duration(17) <= return_date ? 1 : 0) + (booking.end_date + duration(18) <= return_date ? 1 : 0) + (booking.end_date + duration(19) <= return_date ? 1 : 0) + (booking.end_date + duration(20) <= return_date ? 1 : 0) + (booking.end_date + duration(21) <= return_date ? 1 : 0) + (booking.end_date + duration(22) <= return_date ? 1 : 0) + (booking.end_date + duration(23) <= return_date ? 1 : 0) + (booking.end_date + duration(24) <= return_date ? 1 : 0) + (booking.end_date + duration(25) <= return_date ? 1 : 0) + (booking.end_date + duration(26) <= return_date ? 1 : 0) + (booking.end_date + duration(27) <= return_date ? 1 : 0) + (booking.end_date + duration(28) <= return_date ? 1 : 0) + (booking.end_date + duration(29) <= return_date ? 1 : 0) + (booking.end_date + duration(30) <= return_date ? 1 : 0) + (booking.end_date + duration(31) <= return_date ? 1 : 0) + (booking.end_date + duration(32) <= return_date ? 1 : 0) + (booking.end_date + duration(33) <= return_date ? 1 : 0) + (booking.end_date + duration(34) <= return_date ? 1 : 0) + (booking.end_date + duration(35) <= return_date ? 1 : 0) + (booking.end_date + duration(36) <= return_date ? 1 : 0) + (booking.end_date + duration(37) <= return_date ? 1 : 0) + (booking.end_date + duration(38) <= return_date ? 1 : 0) + (booking.end_date + duration(39) <= return_date ? 1 : 0) + (booking.end_date + duration(40) <= return_date ? 1 : 0) + (booking.end_date + duration(41) <= return_date ? 1 : 0) + (booking.end_date + duration(42) <= return_date ? 1 : 0) + (booking.end_date + duration(43) <= return_date ? 1 : 0) + (booking.end_date + duration(44) <= return_date ? 1 : 0) + (booking.end_date + duration(45) <= return_date ? 1 : 0) + (booking.end_date + duration(46) <= return_date ? 1 : 0) + (booking.end_date + duration(47) <= return_date ? 1 : 0) + (booking.end_date + duration(48) <= return_date ? 1 : 0) + (booking.end_date + duration(49) <= return_date ? 1 : 0) + (booking.end_date + duration(50) <= return_date ? 1 : 0) + (booking.end_date + duration(51) <= return_date ? 1 : 0) + (booking.end_date + duration(52) <= return_date ? 1 : 0) + (booking.end_date + duration(53) <= return_date ? 1 : 0) + (booking.end_date + duration(54) <= return_date ? 1 : 0) + (booking.end_date + duration(55) <= return_date ? 1 : 0) + (booking.end_date + duration(56) <= return_date ? 1 : 0) + (booking.end_date + duration(57) <= return_date ? 1 : 0) + (booking.end_date + duration(58) <= return_date ? 1 : 0) + (booking.end_date + duration(59) <= return_date ? 1 : 0) + (booking.end_date + duration(60) <= return_date ? 1 : 0)
|
|
30
43
|
in_list: true
|
|
31
44
|
- {name: late_fee, type: currency, label: {id: Denda telat}, compute: late_days * booking.qty * booking.late_fee_per_day}
|
|
32
|
-
- {name:
|
|
45
|
+
- {name: units, type: table, of: rental_return_unit, label: {id: Checklist unit}}
|
|
46
|
+
- {name: unit_damage, type: currency, label: {id: Kerusakan dari checklist}, compute: "units.map(r, r.fee).sum()"}
|
|
47
|
+
- {name: damage_fee, type: currency, label: {id: Biaya kerusakan atau hilang lain}, help: {id: 'Di luar checklist unit, misalnya kerugian telat lebih dari 60 hari'}, default: '0'}
|
|
48
|
+
- {name: total_damage, type: currency, label: {id: Total kerusakan atau hilang}, compute: unit_damage + damage_fee}
|
|
33
49
|
- {name: damage_notes, type: text, label: {id: Catatan kerusakan}}
|
|
34
50
|
- {name: deposit, type: currency, label: {id: Deposit diterima}, compute: booking.deposit}
|
|
35
51
|
# A PKP business charges PPN on the fee: nothing is kept from the deposit, the whole fee goes on the invoice (finding 3).
|
|
36
52
|
- {name: deposit_kept, type: check, label: {id: Denda dipotong dari deposit}, compute: '!tax.pkp'}
|
|
37
53
|
- {name: covered_late, type: currency, label: {id: Denda telat dipotong dari deposit}, compute: "!deposit_kept ? 0 : (late_fee < deposit ? late_fee : deposit)"}
|
|
38
|
-
- {name: covered_damage, type: currency, label: {id: Kerusakan dipotong dari deposit}, compute: "!deposit_kept ? 0 : (
|
|
54
|
+
- {name: covered_damage, type: currency, label: {id: Kerusakan dipotong dari deposit}, compute: "!deposit_kept ? 0 : (total_damage < deposit - covered_late ? total_damage : deposit - covered_late)"}
|
|
39
55
|
- {name: deposit_refund, type: currency, label: {id: Deposit dikembalikan}, compute: deposit - covered_late - covered_damage, in_list: true}
|
|
40
|
-
- {name: extra_due, type: currency, label: {id: Kekurangan ditagih}, compute: late_fee +
|
|
56
|
+
- {name: extra_due, type: currency, label: {id: Kekurangan ditagih}, compute: late_fee + total_damage - covered_late - covered_damage, in_list: true}
|
|
41
57
|
- name: refund_method
|
|
42
58
|
type: select
|
|
43
59
|
label: {id: Deposit dikembalikan lewat}
|
|
@@ -45,6 +61,10 @@ fields:
|
|
|
45
61
|
options:
|
|
46
62
|
- {value: cash, label: {id: Tunai}}
|
|
47
63
|
- {value: transfer, label: {id: Transfer bank}}
|
|
64
|
+
- {name: signed_by, type: data, label: {id: Diserahkan kembali oleh (nama penyewa)}, in_list: true}
|
|
65
|
+
- {name: received_by, type: data, label: {id: Diterima oleh (petugas)}}
|
|
66
|
+
- {name: photo, type: image, label: {id: Foto alat saat kembali}, help: {id: 'Id lampiran foto (att_...). Foto kerusakan lain cukup dilampirkan ke catatan ini'}}
|
|
67
|
+
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: 'Id lampiran gambar tanda tangan (att_...)'}}
|
|
48
68
|
rules:
|
|
49
69
|
- name: booking_submitted
|
|
50
70
|
on: save
|
|
@@ -58,26 +78,65 @@ rules:
|
|
|
58
78
|
on: save
|
|
59
79
|
level: warn
|
|
60
80
|
check: return_date <= booking.end_date + duration(60)
|
|
61
|
-
message: {id: 'Telat lebih dari 60 hari: denda telat dihitung 60 hari saja. Masukkan sisa kerugian di biaya kerusakan atau hilang.'}
|
|
81
|
+
message: {id: 'Telat lebih dari 60 hari: denda telat dihitung 60 hari saja. Masukkan sisa kerugian di biaya kerusakan atau hilang lain.'}
|
|
62
82
|
- name: damage_not_negative
|
|
63
83
|
on: save
|
|
64
|
-
check: damage_fee >= 0
|
|
84
|
+
check: "damage_fee >= 0 && units.map(r, r.fee < 0 ? 1 : 0).sum() == 0"
|
|
65
85
|
message: {id: Biaya kerusakan tidak boleh minus}
|
|
86
|
+
- name: units_match_qty
|
|
87
|
+
on: save
|
|
88
|
+
check: units.size() == 0 || units.size() == qty
|
|
89
|
+
message: {id: 'Jumlah unit di checklist harus sama dengan jumlah unit pesanan (unit hilang tetap dicatat, kondisi Hilang)'}
|
|
90
|
+
- name: units_of_item
|
|
91
|
+
on: save
|
|
92
|
+
check: "units.map(r, r.unit_item == rental_item ? 0 : 1).sum() == 0"
|
|
93
|
+
message: {id: Ada unit dari alat lain di checklist}
|
|
94
|
+
- name: units_unique
|
|
95
|
+
on: save
|
|
96
|
+
check: "units.map(r, units.map(x, x.unit == r.unit ? 1 : 0).sum()).sum() == units.size()"
|
|
97
|
+
message: {id: Unit yang sama tercatat dua kali di checklist}
|
|
98
|
+
- name: damage_without_fee
|
|
99
|
+
on: save
|
|
100
|
+
level: warn
|
|
101
|
+
check: "units.map(r, (r.condition == 'rusak' || r.condition == 'hilang') && r.fee == 0 ? 1 : 0).sum() == 0"
|
|
102
|
+
message: {id: 'Ada unit rusak atau hilang tanpa biaya. Isi biayanya kalau ditagihkan ke penyewa.'}
|
|
103
|
+
- name: signed_by_required
|
|
104
|
+
on: submit
|
|
105
|
+
check: "!track_units || signed_by != ''"
|
|
106
|
+
message: {id: Isi nama penyewa yang mengembalikan alat (tanda tangan berita acara)}
|
|
107
|
+
- name: signature_needs_name
|
|
108
|
+
on: save
|
|
109
|
+
check: signature == '' || signed_by != ''
|
|
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_...)'}
|
|
66
119
|
views:
|
|
67
120
|
list:
|
|
68
|
-
columns: [name, booking, customer, return_date, late_days, deposit_refund, extra_due, status]
|
|
121
|
+
columns: [name, booking, customer, return_date, late_days, signed_by, deposit_refund, extra_due, status]
|
|
69
122
|
sort: -return_date
|
|
70
123
|
form:
|
|
71
124
|
layout:
|
|
72
125
|
- section: {id: Alat kembali}
|
|
73
126
|
columns:
|
|
74
127
|
- [booking, return_date, refund_method]
|
|
75
|
-
- [customer, rental_item, planned_end, late_days]
|
|
128
|
+
- [customer, rental_item, qty, planned_end, late_days, track_units]
|
|
129
|
+
- section: {id: Checklist unit}
|
|
130
|
+
fields: [units]
|
|
76
131
|
- section: {id: Denda dan kerusakan}
|
|
77
132
|
columns:
|
|
78
|
-
- [late_fee, damage_fee, damage_notes]
|
|
133
|
+
- [late_fee, unit_damage, damage_fee, total_damage, damage_notes]
|
|
79
134
|
- [deposit, deposit_kept, covered_late, covered_damage]
|
|
80
135
|
- section: {id: Hasil}
|
|
81
136
|
columns:
|
|
82
137
|
- [deposit_refund]
|
|
83
138
|
- [extra_due]
|
|
139
|
+
- section: {id: Serah terima}
|
|
140
|
+
columns:
|
|
141
|
+
- [signed_by, received_by]
|
|
142
|
+
- [photo, signature]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# A row of the return checklist: one unit back from the customer, its condition when it went out (from the unit) and
|
|
3
|
+
# now, and what the damage or loss of this unit costs. The fees of all rows are the checklist damage of the return
|
|
4
|
+
# (rental_return.unit_damage), kept from the deposit like the late fee.
|
|
5
|
+
name: rental_return_unit
|
|
6
|
+
is_child: true
|
|
7
|
+
fields:
|
|
8
|
+
- {name: unit, type: link, to: rental_unit, label: {id: Unit}, required: true, peek: [serial_no, condition]}
|
|
9
|
+
- {name: unit_code, type: data, label: {id: Kode unit}, compute: unit.code}
|
|
10
|
+
- {name: serial_no, type: data, label: {id: Nomor seri}, compute: unit.serial_no}
|
|
11
|
+
- {name: unit_item, type: data, label: {id: Alat unit}, hidden: true, compute: unit.rental_item}
|
|
12
|
+
# the unit's condition at checkout; the unit keeps it while it is out (computed when the row is saved)
|
|
13
|
+
- {name: out_condition, type: data, label: {id: Kondisi saat keluar}, compute: "unit.state == 'out' ? unit.out_condition : ''"}
|
|
14
|
+
- name: condition
|
|
15
|
+
type: select
|
|
16
|
+
label: {id: Kondisi kembali}
|
|
17
|
+
required: true
|
|
18
|
+
default: "'lengkap'"
|
|
19
|
+
options:
|
|
20
|
+
- {value: lengkap, label: {id: 'Lengkap, baik'}}
|
|
21
|
+
- {value: lecet, label: {id: Lecet}}
|
|
22
|
+
- {value: rusak, label: {id: Rusak}}
|
|
23
|
+
- {value: hilang, label: {id: Hilang}}
|
|
24
|
+
- name: fee
|
|
25
|
+
type: currency
|
|
26
|
+
label: {id: Biaya kerusakan atau hilang}
|
|
27
|
+
help: {id: 'Biaya perbaikan atau ganti unit ini. Dipotong dari deposit bersama denda telat'}
|
|
28
|
+
default: '0'
|
|
29
|
+
- {name: notes, type: data, label: {id: Catatan}, help: {id: 'Misalnya lensa tergores, charger tidak kembali'}}
|
|
@@ -10,6 +10,8 @@ title_field: rental_item
|
|
|
10
10
|
permissions:
|
|
11
11
|
- {role: sales_manager, read: true, create: true, write: true, export: true}
|
|
12
12
|
- {role: finance_manager, read: true, write: true, export: true}
|
|
13
|
+
# write: the checkout flow of the warehouse staff moves the schedule to out (its fields are read_only)
|
|
14
|
+
- {role: rental_staff, read: true, write: true}
|
|
13
15
|
- {role: head_office, read: true, export: true}
|
|
14
16
|
fields:
|
|
15
17
|
- {name: booking, type: link, to: rental_booking, label: {id: Pesanan sewa}, required: true, unique: true, read_only: true, in_list: true}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_unit
|
|
3
|
+
label: {id: Unit alat, en: Rental unit}
|
|
4
|
+
icon: tag
|
|
5
|
+
naming: UNT-{#####}
|
|
6
|
+
title_field: code
|
|
7
|
+
# One physical unit of a rental item (a camera body, a sound system set), with the code on its sticker or barcode and
|
|
8
|
+
# its serial number. An item with "Serah terima per unit" on (rental_item.track_units) goes out and comes back by
|
|
9
|
+
# unit: the checkout and the return list which units, in what condition (checklist). Where the unit is (state,
|
|
10
|
+
# booking, last documents) is written only by the flows of this module (rental_checkout_on_submit and the others);
|
|
11
|
+
# the condition is also editable by hand, so a unit repaired or found again can go out again.
|
|
12
|
+
permissions:
|
|
13
|
+
- {role: finance_manager, read: true, create: true, write: true, export: true, print: true}
|
|
14
|
+
# write: the checkout and return flows of whoever submits or cancels them update the unit (state fields read_only)
|
|
15
|
+
- {role: sales_manager, read: true, create: true, write: true, export: true}
|
|
16
|
+
- {role: rental_staff, read: true, write: true, export: true}
|
|
17
|
+
- {role: head_office, read: true, export: true}
|
|
18
|
+
fields:
|
|
19
|
+
- {name: rental_item, type: link, to: rental_item, label: {id: Alat}, required: true, in_list: true}
|
|
20
|
+
- name: code
|
|
21
|
+
type: data
|
|
22
|
+
label: {id: Kode unit}
|
|
23
|
+
help: {id: 'Tulisan di stiker atau barcode unit, misalnya KAM-A-01'}
|
|
24
|
+
required: true
|
|
25
|
+
unique: true
|
|
26
|
+
in_list: true
|
|
27
|
+
- {name: serial_no, type: data, label: {id: Nomor seri}, in_list: true}
|
|
28
|
+
- name: condition
|
|
29
|
+
type: select
|
|
30
|
+
label: {id: Kondisi terakhir}
|
|
31
|
+
help: {id: 'Diisi otomatis dari checklist alat keluar dan kembali. Ubah ke Lengkap setelah unit diperbaiki atau ditemukan'}
|
|
32
|
+
default: "'lengkap'"
|
|
33
|
+
in_list: true
|
|
34
|
+
chip: true
|
|
35
|
+
options:
|
|
36
|
+
- {value: lengkap, label: {id: 'Lengkap, baik'}}
|
|
37
|
+
- {value: lecet, label: {id: Lecet}}
|
|
38
|
+
- {value: rusak, label: {id: Rusak}}
|
|
39
|
+
- {value: hilang, label: {id: Hilang}}
|
|
40
|
+
- name: state
|
|
41
|
+
type: select
|
|
42
|
+
label: {id: Posisi}
|
|
43
|
+
default: "'in'"
|
|
44
|
+
read_only: true
|
|
45
|
+
in_list: true
|
|
46
|
+
chip: true
|
|
47
|
+
options:
|
|
48
|
+
- {value: in, label: {id: Di gudang}}
|
|
49
|
+
- {value: out, label: {id: Keluar}}
|
|
50
|
+
- {name: booking, type: link, to: rental_booking, label: {id: Sedang dipakai pesanan}, read_only: true}
|
|
51
|
+
# the condition written at checkout: a cancelled return puts it back
|
|
52
|
+
- {name: out_condition, type: data, label: {id: Kondisi saat keluar}, read_only: true, hidden: true}
|
|
53
|
+
- {name: last_checkout, type: link, to: rental_checkout, label: {id: Alat keluar terakhir}, read_only: true}
|
|
54
|
+
- {name: last_return, type: link, to: rental_return, label: {id: Alat kembali terakhir}, read_only: true}
|
|
55
|
+
- {name: active, type: check, label: {id: Masih dipakai}, default: 'true'}
|
|
56
|
+
- {name: notes, type: text, label: {id: Catatan}}
|
|
57
|
+
views:
|
|
58
|
+
list:
|
|
59
|
+
columns: [code, rental_item, serial_no, condition, state, booking]
|
|
60
|
+
filters: [rental_item, condition, state]
|
|
61
|
+
sort: code
|
|
62
|
+
form:
|
|
63
|
+
layout:
|
|
64
|
+
- section: {id: Unit}
|
|
65
|
+
columns:
|
|
66
|
+
- [rental_item, code, serial_no, active]
|
|
67
|
+
- [condition, state, booking]
|
|
68
|
+
- section: {id: Riwayat}
|
|
69
|
+
columns:
|
|
70
|
+
- [last_checkout]
|
|
71
|
+
- [last_return]
|
|
72
|
+
- section: {id: Catatan}
|
|
73
|
+
fields: [notes]
|
|
@@ -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.1.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.
|
|
@@ -15,5 +15,11 @@ icon: tools-line
|
|
|
15
15
|
# of their own with the actual dates; the return computes the late fee and damage, keeps them from the deposit and
|
|
16
16
|
# pays the rest back; what the deposit does not cover becomes a draft invoice. A submitted document cannot change, so
|
|
17
17
|
# the state of each booking lives in rental_schedule, written only by the flows of this module.
|
|
18
|
+
# 1.1 handover (plans/layar-kerja.md A6): units one by one (rental_unit) for an item with track_units; checkout and
|
|
19
|
+
# return carry a condition checklist per unit, a photo and the customer's signature as attachments (contract 0011,
|
|
20
|
+
# fields image and signature of contract 0030 §5) and print a BAST (rental_bast_out, rental_bast_in). The fees on the
|
|
21
|
+
# return checklist add to the damage kept from the deposit. Role rental_staff (staf gudang) hands over without money.
|
|
22
|
+
# The data matches the handover slot of contract 0030: document rental_checkout / rental_return, rows units {unit,
|
|
23
|
+
# condition}, scan by rental_unit.code, photos photo, signature signature by signed_by, print the BAST, submit.
|
|
18
24
|
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, invoicing: ^1.0}
|
|
19
25
|
optional: {accounting: ^1.0}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E, sama dengan surat jalan: netral, satu tanda merek, checklist per unit, dua tanda tangan. A5. */
|
|
3
|
+
.lh { display: flex; gap: 4mm; align-items: flex-start; padding-bottom: 4mm; margin-bottom: 5mm; border-bottom: 1px solid #1C1917; }
|
|
4
|
+
.lh .logo { max-height: 16mm; max-width: 40mm; }
|
|
5
|
+
.lh .mono { width: 12mm; height: 12mm; border-radius: 2.5mm; background: #1C1917; color: #fff; font-weight: 700; font-size: 16pt; line-height: 12mm; text-align: center; flex: none; }
|
|
6
|
+
.lh .legal-name { font-size: 1.3em; font-weight: 600; }
|
|
7
|
+
.lh .address { white-space: pre-line; }
|
|
8
|
+
.lh .contacts span+span::before { content: " · "; }
|
|
9
|
+
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
|
|
10
|
+
.head h1 { font-size: 1.6em; margin: 0; letter-spacing: 0.02em; }
|
|
11
|
+
.head .no { font-size: 1.1em; font-weight: 600; margin-top: 1mm; }
|
|
12
|
+
.status { display: inline-block; margin-top: 2mm; padding: 0.6mm 2.4mm; border: 1px solid #1C1917; border-radius: 99px; font-size: 0.9em; font-weight: 600; }
|
|
13
|
+
.box { min-width: 62mm; padding: 3mm 4mm; border: 1px solid #D6D3D1; border-radius: 2mm; background: #F5F5F4; }
|
|
14
|
+
.box .k, .meta .k { color: #57534E; }
|
|
15
|
+
.box .v { font-size: 1.15em; font-weight: 600; }
|
|
16
|
+
.meta { display: flex; gap: 8mm; margin: 5mm 0 2mm; }
|
|
17
|
+
.meta > div { flex: 1; }
|
|
18
|
+
.meta table td { border: 0; padding: 0.6mm 0; }
|
|
19
|
+
.meta table td:first-child { color: #57534E; width: 32mm; }
|
|
20
|
+
.addr { white-space: pre-line; }
|
|
21
|
+
.items { margin-top: 4mm; }
|
|
22
|
+
.items th { border-bottom: 1px solid #1C1917; color: #57534E; font-weight: 600; font-size: 0.9em; }
|
|
23
|
+
.items tbody { counter-reset: row; }
|
|
24
|
+
.items tbody tr { counter-increment: row; }
|
|
25
|
+
.items td.no { width: 8mm; color: #57534E; }
|
|
26
|
+
.items td.no::before { content: counter(row); }
|
|
27
|
+
.items td.qty { font-size: 1.1em; font-weight: 600; }
|
|
28
|
+
.items td.check { width: 22mm; }
|
|
29
|
+
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
30
|
+
.note { margin-top: 3mm; font-size: 0.9em; }
|
|
31
|
+
.sign { display: flex; gap: 6mm; margin-top: 10mm; break-inside: avoid; }
|
|
32
|
+
.sign > div { flex: 1; text-align: center; }
|
|
33
|
+
.sign .space { height: 20mm; border-bottom: 1px solid #1C1917; margin-bottom: 1.5mm; }
|
|
34
|
+
.cond { font-weight: 600; }
|
|
35
|
+
.esign { font-size: 0.85em; }
|
|
36
|
+
.money td { border: 0; padding: 0.6mm 0; }
|
|
37
|
+
.money td:first-child { color: #57534E; }
|
|
38
|
+
.money tr.total td { border-top: 1px solid #1C1917; font-weight: 600; padding-top: 1.5mm; }
|
|
39
|
+
{{end}}
|
|
40
|
+
{{define "letterhead"}}{{with .Letterhead}}<header class="lh">
|
|
41
|
+
{{if .logo_src}}<img class="logo" src="{{.logo_src}}" alt="">{{else if .legal_name}}<div class="mono" aria-hidden="true">{{upper (slice .legal_name 0 1)}}</div>{{end}}
|
|
42
|
+
<div>
|
|
43
|
+
<div class="legal-name">{{.legal_name}}</div>
|
|
44
|
+
{{with .tagline}}<div class="muted">{{.}}</div>{{end}}
|
|
45
|
+
{{with .address}}<div class="address">{{.}}</div>{{end}}
|
|
46
|
+
{{if or .phone .email .website}}<div class="contacts">{{with .phone}}<span>{{.}}</span>{{end}}{{with .email}}<span>{{.}}</span>{{end}}{{with .website}}<span>{{.}}</span>{{end}}</div>{{end}}
|
|
47
|
+
</div></header>{{end}}{{end}}
|
|
48
|
+
{{define "cond"}}{{$c := printf "%v" .}}{{if eq $c "lengkap"}}Lengkap, baik{{else if eq $c "lecet"}}Lecet{{else if eq $c "rusak"}}Rusak{{else if eq $c "hilang"}}Hilang{{else}}{{$c}}{{end}}{{end}}
|
|
49
|
+
{{template "letterhead" .}}
|
|
50
|
+
{{- $ds := printf "%v" .Doc.docstatus -}}
|
|
51
|
+
<div class="head">
|
|
52
|
+
<div>
|
|
53
|
+
<h1>Berita acara serah terima alat</h1>
|
|
54
|
+
<div class="no">Alat kembali {{.Doc.name}}</div>
|
|
55
|
+
<div class="status">{{if eq $ds "0"}}Draf, belum diselesaikan{{else if eq $ds "2"}}Batal{{else}}Alat diterima kembali{{end}}</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="box">
|
|
58
|
+
<div class="k">Tanggal kembali</div>
|
|
59
|
+
<div class="v">{{date .Doc.return_date "long"}}</div>
|
|
60
|
+
<div class="k">{{if .Doc.late_days}}Telat {{number .Doc.late_days}} hari dari {{date .Doc.planned_end "long"}}{{else}}Tepat waktu{{end}}</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="meta">
|
|
64
|
+
<div>
|
|
65
|
+
<div class="k">Penyewa</div>
|
|
66
|
+
<div><strong>{{with .Doc.customer_name}}{{.}}{{else}}{{.Doc.customer}}{{end}}</strong></div>
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<table>
|
|
70
|
+
<tr><td>No. pesanan</td><td>{{.Doc.booking}}</td></tr>
|
|
71
|
+
<tr><td>Alat</td><td>{{with .Doc.item_title}}{{.}}{{else}}{{.Doc.rental_item}}{{end}}</td></tr>
|
|
72
|
+
<tr><td>Jumlah</td><td>{{number .Doc.qty}} unit</td></tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
{{if .Doc.units}}
|
|
77
|
+
<table class="items">
|
|
78
|
+
<thead><tr><th>No</th><th>Kode unit</th><th>Saat keluar</th><th>Saat kembali</th><th>Catatan</th><th class="num">Biaya</th></tr></thead>
|
|
79
|
+
<tbody>
|
|
80
|
+
{{range $row := .Doc.units}}
|
|
81
|
+
<tr>
|
|
82
|
+
<td class="no"></td>
|
|
83
|
+
<td>{{with $row.unit_code}}{{.}}{{else}}{{$row.unit}}{{end}}{{with $row.serial_no}}<div class="muted">{{.}}</div>{{end}}</td>
|
|
84
|
+
<td>{{template "cond" $row.out_condition}}</td>
|
|
85
|
+
<td class="cond">{{template "cond" $row.condition}}</td>
|
|
86
|
+
<td>{{$row.notes}}</td>
|
|
87
|
+
<td class="num">{{if $row.fee}}{{rupiah $row.fee}}{{end}}</td>
|
|
88
|
+
</tr>
|
|
89
|
+
{{end}}
|
|
90
|
+
</tbody>
|
|
91
|
+
</table>
|
|
92
|
+
{{end}}
|
|
93
|
+
{{if .Doc.damage_notes}}<p class="note"><span class="muted">Catatan kerusakan:</span> {{.Doc.damage_notes}}</p>{{end}}
|
|
94
|
+
<table class="money" style="width:auto;margin-top:4mm;margin-left:auto">
|
|
95
|
+
<tr><td>Deposit diterima</td><td class="num">{{rupiah .Doc.deposit}}</td></tr>
|
|
96
|
+
{{if .Doc.late_fee}}<tr><td>Denda telat ({{number .Doc.late_days}} hari)</td><td class="num">{{rupiah .Doc.late_fee}}</td></tr>{{end}}
|
|
97
|
+
{{if .Doc.unit_damage}}<tr><td>Kerusakan atau hilang (checklist)</td><td class="num">{{rupiah .Doc.unit_damage}}</td></tr>{{end}}
|
|
98
|
+
{{if .Doc.damage_fee}}<tr><td>Kerusakan atau hilang lain</td><td class="num">{{rupiah .Doc.damage_fee}}</td></tr>{{end}}
|
|
99
|
+
{{if .Doc.deposit_kept}}{{if or .Doc.covered_late .Doc.covered_damage}}<tr><td>Dipotong dari deposit</td><td class="num">-{{rupiah (sub .Doc.deposit .Doc.deposit_refund)}}</td></tr>{{end}}{{end}}
|
|
100
|
+
<tr class="total"><td>Deposit dikembalikan{{if eq (printf "%v" .Doc.refund_method) "transfer"}} (transfer){{else}} (tunai){{end}}</td><td class="num">{{rupiah .Doc.deposit_refund}}</td></tr>
|
|
101
|
+
{{if .Doc.extra_due}}<tr><td>Kekurangan ditagih lewat faktur</td><td class="num">{{rupiah .Doc.extra_due}}</td></tr>{{end}}
|
|
102
|
+
</table>
|
|
103
|
+
<div class="sign">
|
|
104
|
+
<div><div>Yang menerima</div><div class="space"></div><div>{{if .Doc.received_by}}{{.Doc.received_by}}{{else}}<span class="muted">Nama dan tanda tangan</span>{{end}}</div></div>
|
|
105
|
+
<div><div>Penyewa</div><div class="space"></div><div>{{if .Doc.signed_by}}{{.Doc.signed_by}}{{else}}<span class="muted">Nama dan tanda tangan</span>{{end}}</div>
|
|
106
|
+
{{if .Doc.signature}}<div class="esign muted">Ditandatangani di aplikasi, lampiran {{.Doc.signature}}</div>{{end}}</div>
|
|
107
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
# BAST when equipment comes back: each unit's condition when it went out and now, the fee of each damaged or lost
|
|
3
|
+
# unit, the late fee, what was kept from the deposit, what is paid back and what is still billed. A5.
|
|
4
|
+
name: rental_bast_in
|
|
5
|
+
model: rental_return
|
|
6
|
+
label: {id: Berita acara serah terima (kembali), en: Handover record (back)}
|
|
7
|
+
paper: A5
|
|
8
|
+
template: rental_bast_in.html
|
|
9
|
+
default: true
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E, sama dengan surat jalan: netral, satu tanda merek, checklist per unit, dua tanda tangan. A5. */
|
|
3
|
+
.lh { display: flex; gap: 4mm; align-items: flex-start; padding-bottom: 4mm; margin-bottom: 5mm; border-bottom: 1px solid #1C1917; }
|
|
4
|
+
.lh .logo { max-height: 16mm; max-width: 40mm; }
|
|
5
|
+
.lh .mono { width: 12mm; height: 12mm; border-radius: 2.5mm; background: #1C1917; color: #fff; font-weight: 700; font-size: 16pt; line-height: 12mm; text-align: center; flex: none; }
|
|
6
|
+
.lh .legal-name { font-size: 1.3em; font-weight: 600; }
|
|
7
|
+
.lh .address { white-space: pre-line; }
|
|
8
|
+
.lh .contacts span+span::before { content: " · "; }
|
|
9
|
+
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
|
|
10
|
+
.head h1 { font-size: 1.6em; margin: 0; letter-spacing: 0.02em; }
|
|
11
|
+
.head .no { font-size: 1.1em; font-weight: 600; margin-top: 1mm; }
|
|
12
|
+
.status { display: inline-block; margin-top: 2mm; padding: 0.6mm 2.4mm; border: 1px solid #1C1917; border-radius: 99px; font-size: 0.9em; font-weight: 600; }
|
|
13
|
+
.box { min-width: 62mm; padding: 3mm 4mm; border: 1px solid #D6D3D1; border-radius: 2mm; background: #F5F5F4; }
|
|
14
|
+
.box .k, .meta .k { color: #57534E; }
|
|
15
|
+
.box .v { font-size: 1.15em; font-weight: 600; }
|
|
16
|
+
.meta { display: flex; gap: 8mm; margin: 5mm 0 2mm; }
|
|
17
|
+
.meta > div { flex: 1; }
|
|
18
|
+
.meta table td { border: 0; padding: 0.6mm 0; }
|
|
19
|
+
.meta table td:first-child { color: #57534E; width: 32mm; }
|
|
20
|
+
.addr { white-space: pre-line; }
|
|
21
|
+
.items { margin-top: 4mm; }
|
|
22
|
+
.items th { border-bottom: 1px solid #1C1917; color: #57534E; font-weight: 600; font-size: 0.9em; }
|
|
23
|
+
.items tbody { counter-reset: row; }
|
|
24
|
+
.items tbody tr { counter-increment: row; }
|
|
25
|
+
.items td.no { width: 8mm; color: #57534E; }
|
|
26
|
+
.items td.no::before { content: counter(row); }
|
|
27
|
+
.items td.qty { font-size: 1.1em; font-weight: 600; }
|
|
28
|
+
.items td.check { width: 22mm; }
|
|
29
|
+
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
30
|
+
.note { margin-top: 3mm; font-size: 0.9em; }
|
|
31
|
+
.sign { display: flex; gap: 6mm; margin-top: 10mm; break-inside: avoid; }
|
|
32
|
+
.sign > div { flex: 1; text-align: center; }
|
|
33
|
+
.sign .space { height: 20mm; border-bottom: 1px solid #1C1917; margin-bottom: 1.5mm; }
|
|
34
|
+
.cond { font-weight: 600; }
|
|
35
|
+
.esign { font-size: 0.85em; }
|
|
36
|
+
.money td { border: 0; padding: 0.6mm 0; }
|
|
37
|
+
.money td:first-child { color: #57534E; }
|
|
38
|
+
.money tr.total td { border-top: 1px solid #1C1917; font-weight: 600; padding-top: 1.5mm; }
|
|
39
|
+
{{end}}
|
|
40
|
+
{{define "letterhead"}}{{with .Letterhead}}<header class="lh">
|
|
41
|
+
{{if .logo_src}}<img class="logo" src="{{.logo_src}}" alt="">{{else if .legal_name}}<div class="mono" aria-hidden="true">{{upper (slice .legal_name 0 1)}}</div>{{end}}
|
|
42
|
+
<div>
|
|
43
|
+
<div class="legal-name">{{.legal_name}}</div>
|
|
44
|
+
{{with .tagline}}<div class="muted">{{.}}</div>{{end}}
|
|
45
|
+
{{with .address}}<div class="address">{{.}}</div>{{end}}
|
|
46
|
+
{{if or .phone .email .website}}<div class="contacts">{{with .phone}}<span>{{.}}</span>{{end}}{{with .email}}<span>{{.}}</span>{{end}}{{with .website}}<span>{{.}}</span>{{end}}</div>{{end}}
|
|
47
|
+
</div></header>{{end}}{{end}}
|
|
48
|
+
{{define "cond"}}{{$c := printf "%v" .}}{{if eq $c "lengkap"}}Lengkap, baik{{else if eq $c "lecet"}}Lecet{{else if eq $c "rusak"}}Rusak{{else if eq $c "hilang"}}Hilang{{else}}{{$c}}{{end}}{{end}}
|
|
49
|
+
{{template "letterhead" .}}
|
|
50
|
+
{{- $ds := printf "%v" .Doc.docstatus -}}
|
|
51
|
+
<div class="head">
|
|
52
|
+
<div>
|
|
53
|
+
<h1>Berita acara serah terima alat</h1>
|
|
54
|
+
<div class="no">Alat keluar {{.Doc.name}}</div>
|
|
55
|
+
<div class="status">{{if eq $ds "0"}}Draf, alat belum diserahkan{{else if eq $ds "2"}}Batal{{else}}Alat diserahkan{{end}}</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="box">
|
|
58
|
+
<div class="k">Tanggal keluar</div>
|
|
59
|
+
<div class="v">{{date .Doc.out_date "long"}}</div>
|
|
60
|
+
<div class="k">Kembali {{date .Links.booking.end_date "long"}}</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="meta">
|
|
64
|
+
<div>
|
|
65
|
+
<div class="k">Penyewa</div>
|
|
66
|
+
<div><strong>{{with .Doc.customer_name}}{{.}}{{else}}{{.Doc.customer}}{{end}}</strong></div>
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<table>
|
|
70
|
+
<tr><td>No. pesanan</td><td>{{.Doc.booking}}</td></tr>
|
|
71
|
+
<tr><td>Alat</td><td>{{with .Doc.item_title}}{{.}}{{else}}{{.Doc.rental_item}}{{end}}</td></tr>
|
|
72
|
+
<tr><td>Jumlah</td><td>{{number .Doc.qty}} unit, {{number .Links.booking.days}} hari</td></tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
{{if .Doc.units}}
|
|
77
|
+
<table class="items">
|
|
78
|
+
<thead><tr><th>No</th><th>Kode unit</th><th>Nomor seri</th><th>Kondisi</th><th>Catatan</th></tr></thead>
|
|
79
|
+
<tbody>
|
|
80
|
+
{{range $row := .Doc.units}}
|
|
81
|
+
<tr>
|
|
82
|
+
<td class="no"></td>
|
|
83
|
+
<td>{{with $row.unit_code}}{{.}}{{else}}{{$row.unit}}{{end}}</td>
|
|
84
|
+
<td>{{$row.serial_no}}</td>
|
|
85
|
+
<td class="cond">{{template "cond" $row.condition}}</td>
|
|
86
|
+
<td>{{$row.notes}}</td>
|
|
87
|
+
</tr>
|
|
88
|
+
{{end}}
|
|
89
|
+
</tbody>
|
|
90
|
+
</table>
|
|
91
|
+
{{end}}
|
|
92
|
+
{{if .Doc.notes}}<p class="note"><span class="muted">Catatan:</span> {{.Doc.notes}}</p>{{end}}
|
|
93
|
+
<p class="note muted">Penyewa menerima alat di atas dalam kondisi seperti tertulis, dan mengembalikannya pada tanggal kembali. Telat dan kerusakan dipotong dari deposit sesuai pesanan sewa.</p>
|
|
94
|
+
<div class="sign">
|
|
95
|
+
<div><div>Yang menyerahkan</div><div class="space"></div><div>{{if .Doc.handed_by}}{{.Doc.handed_by}}{{else}}<span class="muted">Nama dan tanda tangan</span>{{end}}</div></div>
|
|
96
|
+
<div><div>Penyewa</div><div class="space"></div><div>{{if .Doc.signed_by}}{{.Doc.signed_by}}{{else}}<span class="muted">Nama dan tanda tangan</span>{{end}}</div>
|
|
97
|
+
{{if .Doc.signature}}<div class="esign muted">Ditandatangani di aplikasi, lampiran {{.Doc.signature}}</div>{{end}}</div>
|
|
98
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
# BAST (berita acara serah terima) when equipment goes out: who rents what, which units in what condition, the return
|
|
3
|
+
# date, and two signatures. A5, printed from the browser (contract 0008). The drawn signature is an attachment
|
|
4
|
+
# (contract 0011); the page's CSP allows no image but a QR, so the BAST names it and leaves room for a wet signature
|
|
5
|
+
# until kernel WS6 can print it.
|
|
6
|
+
name: rental_bast_out
|
|
7
|
+
model: rental_checkout
|
|
8
|
+
label: {id: Berita acara serah terima (keluar), en: Handover record (out)}
|
|
9
|
+
paper: A5
|
|
10
|
+
template: rental_bast_out.html
|
|
11
|
+
default: true
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/role.json
|
|
2
|
+
name: rental_staff
|
|
3
|
+
label: {id: Staf gudang sewa}
|
|
4
|
+
description: {id: 'Menyiapkan alat, mencatat serah terima keluar dan kembali per unit (checklist, foto, tanda tangan), dan mencetak berita acara'}
|
|
5
|
+
# No row scope: one warehouse per rental business. Money stays with the admin: this role submits checkouts (no money
|
|
6
|
+
# moves) and fills returns, but the return's submit (which pays the deposit back) is sales_manager's. Amounts stay
|
|
7
|
+
# visible: in a small rental shop the person at the counter is told the deposit and the fees anyway.
|