diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..6da8f01 --- /dev/null +++ b/_includes/head.html @@ -0,0 +1 @@ + diff --git a/site/features/Yard Billing.md b/site/features/Yard Billing.md new file mode 100644 index 0000000..2d830eb --- /dev/null +++ b/site/features/Yard Billing.md @@ -0,0 +1,635 @@ +--- +label: Yard Billing +order: 2 +icon: "/static/site/features/yard_billing/yard-billing-icon.svg" +--- + +# Yard Billing + + +!!!warning WIP +This is a Work In Progress +!!! + +Gatego provides a simple and flexible way to manage billing for your yard. + +TBC: Task description, advantages, etc... + + +## Configuration + +TBC: Configuration description with screenshots + +## Calculations + +This section describes how calculations are made in Gatego for each Rate Type and Day Calculation Mode. + +### Day calculation modes + +The minimum unit of billing is 1 day. The day calculation modes determine how many days are billed for a given vehicle visit from check-in to check-out + +#### 24-hour rounding + +In 24-hour rounding mode, the billable days are calculated from the number of 24-hour periods the vehicle stayed in the yard. Always starting at 1 day. + +The billing starts at the time of check-in, and assuming there is no grace period, it will start counting at 1 day. So if the vehicle stays less then 24 hours, it will be billed for 1 day (even if stayed 5 minutes). + +If the vehicle stays 24 hours or more, then one more day will be billed: + +If the vehicle stays between 24 hours (inclusive) and 48 hours (exclusive), including minutes and seconds since check-in, it will be billed for 2 days +If the vehicle stays between 48 hours (inclusive) and 72 hours (exclusive), including minutes and seconds since check-in, it will be billed for 3 days +... and so on. + +The original check in time is also honored even even if the vehicle checked in during a previous period. + +For example if a vehicle checked in at 11:00 AM on the 25th of January and didn't check out in January, it will be billed for... + +Then if the vehicle checks out at 10:00 AM on the 2nd of February, then it will be billed only for 1 day on February. +While if the vehicle checks out at 12:00 PM on the 2nd of February, then it will be billed for 2 days on February. + +#### Examples + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/19/24 11:10 AM +::: +||| Billing 24h-rounding +5 minutes - The carrier will be billed for 1 day (the minimum bill) +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:06 AM +::: +||| Billing 24h-rounding +24 hours and 1 minute - The carrier will be billed for 2 days +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:05:00 AM +::: +:::movement { .checkout } +06/20/24 11:04:59 AM +::: +||| Billing 24h-rounding +23 hours and 59 minutes and 59 seconds - The carrier will be billed for 1 day +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:05 AM +::: +||| Billing 24h-rounding +24 hours exact - The carrier will be billed for 2 days +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 00:00 AM +::: +:::movement { .checkout } +06/20/24 00:00 AM +::: +||| Billing 24h-rounding +24 hours exact from 00:00am - The carrier will be billed for 2 days +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 11:05:00 AM +::: +:::movement { .checkout } +06/1/24 11:05:00 AM +::: +||| Billing 24h-rounding +Less than 24h and the vehicle checked the previous day on a past period. + +The carrier will be billed for 1 day in May. The carrier won't be billed in June +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/1/24 11:06 AM +::: +||| Billing 24h-rounding +More than 24h and the vehicle checked the previous day on a past period. + +The carrier will be billed 1 day in May and 1 day in June +||| + + +--- + +||| Movement +:::movement { .checkin } +06/30/24 11:05 PM +::: +:::movement { .checkout } +(Vehicle still in the yard) +::: +||| Billing 24h-rounding +Vehicle checked in the last day of this period but still in yard. + +The carrier will be billed 1 day in June (the minimum bill) +||| + +--- + +||| Movement +:::movement { .checkin } +31/05/24 0:00 AM +::: +:::movement { .checkout } +31/05/24 11:59:59 PM +::: +||| Billing 24h-rounding +23 hours 59 minutes and 59 seconds - The vehicle checked the previous day on a past period. + +The carrier will be billed for 1 day on May. The carrier won't be billed on June +||| + +--- + +||| Movement +:::movement { .checkin } +31/05/24 1:00:00 AM +::: +:::movement { .checkout } +1/06/24 1:00:00 PM +::: +||| Billing 24h-rounding +The vehicle checked the previous day on a past period and it stayed exactly 24 hours + +The carrier will be billed for 1 day on May and for 1 day in June, 2 days in total because total time was 24 hours +||| + +--- + +||| Movement +:::movement { .checkin } +31/05/24 0:00:00 AM +::: +:::movement { .checkout } +1/06/24 0:00:00 PM +::: +||| Billing 24h-rounding +The vehicle checked the previous day on a past period and it stayed exactly 24 hours, having checked in at 00:00:00am + +The carrier will be billed for 1 day on May and for 1 day in June, same as previous case +||| + +--- + +||| Movement +:::movement { .checkin } +04/10/24 8:05 PM +::: +:::movement { .checkout } +07/10/24 1:05 AM +::: +||| Billing 24h-rounding +Vehicle checked in before the billing period and checked out after the billing period + +The carrier will be billed the 30 days of June +||| + +--- + +||| Movement +:::movement { .checkin } +04/10/24 8:05 PM +::: +:::movement { .checkout } +07/10/24 1:05 AM +::: +||| Billing 24h-rounding +Vehicle checked in before the billing period and checked out after the billing period + +The carrier will be billed the 30 days of June +||| + +--- + +||| Movement +:::movement { .checkin } +04/10/24 8:05 PM +::: +:::movement { .checkout } +(Vehicle still in the yard) +::: +||| Billing 24h-rounding +Vehicle checked in before the billing period and it's still in the yard + +The carrier will be billed the 30 days of June +||| + + +##### 24-hour rounding With Grace Period + +If there a grace period configured in hours, then the same rules apply, but the time will start counting after the grace period has passed. + +Examples assuming 2-hour grace period: + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/19/24 11:10 AM +::: +||| Billing 24h-rounding (2 hours grace period) +5 minutes + +The carrier won't be billed as the vehicle stayed less than 2 hours +||| + + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:04 AM +::: +||| Billing 24h-rounding (2 hours grace period) +Less than 24h - The carrier will be billed for 1 day +||| + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:06 AM +::: +||| Billing 24h-rounding (2 hours grace period) +Total time: 24h and 1 minute (minus the grace period: 22h and 1 minute) + +This counts as less than 24h and the carrier will be billed for only 1 day +||| + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 1:06 PM +::: +||| Billing 24h-rounding (2 hours grace period) +Total time: 26h and 1 minute (minus the grace period: 24h and 1 minute) + +The carrier will be billed for 2 days +||| + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/1/24 1:04 PM +::: +||| Billing 24h-rounding (2 hours grace period) +The vehicle checked the previous day on a past period. + +Total time: 25h and 59 minutes (minus the grace period: 23h and 59 minutes) + +The carrier will be billed for 1 day on May. The carrier won't be billed on June +||| + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/1/24 1:06 PM +::: +||| Billing 24h-rounding (2 hours grace period) +The vehicle checked the previous day on a past period. + +Total time: 26h and 1 minute (minus the grace period: 24h and 1 minute) + +The carrier will be billed 1 day on May and 1 day on June +||| + +--- + +||| Movement +:::movement { .checkin } +06/30/24 11:05 PM +::: +:::movement { .checkout } +(Vehicle still in the yard) +::: +||| Billing 24h-rounding (2 hours grace period) +Vehicle checked in the last day of this period but still in yard, less than 2 hours (grace period) from the end of the period. + +The carrier won't be billed on June (vehicle on grace period) +||| + +--- + +||| Movement +:::movement { .checkin } +06/30/24 8:05 PM +::: +:::movement { .checkout } +(Vehicle still in the yard) +::: +||| Billing 24h-rounding (2 hours grace period) +Vehicle checked in the last day of this period but still in yard, more than 2 hours (grace period) from the end of the period. + +Vehicle is assumed to have checked in at `06/30/24 10:05 PM` due to the grace period. + +The carrier will be billed 1 day in June (the minimum bill) +||| + +#### Midnight-to-midnight + +In Midnight-to-midnight mode, the billable days are calculated from the number of "midnights" the vehicle stayed in the yard. Always starting at 1. + +The billing starts at the time of check-in, and assuming there is no grace period, if the vehicle leaves the same day, it will be billed for one day. + +If the vehicle stays overnight, then one more day will be billed. Please note that even if the vehicle stays for a few minutes after midnight, it will still be billed for one more day. + +Examples: + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/19/24 11:10 AM +::: +||| Billing midnight-to-midnight +5 minutes + +The carrier will be billed for 1 day (the minimum bill) +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:58 PM +::: +:::movement { .checkout } +06/20/24 00:02 PM +::: +||| Billing midnight-to-midnight +4 minutes over midnight + +The carrier will be billed for 2 days +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:04 AM +::: +||| Billing midnight-to-midnight +23h and 59 minutes + +The carrier will be billed for 2 days +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:06 AM +::: +||| Billing midnight-to-midnight +24h and 1 minute + +The carrier will be billed for 2 days (only one midnight) +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 00:00 AM +::: +:::movement { .checkout } +06/19/24 11:59 PM +::: +||| Billing midnight-to-midnight +23 hours and 59 minutes in the same day + +The carrier will be billed for 1 day +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 00:00 AM +::: +:::movement { .checkout } +06/20/24 00:00 AM +::: +||| Billing midnight-to-midnight +24 hours from midnight to midnight + +The carrier will be billed for 2 days (2 midnights) +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/1/24 11:04 AM +::: +||| Billing midnight-to-midnight +Less than 24h and the vehicle checked the previous day on a past period. + +The carrier will be billed for 1 day on May. The carrier won't be billed on June +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/1/24 11:06 AM +::: +||| Billing midnight-to-midnight +More than 24h and the vehicle checked the previous day on a past period. (Only one midnight in total) + +The carrier will be billed for 1 day on May. The carrier won't be billed on June +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/2/24 11:06 AM +::: +||| Billing midnight-to-midnight +More than 24h and the vehicle checked the previous day on a past period. (2 midnights in total) + +The carrier will be billed for 1 day on May and one day in June +||| + + +##### Midnight-to-midnight With Grace Period + +Examples assuming 2-hour grace period: + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/19/24 11:10 AM +::: +||| Billing midnight-to-midnight (2 hours grace period) +5 minutes + +The carrier won't be billed as the vehicle stayed less than 2 hours +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:58 PM +::: +:::movement { .checkout } +06/20/24 00:02 PM +::: +||| Billing midnight-to-midnight (2 hours grace period) +4 minutes over midnight + +The carrier won't be billed as the vehicle stayed less than 2 hours +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 11:05 AM +::: +:::movement { .checkout } +06/20/24 11:06 AM +::: +||| Billing midnight-to-midnight (2 hours grace period) +The vehicle is assumed to have checked in at `06/20/24 01:05 PM` due to the grace period + +The carrier will be billed for 1 day (the vehicle didn't stay over midnight after the grace period) +||| + +--- + +||| Movement +:::movement { .checkin } +06/19/24 9:05 PM +::: +:::movement { .checkout } +06/20/24 11:06 AM +::: +||| Billing midnight-to-midnight (2 hours grace period) +The vehicle is assumed to have checked in at `06/19/24 11:05 PM` due to the grace period, still past day + +The carrier will be billed for 2 days (one midnight) +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 11:05 AM +::: +:::movement { .checkout } +06/1/24 11:04 AM +::: +||| Billing midnight-to-midnight (2 hours grace period) +The vehicle is assumed to have checked in at `05/31/24 1:05 PM` due to the grace period. + +The carrier will be billed for 1 day on May (minimum stay, no midnights). The carrier won't be billed on June +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 9:05 PM +::: +:::movement { .checkout } +06/1/24 11:04 AM +::: +||| Billing midnight-to-midnight (2 hours grace period) +The vehicle is assumed to have checked in at `06/1/24 0:05 AM` due to the grace period + +The carrier won't be billed on May. The carrier will be billed for 1 day on June (minimum stay) +||| + +--- + +||| Movement +:::movement { .checkin } +05/31/24 10:05 PM +::: +:::movement { .checkout } +06/1/24 00:04 AM +::: +||| Billing midnight-to-midnight (2h grace period) +The vehicle checked in the previous day on a past period. However it stayed less than the grace period. + +The carrier won't be billed neither on May nor June. (Total time less than grace period) +||| + + +### Rate types + +#### Daily rate + +The calculations for this rate is simple: the system first calculates the billable days according to the day calculation mode as described in []previous section (link), and then multiplies the number of days by the daily rate. + + +#### Flat rate + +The flat rate is a fixed amount that is billed regardless of the number of days the vehicle stayed in the yard. The system will bill the flat rate for each vehicle visit, regardless of the duration of the visit. + + +#### Examples diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..552a1b1 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,38 @@ +.movement { + box-sizing: border-box; + display: flex; + align-items: normal; +} + +.movement::before { + content: ''; + background-size: 60px 30px; + background-repeat: no-repeat; + width: 60px; + height: 30px; + border-radius: 10px; + margin-right: 10px; +} + +.movement p { + font-size: 15px; + font-weight: 500; + display: flex; + align-items: center; + line-height: normal; + height: 30px; + margin-bottom: 1rem !important; +} + +.checkin::before { + background-image: url('/static/site/features/yard_billing/checkin.png'); +} + +.checkout::before { + background-image: url('/static/site/features/yard_billing/checkout.png'); +} + +.margin-bottom { + content: ''; + margin-bottom: 1.5rem; +} diff --git a/static/site/features/yard_billing/checkin.png b/static/site/features/yard_billing/checkin.png new file mode 100644 index 0000000..b488314 Binary files /dev/null and b/static/site/features/yard_billing/checkin.png differ diff --git a/static/site/features/yard_billing/checkout.png b/static/site/features/yard_billing/checkout.png new file mode 100644 index 0000000..541a1d8 Binary files /dev/null and b/static/site/features/yard_billing/checkout.png differ diff --git a/static/site/features/yard_billing/yard-billing-icon.svg b/static/site/features/yard_billing/yard-billing-icon.svg new file mode 100644 index 0000000..6c1cc5b --- /dev/null +++ b/static/site/features/yard_billing/yard-billing-icon.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file