A complete, customizable suite for generating SARS & Corporate compliant travel logbook spreadsheets (.xlsx) with exact odometer reconciliation, smart detour variances, and configurable client destinations.
π Try it instantly online without installing anything: https://travismain.github.io/Logbook_Cal/
- Exact Target Matching: Automatically distributes trips and balances detour/shortcut variances (
Β±2 kmreturn) to hit your exactOpening Odometer,Closing Odometer, andTotal Business kmtarget. - Whole Integer Mode: Option to enforce pure whole integer kilometers (
#,##0) everywhere β no decimals appear anywhere across distances, odometer readings, or private gap calculations! - Holiday & Weekend Intelligence: Automatically skips dates during configured holidays (e.g., Mauritius break) and correctly assigns Saturday trips when configured.
- Professional Two-Sheet Excel Output: Creates a beautifully formatted workbook with:
- Cover Sheet: Summary table, business/private usage percentages, and full destination frequency breakdown.
- Business Logbook Sheet: Complete chronological running odometer ledger with standard Excel formulas (
SUM).
Run the user-friendly graphical application:
python logbook_gui.py- Enter your start and end dates, opening and closing odometers, and target business km.
- Add or remove destinations and set their frequency category (
Very Frequent,Frequent,Regular,Occasional,Rare). - Click "β¨ Generate & Save Logbook Excel (.xlsx)" to choose where to save your spreadsheet and open it instantly!
You can use the Web Generator instantly right now in your browser without installing or downloading anything:
- π Live Online Generator: https://travismain.github.io/Logbook_Cal/
Or run it locally offline from your machine:
Navigate to the web_app/ directory and open index.html in your web browser:
web_app/index.html- Or simply double-click
index.htmlfrom your file explorer. - Features a clean, professional corporate layout with smart route balancing, date-randomization, and automatic holiday/vacation scheduling.
- Uses
SheetJSdirectly inside your web browser to calculate trips and download the Excel file (.xlsx) instantly.
Run the command-line tool with interactive prompts or a JSON config file:
# Interactive mode (prompts you in the terminal)
python generate_logbook_cli.py -i
# Config-driven mode (using config.json)
python generate_logbook_cli.py --config config.json --output My_Logbook.xlsxYou can edit config.json directly to store custom templates for different staff or tax years:
{
"start_date": "2025-03-01",
"end_date": "2026-02-28",
"opening_odo": 36950,
"closing_odo": 53380,
"target_business_km": 6080,
"round_numbers_only": true,
"holidays": [
{"start": "2025-07-01", "end": "2025-07-14", "reason": "Annual Holiday"}
],
"saturdays": [
{"client": "Alpha Logistics / Client B", "count": 2}
],
"clients": [
{"name": "Acme Engineering Ltd", "one_way_km": 12, "frequency": "Very Frequent"},
{"name": "Alpha Logistics / Client B", "one_way_km": 25, "frequency": "Very Frequent"},
{"name": "Beta Enterprises / Client C", "one_way_km": 45, "frequency": "Regular"}
]
}Logbook_Cal/
βββ logbook_gui.py # Desktop Graphical User Interface (Tkinter)
βββ generate_logbook_cli.py # Interactive & Config-driven Command Line Tool
βββ logbook_engine.py # Core mathematical trip & odometer generator
βββ export_excel.py # openpyxl two-sheet formatting and styling engine
βββ config.json # Default configuration & destination template
βββ web_app/ # Standalone Browser Application
β βββ index.html # UI Structure
β βββ style.css # Glassmorphic Styling
β βββ app.js # SheetJS Client-side Engine
βββ README.md # Documentation
Caution
FOR EDUCATIONAL, RECONCILIATION, AND TEMPLATE PURPOSES ONLY
By downloading, installing, running, or accessing this software (including the standalone CLI, Desktop GUI, or the online Web Generator hosted on GitHub Pages), you explicitly acknowledge and agree to the following terms:
- No Responsibility or Liability: The creator(s), author(s), and contributor(s) of this repository and software assume ZERO RESPONSIBILITY OR LIABILITY whatsoever for any financial, tax, legal, penal, audit, or statutory consequences arising from the use of this software, its formulas, or its generated Excel spreadsheets (
.xlsx). - Strictly Educational & Template Tool: This application is provided solely as a mathematical template generator and educational reference tool to assist users in structuring and reconciling their odometer mileage and travel records. It does NOT constitute professional tax advice, accounting advice, or legal advice.
- User Responsibility & Verification: You (the user) are strictly and solely responsible for verifying the accuracy, truthfulness, and legal compliance of any travel logbook, tax deduction claim (
ITR12), or travel allowance document submitted to the South African Revenue Service (SARS), any corporate employer, or any other tax authority globally. - Compliance with Statutory Tax Laws: Submitting fabricated, fraudulent, or inaccurate travel records to tax authorities is a statutory offense. You must ensure that every trip logged, odometer figure recorded, and destination claimed accurately reflects genuine business travel and verified vehicle history.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, AUDIT PENALTIES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This project is open-source and licensed under the MIT License.
See the LICENSE file for full terms, conditions, and liability disclaimers.