Running your business with LedgerSMB development DRAFT / WORK IN PROGRESS See the Preface for current status. Erik Hülsmann Neil Tiffin Chris Travers November 29, 2024 Contents Preface Intended audience Organization of the book Comments and questions Acknowledgments I Overview 1 What is LedgerSMB 1.1 Introduction 1.2 Supported functionality 1.3 Feature comparison with alternatives 1.4 System requirements 1.5 Application architecture 1.6 License 2 Reasons to use LedgerSMB 2.1 Internal control 2.2 Accounting principles 2.3 Impact of tight integration 3 Introduction to accounting 3.1 Double-entry accounting 3.2 Cash versus accrual basis 3.3 Valuation of inventory II Getting started 4 Overview 4.1 Introduction 5 Creating a company database 5.1 Using setup.pl 5.1.1 Step 1: setup.pl login 5.1.2 Step 2: Company creation 5.1.3 Step 3: Selection of a Chart of Accounts 5.1.4 Step 4: Load template 5.1.5 Step 5: Initial user 6 The first login 6.1 Introduction 6.2 Steps to the first login 6.2.1 Login screen 6.2.2 Selecting a password 6.2.3 Setting user preferences 6.2.4 Setting system defaults 6.3 Setting up a bank account or credit card 6.4 Checking and adjusting the chart of accounts 6.4.1 Accounts list 6.5 Checking sales tax rates 7 Building up stock 7.1 Overview 7.2 Defining parts 7.2.1 Single items 7.2.2 Combining single-item and “multi-item pre-packaged” sales 7.3 Defining part groups 7.4 Defining vendors 7.5 Requesting quotations 7.6 Following up on a quotation 7.7 Receiving ordered items 7.8 Receiving an invoice 7.9 Paying an invoice 8 Ramping up to the first sale 8.1 Creating a customer 8.2 Sending out a quote 8.3 Sending out a sales order 9 Shipping sales 10 Invoicing 10.1 Handling sales taxes 10.1.1 Invoices with taxes included 10.1.2 Invoices with explicit tax amounts 10.2 Invoice Editing 11 Collecting sales invoice payments 11.1 Customer payments 11.2 Customer payment mismatch 11.2.1 Choosing between pardoning and registering underpayment 11.2.2 Large ones, as in partial payments or largish under/over payments 11.2.3 Pardoning small mismatches 12 Paying vendor invoices 12.1 Handling vendors who match amounts to exact invoices 12.2 Handling vendors with running balances 12.3 Handling bounced checks 12.3.1 Voiding checks to undo payments of vendor invoices relating to bounced checks 13 Monitoring arrears 13.1 Handling interest on arrears 14 Branching out: services 14.1 Creation / assignment to different accounts 14.2 Recording service hours 14.3 Customer approval on service hours 14.4 Invoicing services 15 Branching out II: service subscriptions III Configuration 16 Overview 16.1 Introduction 17 Global configuration 17.1 Apache 17.2 PostgreSQL 17.3 LedgerSMB version numbers 17.4 LedgerSMB Configuration 17.4.1 ledgersmb.yaml 18 Per company configuration 18.1 Matching your business processes 18.2 Administrative user 18.3 Chart of Accounts 18.3.1 Predefined Chart of Accounts 18.3.2 Account structure 18.3.3 Account setup 18.3.4 Special accounts 18.3.5 Importing chart of accounts 18.4 System menu settings 18.4.1 Audit control 18.4.2 Taxes 18.4.3 Defaults 18.4.4 Year end 18.4.5 Admin users 18.4.6 Chart of accounts 18.4.7 Warehouses 18.4.8 Departments 18.4.9 Type of business 18.4.10 Languages 18.4.11 Standard Industry Code (SIC) 18.4.12 Templates IV Administration 19 Overview 19.1 Introduction 20 First Use 21 Within-application tasks 22 DBA tasks from setup.pl 23 Outside-application tasks 24 User management 24.1 Introduction 24.2 User creation 24.3 User authorization 24.4 Maintaining users 24.4.1 Editing user information and authorizations 24.4.2 Changing user preferences 24.4.3 Deleting users 24.5 User imports 24.6 setup.pl users 25 Definition of goods and services 25.1 Definition of goods 25.1.1 Definition of parts 25.1.2 Definition of part groups 25.1.3 Definition of assemblies 25.1.4 Definition of overhead or labor 25.1.5 The use of parts versus assemblies for multi-item-package sales 25.2 Definition of services 25.2.1 Taxation of services 25.3 Alternative accounts (GIFI) 25.3.1 Maintaining GIFI 25.4 Reporting 26 Taxes 26.1 Overview 26.2 Tax account configuration 26.3 Tax calculation examples 26.4 Tax calculation plug-ins 26.5 Tax forms 26.5.1 Overview 26.5.2 Creating tax forms 27 Pricing 27.1 Introduction 27.2 Definition of types of business 27.3 Definition of price groups 27.4 Using the price matrix 27.4.1 Price matrix example: simple pricing 27.4.2 Price matrix example: Quantity pricing 27.4.3 Price matrix example: Time-based (Sale) pricing 28 Auditing 29 Contingency planning 29.1 Backup and restore 29.1.1 Backup using setup.pl 29.1.2 Backup using PostgreSQL administration tools 29.1.3 Restore 29.2 Advanced PostgreSQL: replication 30 Software updates 30.1 Introduction 30.2 Backups 30.3 Software upgrade 30.4 Database upgrade 31 Optional Features 31.1 PDF and Postscript Documents 31.2 Attaching Uploaded Files to PDF Invoices 31.3 OpenDocument Spreadsheet Output 31.4 Microsoft Excel Output V Business processes 32 Overview 33 Customers and vendors 33.1 Introduction 33.2 Creating customers and vendors 33.2.1 Creating a Company 33.2.2 Creating a customer account 33.2.3 Creating a vendor account 33.3 Multiple customers within one company 33.4 Creating vendors from customers 33.5 Maintaining contact information 34 Quotations from Vendors and for Customers 34.1 Creating Quotations and RFQs 34.2 Expediting quotations 34.2.1 Printing 34.2.2 Sending by e-mail 34.3 Attaching files to quotations 35 Sales and vendor orders 35.1 Creating new orders 35.2 Creating orders from quotations 35.3 Creating orders from projects 35.4 Creating purchase orders from sales orders 35.5 Combining orders 35.6 Recurring orders 35.7 Incomplete orders 36 Inventory management 36.1 Shipping 36.1.1 Pick lists 36.1.2 Packing list 36.2 Receiving 36.3 Partial shipments or receipts 36.4 Handling returns 36.5 Transferring between warehouses 36.6 Inventory reporting 36.6.1 Inventory status report 36.6.2 Inventory activity report 37 Sales and vendor invoice handling 37.1 Creating invoices from orders 37.2 Creating new invoices 37.2.1 Invoices 37.2.2 Transactions 37.2.3 Email Invoices 37.3 Recurring invoices 37.4 Invalidating invoices 37.5 Correcting and deleting invoices 37.6 Handling invoice disputes 37.6.1 Credit and debit invoices 37.6.2 Credit and debit notes 37.6.3 AR and AP Vouchers 37.7 Remarks 38 Shop sales 38.1 Opening and closing the cash register 38.2 Shop sales invoices 39 Manufacturing management 39.1 Producing sales orders 39.1.1 Work orders 40 Managing accounts receivable and payable 40.1 Creating generic AR/AP items 40.2 Handling refunds, over-payments and advances 40.3 Handling returns 41 Credit risk management 41.1 Introduction 41.2 Limit management 41.3 Granting payment terms 41.4 Managing arrears 41.4.1 Monitoring AR aging 41.4.2 Tracking invoice history 41.4.3 Special treatment of invoices 41.5 Interest on arrears 41.6 Allowance for doubtful accounts 41.7 Writing off bad debt 41.7.1 Direct write-off 41.7.2 Allowed-for write-off 42 Receipts and payment processing 42.1 Introduction 42.2 Single receipts or payments 42.3 Batch receipts and payments 42.4 Check payments 42.5 Using over payments 42.6 Receipt and payment reversal 42.7 Over payment reversal 42.8 Receipts and payments in foreign currencies 43 Accounting 43.1 Separation of duties: Transaction approval 43.2 Entering non sales transactions 43.2.1 Corrections 43.2.2 Transfer of money between bank accounts 43.2.3 Wages 43.2.4 Entering other general accounting documents 43.3 Bank reconciliation 43.3.1 Importing bank transactions - OFX 43.3.2 Importing bank transactions - CAMT.053 43.3.3 Importing bank transactions - CSV 43.4 Period closing 43.5 Year-end processing 43.6 Fixed asset accounting 43.7 Reporting 43.7.1 Tax reporting 43.7.2 Tax reporting using tax forms 43.7.3 Income statement 43.7.4 Balance sheet 43.7.5 Trial balance VI General Operation 44 User Interface 44.1 Reports VII Customization 45 Overview 45.1 Introduction 45.2 Workflow configuration 45.2.1 Workflow observers 45.3 Document formatters 45.4 Bank statement importers 45.5 HTTP request interceptors 45.6 Outgoing mail transport 45.7 Sales/VAT tax calculation 46 Batch data import methods 46.1 Custom bank statement import 46.2 Chart of Accounts import 47 Add-ons and plug-ins 48 Company creation 48.1 Template sets VIII Workflows 49 Overview IX Appendices A Differences between version 1.2 and 1.3 A.1 Users B Why deleting invoices is not supported B.1 Invoices are debt claims B.2 Cost Of Goods Sold become ambiguous C Installation C.1 Docker preview C.2 Docker Production C.3 Native C.4 Docker Development C.5 Linux Distribution D Migration D.1 Introduction D.2 From older LedgerSMB versions D.3 From SQL-Ledger 2.8 D.4 From older SQL-Ledger versions D.5 From other accounting packages D.5.1 Overview D.5.2 Migrating customers D.5.3 Migrating parts, services, … D.5.4 Migrating the balance D.6 Migrating between PostgreSQL versions D.6.1 Notes on migration from PostgreSQL 8.3 (or earlier) to 8.4 - deprecated E Listing of application roles F Deprecated Content F.1 ledgersmb.conf G Open source explained G.1 An open source application G.2 An open source book H Project history I Copyright and license I.1 License summary I.2 Legal full text Index List of Figures 5.1 setup.pl login screen 5.2 Chart of accounts - country selection 5.3 Chart of accounts - selection 5.4 Template selection 5.5 setup.pl initial user creation screen 5.6 setup.pl successful completion screen 6.1 login.pl opening screen 6.2 login.pl welcome screen 6.3 Password change screen 6.4 User preferences 6.5 System defaults 6.6 Bank account setup - menu items 6.7 Bank account setup - account setup screen 6.8 Tax rate adjustment screen 7.1 Add first part 7.2 Company entry screen 7.3 Vendor account screen 7.4 Vendor account screen - with purchase discount account 7.5 RFQ entry screen 7.6 RFQ e-mail screen 7.7 RFQ entry screen 7.8 Order receipt entry screen 8.1 Add contact screen 8.2 Credit account screen 8.3 Credit account 2nd screen 8.4 Addresses screen 18.1 Configure Account Hierarchy 18.2 Account Setup 18.3 Report Using Hierarchy 18.4 System Default Accounts 18.5 System templates screen 18.6 Templates edit invoice screen 24.1 Screen for user creation - step 1 24.2 Screen for user creation - step 2 24.3 User preferences screen 26.1 Tax account configuration screen 34.1 RFQ entry screen 36.1 Saved purchase order 36.2 Search screen for purchase order item receipts 36.3 Search results screen for purchase order item receipts 36.4 Purchase order receipt screen 43.1 Period and Year End Closing 45.1 Workflow triggered from another workflow 45.2 Conditional workflow actions List of Tables 5.1 Create first user entry data 6.2.1 Login screen 6.2 First Login - Change initial password data 6.3 First Login - Change user defaults data 8.1 Company data 8.2 Credit Accounts data 8.3 First company address data 27.1 Customer specific price matrix 27.2 Price group specific price matrix 27.3 Price matrix configuration 27.4 Price matrix configuration