summaryrefslogtreecommitdiff
path: root/doc/manual/LedgerSMB-manual.tex
blob: dabe5a9837334a9d90b403e1024827f6f15f9c3d (plain)
  1. \documentclass{article}
  2. \usepackage{metatron}
  3. \renewcommand{\abstractname}{Executive Summary}
  4. \newcommand{\mycustomer}[1][]{#1\space}
  5. \newcommand{\myproject}[1][]{#1\space}
  6. \title{Ledger-SMB Manual}
  7. \author{Chris Travers (\metamail{chris})}
  8. \date{\today}
  9. \begin{document}
  10. \maketitle
  11. Copyright \copyright 2006 Metatron Technology Consulting.
  12. Permission is granted to copy, distribute and/or modify this document
  13. under the terms of the GNU Free Documentation License, Version 1.2
  14. or any later version published by the Free Software Foundation;
  15. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  16. A copy of the license is included in the section entitled "GNU
  17. Free Documentation License" (Appendix \ref{fdl}).
  18. \tableofcontents
  19. \listoffigures
  20. \clearpage
  21. \part{Ledger-SMB and Business Processes}
  22. \section{Introduction to Ledger-SMB}
  23. \subsection{Why Ledger-SMB}
  24. \subsubsection{Advantages of Ledger-SMB}
  25. \begin{itemize}
  26. \item Flexibility and Central Management
  27. \item Accessibility over the Internet (for some users)
  28. \item Data is in a relatively open format
  29. \item Integration with other tools
  30. \item One of the best accounting options for Linux users.
  31. \item Open Source
  32. \item A flexible, open framework that can be extended or modified to fit your
  33. business.
  34. \item Security-conscious development community.
  35. \end{itemize}
  36. \subsubsection{Key Features}
  37. \begin{itemize}
  38. \item Accounts Receivable
  39. \begin{itemize}
  40. \item Track sales by customer
  41. \item Issue Invoices, Statements, Receipts, and more
  42. \item Job costing and time entry for customer projects.
  43. \item Manage sales orders and quotations
  44. \item Ship items from sales orders
  45. \end{itemize}
  46. \item Accounts Payable
  47. \begin{itemize}
  48. \item Track purchases and debts by vendor.
  49. \item Issue RFQ's Purchase Orders, etc.
  50. \item Track items received from purchase orders.
  51. \end{itemize}
  52. \item Budgeting
  53. \begin{itemize}
  54. \item Track expenditures and income across multiple departments.
  55. \item Track all transactions across departments.
  56. \end{itemize}
  57. \item Check Printing
  58. \begin{itemize}
  59. \item Can customize template for any check form
  60. \end{itemize}
  61. \item General Ledger
  62. \item Inventory Management
  63. \begin{itemize}
  64. \item Track sales and orders of parts
  65. \item Track cost of goods sold using First In/First Out method
  66. \item List all parts below reorder point.
  67. \item Track ordering requirements.
  68. \item Track, ship, receive, and transfer parts to and from multiple
  69. warehouses.
  70. \end{itemize}
  71. \item Localization
  72. \begin{itemize}
  73. \item Provide Localized Translations for Part Descriptions
  74. \item Provide Localized Templates for Invoices, Orders, Checks, and more.
  75. \item Select language per customer, invoice, order, etc.
  76. \end{itemize}
  77. \item Manufacturing
  78. \begin{itemize}
  79. \item Track cost of goods sold for manufactured goods (assemblies)
  80. \item Create assemblies and stock assemblies, tracking materials on hand.
  81. \end{itemize}
  82. \item Multi-company/Multiuser
  83. \begin{itemize}
  84. \item One isolated database per company
  85. \item Users can have localized systems independent of company data set.
  86. \end{itemize}
  87. \item Point of Sale
  88. \begin{itemize}
  89. \item Run multiple cash registers against main Ledger-SMB installation.
  90. \item Suitable for retail stores and more.
  91. \item Supports some POS hardware out of the box.
  92. \item Third party add-ons available for more functionality.
  93. \end{itemize}
  94. \item Price Matrix
  95. \begin{itemize}
  96. \item Track different prices for vendors and customers across the board.
  97. \item Provide discounts to groups of customers per item or across the board.
  98. \item Store vendors' prices independent of the other last cost in the
  99. parts record.
  100. \end{itemize}
  101. \item Reporting
  102. \begin{itemize}
  103. \item All basic financial statements supported.
  104. \item Customer history, sales data, and additional information can be easily
  105. displayed.
  106. \item Open framework allows for ODBC connections to be used to generate
  107. reports using third party reporting tools.
  108. \end{itemize}
  109. \item Tax
  110. \begin{itemize}
  111. \item Supports Retail Sales Tax and Value Added Tax type systems
  112. \item Flexible framework allows one to customize reports to change the tax
  113. reporting framework to meet any local requirement.
  114. \end{itemize}
  115. \end{itemize}
  116. \subsection{Limitations of Ledger-SMB}
  117. \begin{itemize}
  118. \item No payroll module (Payroll must be done manually)
  119. \item Some integration limitations
  120. \item Further development/maintenance requires a knowledge of a relatively
  121. broad range of technologies.
  122. \end{itemize}
  123. \subsection{System Requirements of Ledger-SMB}
  124. \begin{itemize}
  125. \item PostgreSQL
  126. \item A CGI-enabled Web Server (for example, Apache)
  127. \item Perl with the DBI and DBD::Pg modules
  128. \item An operating system which supports the above software (usually Linux,
  129. though Windows, MacOS X, etc. do work).
  130. \item \LaTeX\ (optional) is required to create PDF or Postscript invoices.
  131. \end{itemize}
  132. \section{User Account and Database Administration Basics}
  133. These functions are accessed by going to the admin.pl script in the installed
  134. directory of Ledger-SMB.
  135. \subsection{Companies and Datasets}
  136. Ledger-SMB stores its information in locale-specific data sets. When a dataset
  137. is created, it sets various defaults such as currency, a basic chart of accounts
  138. setup, and so forth. Note that the default setup is for Canada, where the
  139. author of the software resides.
  140. Datasets are generally tracked as PostgreSQL databases. The application is
  141. designed with the idea that each dataset will represent exactly one company. If
  142. a customer is working with multiple companies, he/she must create a dataset to
  143. for each.
  144. \subsection{How to Create a User}
  145. Users are created by going to the admin.pl page and clicking on "Add User." One
  146. then fills out the form and when it is saved, the user is created.
  147. \subsection{Permissions}
  148. The permissions system is not rigorously enforced within Ledger-SMB, in the
  149. sense that the permissions API is generally not used in the application itself.
  150. Instead permissions are used to enable/disable menu options. Setting an
  151. enforcement of such permissions would require some custom programming at the
  152. present time. Most organizations, however, find that the current system is
  153. adequate.
  154. The checkboxes which are marked enable menu entries. Those that are unchecked
  155. disable those entries on the menu.
  156. \subsection{User Account Types}
  157. \begin{itemize}
  158. \item User is a general user of the system
  159. \item Managers often are able to see a larger amount of data
  160. \item Administrators have full access to the system
  161. \end{itemize}
  162. \subsection{Other Features}
  163. \begin{itemize}
  164. \item Lock System allows one to lock users out of the system while maintenance
  165. is performed. This is only necessary during upgrades or maintenance which
  166. results in the RDBMS being offline.
  167. \item Change Admin Password.
  168. \item Logout terminates the admin session.
  169. \end{itemize}
  170. \section{Chart of Accounts}
  171. The Chart of Accounts provides a basic overview of the logical structure of the
  172. accounting program. One can customize this chart to allow for tracking of
  173. different sorts of information.
  174. \subsection{Introduction to Double Entry Bookkeeping}
  175. Ledger-SMB is a double entry system, meaning that every transaction consists of
  176. an equal sum of credits and debits (see below). A transaction is said to be
  177. balanced when the debits and credits are equal. This is an oversimplification
  178. and doesn't cover more complex processes involving closing books properly. In
  179. general customers should be referred to their accountants for information beyond
  180. the capabilities of the software. This module is just designed to provide
  181. enough familiarity with the concepts to be able to have an intelligent
  182. conversation with a bookkeeper or accountant who has specific requirements in
  183. this regard.
  184. \subsubsection{Account Types}
  185. \begin{itemize}
  186. \item Assets represent tangible or intangible property or money
  187. retained by the company. This includes money owed to the company.
  188. \item Liabilities are money that the company owes others.
  189. \item Equity is the valuation of the company as a whole. Includes investment
  190. capital, and money paid out to owners either as dividends or as withdrawals (for
  191. sole proprietorships). Normally one will have at least three equity accounts:
  192. One for tracking investment in the business, one for tracking withdrawals or
  193. dividends, and one for tracking retained earnings.
  194. \item Income accounts track the category of money as it is earned by the
  195. business.
  196. \item Expense accounts track the category of money flowing out as expenses are
  197. accrued.
  198. \end{itemize}
  199. \subsubsection{Debits and Credits}
  200. Debits and credits are the basic unit of double-entry bookkeeping. When money
  201. is removed from the business by the owners (as an equity payment) that is a
  202. debit, while when money is invested in the business, that is a credit. Every
  203. other transaction is set to balance these concepts. Therefore asset accounts
  204. normally have a debit balance because this allows for the equity account to be
  205. debited, while expense accounts normally have a credit balance.
  206. If the total debits is not equal to the total credits in the chart of accounts,
  207. something is very wrong, and the customer should get technical support
  208. immediately.
  209. \subsubsection{A few Examples}
  210. One might have a business that rents an office space. When
  211. rent is due, the accounts payable account would be credited, while the rent
  212. expense account would be debited. When this is paid, the accounts payable
  213. account would be debited while the asset account would be credited. This may
  214. seem backwards, but the result is to reduce by the amount owed for rent the
  215. amount that the owners can withdraw from the business as a debit. Let's say the
  216. office rent is \$300.
  217. \begin{itemize}
  218. \item Rent expense account is debited \$300
  219. \item Accounts Payable is credited \$300
  220. \item When this is paid, the checking account is credited \$300
  221. \item And the Accounts Payable is debited \$300
  222. \end{itemize}
  223. Let us say one performs a small consulting project for \$600. At the completion
  224. of this project, the following transaction would be made:
  225. \begin{itemize}
  226. \item Accounts Receivable is debited \$600
  227. \item Income (Consulting) is credited \$600.
  228. \end{itemize}
  229. Then the customer pays the \$600, the following transaction is entered.
  230. \begin{itemize}
  231. \item Accounts Receivable is credited \$600
  232. \item Payments Received is debited \$600.
  233. \end{itemize}
  234. \subsection{General Guidelines on Numbering Accounts}
  235. In general, most drop-down boxes in Ledger-SMB order the accounts by account
  236. number. Therefore by setting appropriate account numbers, one can affect the
  237. default values.
  238. A second consideration is to try to keep things under each heading appropriate
  239. tot hat heading. Thus setting an account number for a bank loan account in the
  240. assets category is not generally advisable.
  241. \subsection{Adding/Modifying Accounts}
  242. These features are listed under System-\textgreater Chart of Accounts.
  243. One can list the accounts and click on the account number to modify them or
  244. click on the "add account" option to create new accounts.
  245. \begin{itemize}
  246. \item Headings are just broad categories and do not store values themselves,
  247. while accounts are used to store the transactional information.
  248. \item One cannot have an account that is both a summary account (like AR) but
  249. also has another function.
  250. \item GIFI is mostly of interest to Canadian customers but it can be used to
  251. create reports of account hierarchies.
  252. \end{itemize}
  253. \subsection{Listing Account Balances and Transactions}
  254. One can list the account balances via the Reports-\textgreater Chart of Accounts report.
  255. Clicking on the account number will provide a ledger for that account.
  256. \section{Administration}
  257. This section will cover other (non-Chart of Accounts) aspects to the setup of
  258. the Ledger-SMB accounting package. These are generally accessed in the System
  259. submenu.
  260. \subsection{Taxes, Defaults, and Preferences}
  261. \subsubsection{Adding A Sales Tax Account}
  262. Sales Tax is collected on behalf of a state of national government by the
  263. individual store. Thus a sales tax account is a liability-- it represents money
  264. *owed* by the business to the government.
  265. To add a sales tax account, one would create an account in the COA as a
  266. liability account, check all of the "tax" checkboxes, and answer the following
  267. question as "yes:"
  268. "Include this account on the customer/vendor forms to flag customer/vendor as
  269. taxable?"
  270. Once this account is created, one can set the tax amount.
  271. \subsubsection{Setting a Sales Tax Amount}
  272. Go to System-\textgreater Defaults and the tax account will be listed near the bottom of the
  273. page. The rate can be set there.
  274. \subsubsection{Default Account Setup}
  275. These accounts are the default accounts for part creation and foreign exchange
  276. tracking.
  277. \subsubsection{Currency Setup}
  278. The US accounts list this as USD:CAD:EUR. One can add other currencies in here,
  279. such as IDR (Indonesian Rupiah), etc. Currencies are separated by colons.
  280. \subsubsection{Sequence Settings}
  281. These sequences are used to generate user identifiers for quotations, invoices,
  282. and the like. If an identifier is not added, the next number will be used.
  283. A common application is to set invoices, etc. to start at 1000 in order to hide
  284. the number of issued invoices from a customer.
  285. \subsection{Audit Control}
  286. Auditibility is a core concern of the architects of any accounting system. Such
  287. ensures that any modification to the accounting information leaves a trail which
  288. can be followed to determine the nature of the change. Audits can help ensure
  289. that the data in the accounting system is meaningful and accurate, and that no
  290. foul play (such as embezzlement) is occurring.
  291. \subsubsection{Explaining transaction reversal}
  292. In paper accounting systems, it was necessary to have a means to authoritatively
  293. track corrections of mistakes. The means by which this was done was known as
  294. "transaction reversal."
  295. When a mistake would be made, one would then reverse the transaction and then
  296. enter it in correctly. For example, let us say that an office was renting space
  297. for \$300 per month. Let us say that they inadvertently entered it in as a
  298. \$200 expense.
  299. The original transaction would be:
  300. \begin{tabular}{l|r|r}
  301. Account & Debit & Credit \\
  302. \hline
  303. 5760 Rent & \$200 & \\
  304. 2100 Accounts Payable & & \$200\\
  305. \end{tabular}
  306. The reversal would be:
  307. \begin{tabular}{l|r|r}
  308. Account & Debit & Credit \\
  309. \hline
  310. 5760 Rent & & \$200\\
  311. 2100 Accounts Payable &\$200 & \\
  312. \end{tabular}
  313. This would be followed by re-entering the rent data with the correct numbers.
  314. This was meant to ensure that one did not erase data from the accounting books
  315. (and as such that erasing data would be a sign of foul play).
  316. Ledger-SMB has a capability to require such reversals if the business deems this
  317. to be necessary. When this option is enabled, existing transactions cannot be
  318. modified and one will need to post reversing transactions to void existing
  319. transactions before posting corrected ones.
  320. Most accountants prefer this means to other audit trails because it is well
  321. proven and understood by them.
  322. \subsubsection{Close books option}
  323. The option to close books requires transaction reversal for any transaction up
  324. to a certain date.
  325. \subsubsection{Audit Trails}
  326. This option stores additional information in the database to help auditors trace
  327. individual transactions. The information stored, however, is limited and it is
  328. intended to be supplemental to other auditing facilities.
  329. The information added includes which table stored the record, which employee
  330. entered the information, which form was used, and what the action was. No
  331. direct financial information is included.
  332. \subsection{Departments}
  333. Departments are logical divisions of a business. They allow for budgets to be
  334. prepared for the individual department as well as the business as a whole. This
  335. allows larger businesses to use Ledger-SMB to meet their needs.
  336. \subsubsection{Cost v Profit Centers.}
  337. In general business units are divided into cost and profit centers. Cost
  338. centers are generally regarded as business units where the business expects to
  339. lose money and profit centers are where they expect to gain money. For example,
  340. the legal department in most companies is a cost center.
  341. One of the serious misunderstandings people run up against is that Ledger-SMB
  342. tends to more narrowly define cost and profit centers than most businesses do.
  343. In Ledger-SMB a cost center is any department of the business that does not
  344. issue AR transactions. Although many businesses may have cost centers (like
  345. technical support) where customer fees may subsidize the cost of providing the
  346. service, in Ledger-SMB, these are profit centers.
  347. Ledger-SMB will not allow cost centers to be associated with AR transactions.
  348. So if you want this functionality, you must create the department as a profit
  349. center.
  350. \subsection{Warehouses}
  351. Ledger-SMB has the ability to track inventory by warehouse. Inventory items can
  352. be moved between warehouses, and shipped from any warehouse where the item is in
  353. stock. We will explore this concept more later.
  354. \subsection{Languages}
  355. Languages allow for goods and services to be translated so that one can
  356. maintain offices in different countries and allow for different goods and
  357. service descriptions to be translated to different languages for localization
  358. purposes.
  359. \subsection{Types of Businesses}
  360. One can create types of businesses and then give them discounts across the
  361. board. For example, one might give a firm that uses one's services as a
  362. subcontractor a 10\% discount or more.
  363. \subsection{Misc.}
  364. \subsubsection{GIFI}
  365. GIFI is a requirement for Canadian customers. This feature allows one to link
  366. accounts with Canadian tax codes to simplify the reporting process.
  367. It also has another use in that non-Canadians can use this functionality to
  368. create customized reports by categorizing accounts using this field. This
  369. allows for a sort of shallow "account hierarchy" like some users are used to
  370. with other products.
  371. \subsubsection{SIC}
  372. Standard Industrial Classification is a way of tracking the type of business
  373. that a vendor or customer is in. For example, an accountant would have an SIC
  374. of 8721 while a graphic design firm would have an SIC of 7336. The
  375. classification is hierarchical so one could use this field for custom reporting
  376. and marketing purposes.
  377. \subsubsection{Overview of Template Editing}
  378. The templates for invoices, orders, and the like can be edited from within
  379. Ledger-SMB. The submenus within the System submenu such as HTML Templates,
  380. Text Templates and LaTeX templates provide access to this functionality.
  381. \subsubsection{Year-end}
  382. Although the Year-end functionality in Ledger-SMB is very useful, it does not
  383. entirely make the process simple and painless. One must still manually enter
  384. adjustments prior to closing the books. The extent to which these adjustments
  385. are necessary for any given business is a matter best discussed with an
  386. accountant.
  387. The standard way books are normally closed at the end of the year is by moving
  388. all adjusted\footnote{Adjustments would be entered via the General Ledger. The
  389. exact process is beyond the scope of this class, however.} income and expenses
  390. to an equity account usually called "Retained
  391. Earnings." Assets and liabilities are not moved. Equity drawing/dividend
  392. accounts are also moved, but the investment accounts are not. The reasoning
  393. behind this process is that one wants a permanent record of the amount invested
  394. in a business, but any dividends ought not to count against their recipients
  395. when new investors are brought on board.
  396. Ledger-SMB automatically moves all income and expense into the specified
  397. year-end/retained earnings account. It does not move the drawing account, and
  398. this must be done manually, nor does it automate the process of making
  399. adjustments.
  400. Contrary to its name, this function can close the books at any time, though this
  401. would likely be of limited use.
  402. \subsection{Options in the ledger-smb.conf}
  403. For those who are unfamiliar with Perl as a programming language, the
  404. ledger-smb.conf configures the software by assigning site-wide variables. Most
  405. of these should be left alone unless one knows what one is doing. However, on
  406. some systems some options might need to be changed, so all options are presented
  407. here for reference:
  408. \begin{itemize}
  409. \item \$userspath is the directory where Ledger-SMB will store the user
  410. accounts. The web server process must be able to read from and write to this
  411. directory.
  412. \item \$templates is the directory where the templates are stored.
  413. \item \$memberfile is the master list of user configuration information
  414. \item \$sendmail is the command to use to send a message. It must read the
  415. email from standard input.
  416. \item \$language allows one to set the language for the login screen and admin
  417. page.
  418. \item \$latex tells Ledger-SMB whether LaTeX is installed. LaTeX is required
  419. for generating Postscript and PDF invoices and the like.
  420. \item Various environmental variables (\$ENV...) can be set here too. One can
  421. add paths for searching for LaTeX, etc.
  422. \item \%printer can be used to set a hash table of printers for the software.
  423. The primary example is\\
  424. \%printer = ( 'Default' =\textgreater 'lpr', 'Color' =\textgreater 'lpr -PEpson' ); \\
  425. However, this can use any program that can accept print documents (in
  426. Postscript) from standard input, so there are many more possibilities.
  427. \end{itemize}
  428. I have omitted the variables used to configure Oracle as I do not believe it is
  429. still supported (it could be with a small amount of work though).
  430. \section{Goods and Services}
  431. The Goods and Services module will focus on the definition of goods and services
  432. and the related accounting concepts.
  433. \subsection{Basic Terms}
  434. \begin{description}
  435. \item[COGS] is Cost of Goods Sold. When an item is sold, then the expense of
  436. its purchase is accrued as attached to the income of the sale. It is tracked as
  437. COGS.
  438. \item[List Price] is the recommended retail price.
  439. \item[Markup] is the percentage increase that is applied to the last cost to get the sell price.
  440. \item[ROP] Re-order point. Items with fewer in stock than this will show up on
  441. short reports.
  442. \item[Sell Price] is the price at which the item is sold.
  443. \end{description}
  444. \subsection{The Price Matrix}
  445. It is possible to set different prices for different groups of customers, or for
  446. different customers individually. Similarly, one can track different prices
  447. from different vendors along with the required lead time for an order.
  448. \subsection{Pricegroups}
  449. Pricegroups are used to help determine the discount a given customer may have.
  450. \subsection{Groups}
  451. Groups represent a way of categorizing POS items for a touchscreen environment.
  452. It is not fully functional yet, but is sufficient that with some stylesheet
  453. changes, it could be made to work.
  454. \subsection{Labor/Overhead}
  455. Labor/overhead is usually used for tracking manufacturing expenses. It is not
  456. directly billed to a customer. It is associated with an expense/Cost of Goods
  457. Sold (COGS) account
  458. \subsection{Services}
  459. Services include any labor that is billed directly to the customer. It is
  460. associated with an expense/COGS account and an income account. Services can be
  461. associated with sales tax.
  462. \subsubsection{Shipping and Handling as a Service}
  463. One approach to dealing with shipping and handling is to add it as a service.
  464. Usually I place the unit as a dollar (USD) and then bill it as \$1 per unit.
  465. This allows me to add the exact amount of shipping and handling as necessary.
  466. \subsection{Parts}
  467. A part is any single item you might purchase and either might resell or use in
  468. manufacturing an assembly. It is linked to an expense/COGS
  469. account, an income account, and an inventory account. Parts can be associated
  470. with sales tax.
  471. \subsection{Assemblies and Manufacturing}
  472. Manufacturers order parts but they sell the products of their efforts.
  473. Ledger-SMB supports manufacturing using the concept of assemblies. An assembly
  474. is any product which is manufactured on site. It consists of a selection of
  475. parts, services, and/or labor and overhead. Assemblies are treated as parts in
  476. most other regards.
  477. However, one cannot order assemblies from vendors. One must instead order the
  478. components and stock them once they are manufactured.
  479. %Excersize 1
  480. \subsubsection{Stocking Assemblies}
  481. One stocks assemblies in the Stock Assembly entry on the Goods and Services
  482. submenu. When an assembly is stocked the inventory is adjusted properly.
  483. The Check Inventory option will cause Ledger-SMB to refuse to stock an assembly
  484. if the inventory required to produce the assembly would drop the part below the
  485. reorder point.
  486. \subsection{Reporting}
  487. \subsubsection{All Items and Parts Reports}
  488. The All Items provides a unified view of assemblies, parts, services, and labor
  489. for the company, while the Parts report confines it to parts.
  490. Types of reports are:
  491. \begin{description}
  492. \item[Active] lists all items not marked as obsolete.
  493. \item[On Hand] lists current inventory
  494. \item[Short] Lists all items which are stocked below their ROP
  495. \item[Obsolete] Lists all items which are marked as obsolete
  496. \item[Orphaned] Lists all items which have never had a transaction associated
  497. with them.
  498. \end{description}
  499. One can also list these goods by invoice, order, or quotation.
  500. For best results, it is a good idea to enter some AR and AP data before running
  501. these reports.
  502. \subsubsection{Requirements}
  503. This report is designed to assist managers determine the quantities of goods to
  504. order and/or stock. It compares the quantity on hand with the activity in a
  505. given time frame and provides a list of goods which need to be ordered and the
  506. relevant quantity.
  507. \subsubsection{Services and Labor}
  508. This is similar to the Parts and All Items menu but only supports active,
  509. obsolete, and orphaned reports.
  510. \subsubsection{Assemblies}
  511. This is similar to the Parts and All Items reports but it also provides an
  512. ability to list individual items in the assemblies as well.
  513. AP Invoices, Purchase Orders, and RFQ's are not available on this report.
  514. \subsubsection{Groups and Pricegroups}
  515. These reports provide a simple interface for locating groups and pricegroups.
  516. The report types are similar to what they are for services.
  517. \subsection{Translations}
  518. One can add translations so that they show up in the customer's native language
  519. in the issued invoice.
  520. To issue translations, one must have languages defined. One can then add
  521. translations to descriptions and part groups.
  522. \subsection{How Cost of Goods Sold is tracked}
  523. Cost of Goods Sold is tracked on a First-In, First-out (FIFO) basis. When a
  524. part is purchased, its cost is recorded in the database. The cost of the item
  525. is then added to the inventory asset account. When the good is sold, the cost
  526. of the item is moved to the cost of goods sold account.
  527. This means that one must actually provide invoices for all goods entered at
  528. their actual cost. If one enters in \$0 for the cost, the cost of goods sold
  529. will also be \$0 when the item is sold. We will cover this entire process in
  530. more depth after we cover the AP and AR units below.
  531. \section{AP}
  532. \subsection{Basic AP Concepts}
  533. The Accounts Payable module tracks all financial commitments that the company
  534. makes to other businesses. This includes rent, utilities, etc. as well as
  535. orders of goods and services.
  536. \subsection{Vendors}
  537. A vendor is any business that the company agrees to pay money to.
  538. One can enter vendor information under AP-\textgreater Vendors-\textgreater Add Vendor. The vendor list
  539. can be searched under AP-\textgreater Vendors-\textgreater Reports-\textgreater Search.
  540. In older versions of Ledger-SMB, vendors would continue to populate the list of
  541. active vendors forever and there was no way to delete them. Now one can enter
  542. start and end-dates and this can be used to filter out vendors in searches or
  543. drop-down boxes.
  544. A few fields that need explanation are:
  545. \begin{description}
  546. \item[BIC] Bank Identifier Code is often the same as the S.W.I.F.T. code. This
  547. is a code for the bank a customer uses for automated money transfers.
  548. \item[IBAN] International Bank Account Number is related to the BIC and is used
  549. for cross-border automated money transfers.
  550. \item[Terms] is the number of days one has to pay the invoice.
  551. \item[Vendor Number] is automatically generated.
  552. \end{description}
  553. \subsection{AP Transactions}
  554. AP Transactions are generally used for items other than goods and services.
  555. Utilities, rent, travel expenses, etc. could be entered in as an AP transaction.
  556. If the item is paid partially or in full when the transaction is entered, one
  557. can add payments to the payment section.
  558. All other payments can and should be entered under cash payment (below).
  559. The PO Number and Order Number fields are generally used to track associations
  560. with purchase orders sent to vendors, etc. These fields can be helpful for
  561. adding misc. expenses to orders for reporting purposes.
  562. The department drop-down box appears when one has created one or more
  563. departments. A transaction is not required to be associated with a department,
  564. but one can use this feature for budget tracking.
  565. With AP Transactions, there is no option for internal notes. All notes will
  566. appear on any printed version of the transaction.
  567. Note: Printing a transaction does not post it. No data is committed until the
  568. invoice is posted.
  569. \subsection{AP Invoices}
  570. AP Invoices are used to enter in the receipt of goods and services. Goods and
  571. services are deemed entered into the inventory when they are invoiced.
  572. This screen is reasonably similar to the AP Transaction Screen, though the part
  573. entry section is a bit different.
  574. The AP Invoice section has a capacity to separate internal notes from notes
  575. printed on the invoice. Note, however, that since these are received invoices,
  576. it is rare that one needs this ability.
  577. Note that Ledger-SMB can search for partial part numbers or descriptions.
  578. Also if you have a group you can use this to select the part.
  579. To remove a line item from an invoice or order, delete the partnumber and click
  580. update.
  581. \subsubsection{Correcting an AP Invoice}
  582. If an invoice is entered improperly, the methods used to correct it will vary
  583. depending on whether transaction reversal is enforced or not. If transaction
  584. reversal is not enforced, one can simply correct the invoice or transaction and
  585. repost.
  586. If not, one needs to create a *duplicate* invoice with exactly opposite values
  587. entered. If one part was listed as received, then one should enter a negative
  588. one for the quantity. Then one can enter the invoice number as the same as the
  589. old one (though I like to add an R to the end to show that it is a reversing
  590. transaction). Once this is posted, one can enter the invoice correctly.
  591. \subsection{Cash payment And Check Printing}
  592. In general, it is a bad idea to repost invoices/transactions just in order to
  593. enter a payment. The Cash-\textgreater Payment window allows one to enter payments against
  594. AP invoices or transactions.
  595. The printing capability can be used to print checks. The default template is
  596. NEBS 9085, though you can use 9082 as well (as Quickbooks does).
  597. The source field is used to store an identifying number of the source document,
  598. such as the check number. One must select the item to have it paid, and then
  599. enter the amount. One can then print a check.
  600. \subsubsection{Rapid Payment Entry Screen}
  601. One can also use the rapid payment entry screen to print multiple checks.
  602. However, this does not allow you to print the multiple checks to the screen as a
  603. separate document is created for each check. In this event, one must print
  604. directly to a printer as postscript.
  605. \subsection{Transaction/Invoice Reporting}
  606. \subsubsection{Transactions Report}
  607. This report is designed to help you locate AP transactions based on various
  608. criteria. One can search by vendor, invoice number, department, and the like.
  609. One can even search by the shipping method.
  610. The summary button will show what was placed where, while the details button
  611. will show all debits and credits associated with the transaction.
  612. To view the invoice, click on the invoice number. In the detail view, to view
  613. the account transactions as a whole, click on the account number.
  614. Open invoices are ones not fully paid off, while paid closed invoices are those
  615. that have been paid.
  616. \subsubsection{Outstanding Report}
  617. The outstanding report is designed to help you locate AP transactions that are
  618. not paid yet. The ID field is mostly useful for locating the specific database
  619. record of a duplicate invoice number exists.
  620. \subsubsection{AP Aging Report}
  621. This report can tell you how many invoices are past due and by how much.
  622. A summary report just shows vendors while a detail report shows individual
  623. invoices.
  624. \subsubsection{Tax Paid and Non-taxable Report}
  625. These reports are not generally used in the US because most of the time
  626. wholesale goods are not taxable. However, for businesses with offices in other
  627. countries including Canada, it is often important for them to be aware of this
  628. functionality. In these countries, one generally pays sales tax even on
  629. wholesale goods and then takes a tax credit for these when when paying the sales
  630. tax to the country of province. Thus one needs to be able to track taxable and
  631. non-taxable expenses, and how much was paid. For now, it is sufficient to know
  632. that they are there.
  633. \subsection{Vendor Reporting}
  634. \subsubsection{Vendor Search}
  635. The Vendor Search screen can be used to locate vendors or AP transactions
  636. associated with those vendors.
  637. The basic types of reports are:
  638. \begin{description}
  639. \item[All] Lists all vendors
  640. \item[Active] Lists those vendors currently active
  641. \item[Inactive] Lists those vendors who are currently inactive.
  642. time frame.
  643. \item[Orphaned] Lists those vendors who do not have transactions associated with
  644. them. These vendors can be deleted.
  645. \end{description}
  646. One can include purchase orders, Requests for Quotations, AP invoices, and AP
  647. transactions on this report as well if they occur between the from and to dates.
  648. \subsubsection{Vendor History}
  649. This report can be used to obtain information about the past goods and services
  650. ordered or received from vendors. One can find quantities, partnumber, and
  651. sell prices on this report. This facility can be used to search RFQ's, Purchase
  652. Orders, and AP Invoices.
  653. \section{AR}
  654. \subsection{Customers}
  655. Customers are entered in using the AR-\textgreater Customers-\textgreater Add Customer menu.
  656. The salesperson is autopopulated with the current user who is logged in.
  657. Otherwise, it looks fairly similar to the Vendor input screen. Customers, like
  658. vendors can be assigned languages, but it is more important to do so because
  659. invoices will be printed and sent to them.
  660. The credit limit field can be used to assign an amount that one is willing to do
  661. for a customer on credit.
  662. \subsubsection{Customer Price Matrix}
  663. The price list button can be used to enter specific discounts to the customer,
  664. and groups of customers can be assigned a pricegroup for the purpose of offering
  665. specific discounts on specific parts to the customer. Such discounts can be
  666. temporary or permanent.
  667. \subsection{AR Transactions}
  668. AR Transactions are where one can add moneys owed the business by customers.
  669. One can associate these transactions with income accounts, and add payments if
  670. the item is paid when the invoice is issued.
  671. The PO number field is used to track the PO that the customer sent. This makes
  672. it easier to find items when a customer is asking for clarification on a bill,
  673. for example.
  674. \subsection{AR Invoices}
  675. AR Invoices are designed to provide for the delivery of goods and services to
  676. customers. One would normally issue these invoices at the time when the
  677. everything has been done that is necessary to get paid by the customer.
  678. As with AP invoices, one can search for matches to partial part numbers and
  679. descriptions, and enter initial payments at this screen.
  680. \subsection{Cash Receipt}
  681. The Cash-\textgreater Receipt screen allows you to accept prepayments from customers or pay
  682. single or multiple invoices after they have been posted. One can print a
  683. receipt, however the current templates seem to be based on check printing
  684. templates and so are unsuitable for this purpose. This presents a great
  685. opportunity for improvement.
  686. \subsubsection{Cash Receipts for multiple customers}
  687. The cash-\textgreater receipts screen allows you to accept payments on all open customer
  688. invoices of all customers at once. One could print (directly to a printer only)
  689. all receipts to be sent out if this was desired.
  690. \subsection{AR Transaction Reporting}
  691. The AR Outstanding report is almost identical to the AP Outstanding report and
  692. is not covered in any detail in this document.
  693. \subsubsection{AR Transactions Report}
  694. This is almost identical to the AP Transactions Report.
  695. If a customer's PO has been associated with this transaction, one can search
  696. under this field as well.
  697. \subsubsection{AR Aging Report}
  698. This report is almost identical to the AP Aging report, with the exception that
  699. one can print up statements for customer accounts that are overdue. One more
  700. application is to calculate interest based on balance owed so that these can be
  701. entered as AR transactions associated with the customer.
  702. \subsection{Customer Reporting}
  703. These reports are almost identical tot he AP Vendor reports and are not
  704. discussed in these notes.
  705. \section{Projects}
  706. \subsection{Project Basics}
  707. A project is a logical collection of AR and AP transactions, orders, and the
  708. like that allow one to better manage specific service or product offerings.
  709. Ledger-SMB does not offer comprehensive project management capabilities, and
  710. projects are only used here as they relate to accounting.
  711. One can also add translated descriptions to the project names as well.
  712. \subsection{Timecards}
  713. Timecards allow one to track time entered on specific services. These can then
  714. be used to generate invoices for the time entered.
  715. The non-chargeable is the number of hours that are not billed on the invoice.
  716. One can then generate invoices based on this information.
  717. The project field is not optional.
  718. \subsection{Projects and Invoices}
  719. One can select the project id for line items of both AR and AP invoices. These
  720. will then be tracked against the project itself.
  721. \subsection{Reporting}
  722. \subsubsection{Timecard Reporting}
  723. The Timecard Report allows one to search for timecards associated with one or
  724. more projects. One can then use the total time in issuing invoices (this is not
  725. automated yet).
  726. \subsubsection{Project Transaction Reporting}
  727. The Standard or GIFI options can be used to create different reports (for
  728. example, for Canadian Tax reporting purposes).
  729. This report brings up a summary that looks sort of like a chart of accounts. Of
  730. one clicks on the account numbers, one can see the transactions associated with
  731. the project.
  732. \subsubsection{List of Projects}
  733. This provides a simple way of searching for projects to edit or modify.
  734. \subsection{Possibilities for Using Projects}
  735. \begin{itemize}
  736. \item One can use them similar to departments for tracking work done for a
  737. variety of customers.
  738. \item One can use them for customer-specific projects, such as this training.
  739. \end{itemize}
  740. \section{Quotations and Order Management}
  741. This unit will introduce the business processes that Ledger-SMB allows. These
  742. processes are designed to allow various types of businesses to manage their
  743. orders allow for rudimentary customer relationship management processes to be
  744. built around this software. In this module, we will introduce the work flow
  745. options that many businesses may use in their day-to-day use of the software.
  746. \subsection{Sales Orders}
  747. Sales orders represent orders from customers that have not been delivered or
  748. shipped yet. These orders can be for work in the future, or for back ordered
  749. products, or work in progress. A sales order can be generated form an AR
  750. invoice or from a quotation automatically.
  751. \subsection{Quotations}
  752. Quotations are offers made to a customer but to which the customer has not
  753. committed to the work. Quotations can be created from Sales orders or AR
  754. Invoice automatically.
  755. \subsection{Shipping}
  756. The Shipping module (Shipping-\textgreater Shipping) allows one to ship portions or
  757. entireties of existing sales orders, printing pick lists and packing slips.
  758. One can then generate invoices for those parts that were shipped.
  759. In general, one will be more likely to use these features if they have multiple
  760. warehouses that they ship from. More likely most customers will just generate
  761. invoices from orders.
  762. \subsection{AR Work Flow}
  763. \subsubsection{Service Example}
  764. A customer contacts your firm and asks for a quote on some services. Your
  765. company would create a quotation for the job and email it to the customer or
  766. print it and mail it. Once the customer agrees to pay, one creates an order
  767. from the quotation.
  768. When the work is completed, the order is converted into a sales invoice and this
  769. is presented to the customer as a bill.
  770. Note that in some cases, this procedure may be shortened. If the customer
  771. places an order without asking for a quotation and is offered a verbal quote,
  772. then one might merely prepare the order.
  773. \begin{figure}[hbtp]
  774. \caption{Simple AR Service Invoice Workflow Example}
  775. \input{simple_ar_dataflow}
  776. \end{figure}
  777. \subsubsection{Single Warehouse Example}
  778. A customer contacts your firm and asks for a quotation for shipping a part. You
  779. would create the quotation and when you get confirmation, convert it to an
  780. order. Once the parts are in place you could go to shipping and ship the part.
  781. The billing department can then generate the invoice from the sales order based
  782. on what merchandise has been shipped and mail it to the customer.
  783. Note that this requires that you have the part in your inventory.
  784. \begin{figure}[hbtp]
  785. \caption{AR Workflow with Shipping}
  786. \input{ar_workflow_ship}
  787. \end{figure}
  788. \subsubsection{Multiple Warehouse Example}
  789. A customer contacts your firm and asks for a quotation for a number of different
  790. parts. You would create a quotation and when you get confirmation, convert it
  791. to an order. When you go to ship the item, you would select the warehouse in
  792. the drop-down menu, and select the parts to ship. One would repeat with other
  793. warehouses until the entire order is shipped.
  794. Then the billing department would go to the sales order and generate the
  795. invoice. It would then be mailed to the customer.
  796. \begin{figure}[hbtp]
  797. \caption{Complex AR Workflow with Shipping}
  798. \input{ar_workflow_complex}
  799. \end{figure}
  800. \subsection{Requests for Quotation (RFQ)}
  801. A request for quotation would be a formal document one might submit to a vendor
  802. to ask for a quote on a product or service they might offer. These can be
  803. generated from Purchase Orders or AP Invoices
  804. \subsection{Purchase Orders}
  805. A purchase order is a confirmation that is issued to the vendor to order the
  806. product of service. Many businesses will require a purchase order with certain
  807. terms in order to begin work on a product. These can be generated from RFQ's or
  808. AP Invoices.
  809. \subsection{Receiving}
  810. The Shipping-\textgreater Receiving screen allows you to track the parts
  811. received from an existing purchase order. Like shipping, it does not post an
  812. invoice but tracks the received parts in the order.
  813. \subsection{AP Work Flow}
  814. \subsubsection{Bookkeeper entering the received items, order completed in full}
  815. Your company inquires about the price of a given good or service from another
  816. firm. You submit an RFQ to the vendor, and finding that the price is
  817. reasonable, you convert it to an order, adjust the price to what they have
  818. quoted, and save it. When the goods are delivered you convert the
  819. order into an AP invoice and post it.
  820. \begin{figure}[hbtp]
  821. \caption{Simple AP Workflow}
  822. \input{simple_ap_workflow}
  823. \end{figure}
  824. \subsubsection{Bookkeeper entering received items, order completed in part}
  825. Your company inquires about the price of a given good or service from another
  826. firm, You submit an RFQ to the vendor, and finding that the price is
  827. acceptable, you convert it into an order, adjusting the price to what they have
  828. quoted, and save it. When some of the goods are received, you open up the
  829. purchase order, enter the number of parts received, convert that order into
  830. an invoice, and post it. Repeat until all parts are received.
  831. \begin{figure}[hbtp]
  832. \caption{AP Workflow with Receiving}
  833. \input{ap_workflow_ship}
  834. \end{figure}
  835. \subsubsection{Receiving staff entering items}
  836. Your company inquires about the price of a given good or service from another
  837. firm, You submit an RFQ to the vendor, and finding that the price is
  838. acceptable, you convert it into an order, adjusting the price to what they have
  839. quoted, and save it. When some or all of the goods are received, the receiving
  840. staff goes Shipping-Receiving, locates the purchase order, and fills in the
  841. number of items received.
  842. The bookkeeper can then determine when all items have been received and post the
  843. invoice at that time.
  844. \begin{figure}[hbtp]
  845. \caption{Complex AP Workflow}
  846. \input{ap_workflow_complex}
  847. \end{figure}
  848. \subsection{Generation and Consolidation}
  849. \subsubsection{Generation}
  850. The Generation screen allows you to generate Purchase Orders based on sales
  851. orders. One selects the sales orders one wants to use, and clicks "Generate
  852. Purchase Orders." Then one selects clicks on the parts to order, adjusts the
  853. quantity if necessary, and clicks "Select Vendor." This process is repeated
  854. for every vendor required. Then the Generate Orders button is clicked.
  855. \subsubsection{Consolidation}
  856. One can consolidate sales and/or purchase orders using this screen. For the
  857. consolidation to work you must have more than one order associated with the
  858. relevant customer or vendor.
  859. \subsection{Reporting}
  860. The reporting functionality in the order management is largely limited to the
  861. ability to locate purchase orders, sales orders, RFQ's, and quotations.
  862. \subsection{Shipping Module: Transferring Inventory between Warehouses}
  863. One can transfer inventory between warehouses if necessary by using the
  864. Shipping-\textgreater Transfer Inventory screen.
  865. \section{HR}
  866. The HR module is currently limited to tracking employees for and their start and
  867. end dates. It has very little other functionality. One could build payroll
  868. systems that could integrate with it however.
  869. \section{POS}
  870. The Point of Sale screen is still fairly rudimentary, and it is one of the least
  871. mature aspects of Ledger-SMB. It is suitable for small retail environments at
  872. the moment but not much else.
  873. \subsection{Sales Screen}
  874. The sales screen looks very much like a normal invoice entry screen with a few
  875. differences.
  876. \begin{itemize}
  877. \item The discount text field is not available, nor is the unit field..
  878. \item The next part number is automatically focused when the data loads for
  879. rapid data entry.
  880. \item Hot keys for the buttons are Alt-U for update, Alt-P for print, Alt-O for
  881. post, and Alt-R for print and post.
  882. \item Part Groups appear at the bottom of the screen.
  883. \end{itemize}
  884. \subsection{Possibilities for Data Entry}
  885. \begin{itemize}
  886. \item Barcode scanners can be used to scan items in as they are being rung in.
  887. \item One could use touch screens, though this would ideally require some custom
  888. stylesheets to make it efficient.
  889. \end{itemize}
  890. \subsection{Hardware Support}
  891. As Ledger-SMB is a web-based application, the web browser usually does not allow
  892. the page to write to arbitrary files. Therefore hardware support for pole
  893. displays, etc. is not readily possible from the application itself. In some
  894. cases, there are add-on packages (such as SL-POS) which offer some additional
  895. hardware options via simple additional networking programs.
  896. Notes for specific types of hardware are as follows:
  897. \begin{description}
  898. \item[Touch screens:] The default stylesheet is not really usable from a
  899. touchscreen as the items are often too small. One would need to modify the
  900. stylesheets to ensure that the relevant items would be reasonable. Setting down
  901. the resolution would also help.
  902. \item[Receipt Printers:] ESC/POS printers generally work in text mode. Control
  903. sequences can be embedded in the template as necessary.
  904. \item[Pole Displays:] Generally are unsupported in Ledger-SMB without add-on
  905. patches and special network clients.
  906. \item[Cash Drawers:] These should be attached to the printer. The control codes
  907. can then be embedded in the invoices so that the drawer opens whenever an
  908. invoice is printed.
  909. \item[Barcode Scanners:] Most customers use decoded barcode scanners through a
  910. keyboard wedge interface. This allows them to scan items as if they were typing
  911. them on the keyboard.
  912. \end{description}
  913. \subsection{Reports}
  914. \subsubsection{Open Invoices}
  915. The POS-\textgreater Open screen allows one to find any POS receipts that are
  916. not entirely paid off.
  917. \subsubsection{Receipts}
  918. The POS-\textgreater Receipts screen allows one to bring up a basic record of
  919. the POS terminals. It is not sufficient for closing the till, however, though
  920. it may help for reconciliation.
  921. The till column is the last component or octet of the terminal's IP address.
  922. Therefore it is a good idea to try to avoid having IP addresses where the last
  923. octet is the same.
  924. All entries are grouped by date and source in this report.
  925. \section{General Ledger}
  926. \subsection{GL Basics}
  927. The General Ledger is the heart of Ledger-SMB. Indeed, Ledger-SMB is designed
  928. to be as close as possible to a software equivalent of a paper-based accounting
  929. program (but with no difference between the General Ledger and General Journal).
  930. \subsubsection{Paper-based accounting systems and the GL}
  931. In order to understand the principle of the General Ledger, one must have a
  932. basic understanding of the general process of bookkeeping using double-entry
  933. paper-based accounting systems.
  934. Normally when a transaction would be recorded, it would first be recorded in the
  935. "General Journal" which would contain detailed information about the
  936. transaction, notes, etc. Then the entries from the General Journal would be
  937. transcribed to the General Ledger, where one could keep closer tabs on what was
  938. going on in each account.
  939. In the general journal, all transactions are listed chronologically with
  940. whatever commentary is deemed necessary, while in
  941. the general ledger each account has its own page and transactions are recorded
  942. in a simple and terse manner. The General Journal is the first place the
  943. transaction is recorded and the General Ledger is the last.
  944. At the end of the accounting period, the GL transactions would be summarized
  945. into a trial balance and this would be used for creating financial statements
  946. and closing the books at the end of the year.
  947. \subsubsection{Double Entry Examples on Paper}
  948. Let us say that John starts his business with an initial investment of \$10,000.
  949. This is recorded in the General Journal as follows (in this example, suppose it
  950. is page 1):
  951. \begin{tabular}{|l|l|l|r|r|}
  952. \hline
  953. Date & Accounts and Explanation & Ref & DEBIT & CREDIT \\
  954. \hline
  955. March 1 & Checking Account & 1060 & 10000.00 & \\
  956. & John Doe Capital & 3011 & & 10000.00\\
  957. & John Doe began a business & & & \\
  958. & with an investment of & & & \\
  959. & \$10000 & & & \\
  960. \hline
  961. \end{tabular}\medskip
  962. This would then be transcribed into two pages of the General Ledger. The first
  963. page might be the Checking Account page:\medskip
  964. \begin{tabular}{|l|l|l|r|l|l|l|r|}
  965. \hline
  966. DATE & EXPLANATION & REF. & DEBITS & DATE & EXPLANATION & REF. & CREDITS\\
  967. \hline
  968. March 1 & & J1 & 10000.00 & & & & \\
  969. \hline
  970. \end{tabular}\medskip
  971. On the John Doe Capital page, we would add a similar entry:\medskip
  972. \begin{tabular}{|l|l|l|r|l|l|l|r|}
  973. \hline
  974. DATE & EXPLANATION & REF. & DEBITS & DATE & EXPLANATION & REF. & CREDITS\\
  975. \hline
  976. & & & & March 1 & & J1 & 10000.00\\
  977. \hline
  978. \end{tabular}\medskip
  979. \subsubsection{The GL in Ledger-SMB}
  980. The paper-based accounting procedure works well when one is stuck with paper
  981. recording requirements but it has one serious deficiency--- all of this
  982. transcribing creates an opportunity for errors.
  983. Relational databases relieve the need for such transcription as it is possible
  984. to store everything physically in a way similar to the way a General Journal is
  985. used in the paper-based systems and then present the same information in ways
  986. which are more closely related to the General Ledger book.
  987. This is the exact way that the General Ledger is used in Ledger-SMB. The actual
  988. data is entered and stored as if it was a general journal, and then the data can
  989. be presented in any number of different ways.
  990. All modules of Ledger-SMB that involve COA accounts store their data in the
  991. General Ledger (it is a little more complex than this but this is very close to
  992. the actual mechanism).
  993. \subsection{Cash Transfer}
  994. The simplest form of GL entry in Ledger-SMB is the Cash-\textgreater Transfer
  995. screen. This screen shows two transaction lines, and fields for reference,
  996. department, description, and notes.
  997. The field descriptions are as follows:
  998. \begin{description}
  999. \item[Reference] refers to the source document for the transfer. One can use
  1000. transfer sheets, bank receipt numbers, etc for this field.
  1001. \item[Description] is optional but really should be filled in. It ought to be a
  1002. description of the transaction.
  1003. \item[Notes] provide supplemental information for the transaction.
  1004. \item[FX] indicates whether foreign exchange is a factor in this transaction.
  1005. \item[Debit] indicates money going {\bf into} the asset account.
  1006. \item[Credit] indicates money coming {\bf out} of the asset account.
  1007. \item[Source] is the source document for that portion of the transaction.
  1008. \item[Memo] lists additional information as necessary
  1009. \item[Project] allows you to assign this line to a project.
  1010. \end{description}
  1011. The credit and debit options seem to be the opposite of what one would think o
  1012. concerning one's bank account. The reason is that credits and debits are
  1013. recorded so as to balance any money that may be invested in or withdrawn from
  1014. the business. A debit to an asset account will be credited when money is
  1015. withdrawn from the business, for example.
  1016. Also note that in this screen, when an item is updated, it will reduce the
  1017. number of lines to those already filled in plus an extra line for the new line
  1018. in the data entry.
  1019. \subsection{GL Transactions}
  1020. The GL Transaction screen (General Ledger-\textgreater Add Transaction) is
  1021. identical to the Cash Transfer screen with the exception that it starts with
  1022. nine instead of two lines. Otherwise, they are identical.
  1023. Again, one must be careful with debits and credits. Often it is easy to get
  1024. confused. It is generally worth while to go back to the principle that one
  1025. tracks them with regard to their impact on the equity accounts. So expenses are
  1026. credits because they debit the equity accounts, and income is a debit because it
  1027. credits the retained earning equity account.
  1028. \subsection{Payroll as a GL transaction}
  1029. Currently payroll must be done as a GL transaction. The attempts to create a
  1030. payroll system that would ship with SL have largely stalled.
  1031. Most customers running their businesses will have an idea of how to do this.
  1032. \begin{figure}[hbtp]
  1033. \caption{Payroll as a GL Transaction (Purely fictitious numbers)}
  1034. \begin{tabular}{|l|r|r|}
  1035. \hline
  1036. Account & Debit & Credit \\
  1037. 5101 Wages and Salaries & 500 & \\
  1038. 2032 Accrued Wages & & 450 \\
  1039. 2033 Fed. Income Tax wthd & & 30 \\
  1040. 2034 State Inc. Tax. wthd & & 15 \\
  1041. 2035 Social Security wthd & & 3 \\
  1042. 2036 Medicare wthd & & 2 \\
  1043. 2032 Accrued Wages & 450 & \\
  1044. 1060 Checking Acct & & 450 \\
  1045. \hline
  1046. \end{tabular}
  1047. \end{figure}
  1048. \subsection{Reconciliation}
  1049. To reconcile an account (say, when one would get a checking account statement),
  1050. one would go to cash/reconciliation, and check off the items that have cleared.
  1051. One can then attempt to determine where any errors lie by comparing the total on
  1052. the statement with the total that SL generates.
  1053. This can be done for other accounts too, such as petty cash.\footnote{Petty cash
  1054. denotes a drawer of cash that is used to pay small expenses. When an expense is
  1055. paid, it is recorded on a slip of paper that is stored for reconciliation
  1056. purposes.}
  1057. \subsection{Reports}
  1058. The most flexible report in Ledger-SMB is the GL report because it has access to
  1059. the entire set of financial transactions of a business. Every invoice posted,
  1060. payment made or received, etc. can be located here.
  1061. The search criteria include:
  1062. \begin{description}
  1063. \item[Reference] is the invoice number, or other reference number associated
  1064. with the transaction.
  1065. \item[Source] is the field related to the source document number in a payment or
  1066. other transaction.\footnote{Source documents are things like receipts, canceled
  1067. checks, etc. that can be used to verify the existence and nature of a
  1068. transaction.}
  1069. \item[Memo] relates to the memo field on a payment
  1070. \item[Department] can be used to filter results by department.
  1071. \item[Account Type] can be used to filter results by type of account (Asset,
  1072. Liability, etc.)
  1073. \item[Description] can be used to filter out by GL description or by
  1074. customer/vendor name.
  1075. \end{description}
  1076. The actual format of the report looks more like what one would expect in a paper
  1077. accounting system's general journal than a general ledger per se. A
  1078. presentation of the data that is more like the paper general ledger is found in
  1079. the Chart of Accounts report.
  1080. \subsubsection{GL as access to almost everything else}
  1081. The GL reports can be used to do all manner of things. One can determine, for
  1082. example, which AP invoice or transaction was paid with a certain check number,
  1083. which invoice by a specific customer was paid by a specific check number.
  1084. \section{Recurring Transactions}
  1085. Any transaction or invoice may be repeated a number of times in regular
  1086. intervals. To schedule any GL, AR, or AP transaction or invoice, click the
  1087. schedule button.
  1088. In general the reference number should be left blank as this will force
  1089. Ledger-SMB to create a new invoice or transaction number for each iteration.
  1090. The rest of the options are self-explanatory. Note that a blank number if
  1091. iterations will result in no recurrences of the transaction.
  1092. To process the recurring transactions, click on the Recurring Transactions
  1093. option on the main menu select the ones you want to process and click "Process
  1094. Transactions."
  1095. \section{Financial Statements and Reports}
  1096. Financial statements and reports are a very important part of any accounting
  1097. system. Accountants and businesspeople rely on these reports to determine the
  1098. financial soundness of the business and its prospects for the next accounting
  1099. period.
  1100. \subsection{Cash v. Accrual Basis}
  1101. Financial statements, such as the Income Statement and Balance Sheet can be
  1102. prepared either on a cash or accrual basis. In cash-basis accounting, the
  1103. income is deemed earned when the customer pays it, and the expenses are deemed
  1104. incurred when the business pays them.
  1105. There are a number of issues with cash-basis accounting from a business point of
  1106. view. The most extreme is that one can misrepresent the wellbeing of a business
  1107. by paying a large expense after a deadline. Thus cash-basis accounting does not
  1108. allow one to accurately pair the income with the related expense as these are
  1109. recorded at different times. If one cannot accurately pair the income with the
  1110. related expense, then financial statements cannot be guaranteed to tell one much
  1111. of anything about the well-being of the business.
  1112. In accrual basis accounting, income is considered earned when the invoice is
  1113. posted,
  1114. and expenses are considered incurred at the time when the goods or services are
  1115. delivered to the business. This way, one can pair the income made from the sale
  1116. of a product with the expense incurred in bringing that product to sale. This
  1117. pairing allows for greater confidence in business reporting.
  1118. \subsection{Viewing the Chart of Accounts and Transactions}
  1119. The Reports--\textgreater Chart of Accounts will provide the chart of accounts
  1120. along with current totals in each account.
  1121. If you click on an account number, you will get a screen that allows you to
  1122. filter out transactions in that account by various criteria. One can also
  1123. include AR/AP, and Subtotal in the report.
  1124. The report format is similar to that of a paper-based general ledger,
  1125. \subsection{Trial Balance}
  1126. \subsubsection{The Paper-based function of a Trial Balance}
  1127. In paper-based accounting systems, the accountant at the end of the year would
  1128. total up the debits and credits in every account and transfer them onto another
  1129. sheet called the trial balance. The accountant would check to determine that
  1130. the total debits and credits were equal and would then transfer this information
  1131. onto the financial statements. It was called a trial balance because it was the
  1132. main step at which the error-detection capabilities of double-entry accounting
  1133. systems were used.
  1134. \subsubsection{Running the Trial Balance Report}
  1135. This report is located under Reports --\textgreater Trial Balance. One can
  1136. filter out items by date, accounting period, or department. One can run the
  1137. report by accounts or using GIFI classifications to group accounts together.
  1138. From this report, you can click on the account number and see all transactions
  1139. on the trial balance as well as whether or not they have been reconciled.
  1140. \subsubsection{What if the Trial Balance doesn't Balance?}
  1141. If the trial balance does not balance, get technical support immediately. This
  1142. usually means that transactions were not entered properly. Some may have been
  1143. out of balance, or some may have gone into non-existent accounts (believe it or
  1144. not, Ledger-SMB does not check this latter issue).
  1145. \subsubsection{Trial Balance as a Summary of Account Activity}
  1146. The trial balance offers a glance at the total activity in every account. It
  1147. can provide a useful look at financial activity at a glance for the entire
  1148. business.
  1149. \subsubsection{Trial Balance as a Budget Planning Tool}
  1150. By filtering out departments, one can determine what a department earned and
  1151. spent during a given financial interval. This can be used in preparing budgets
  1152. for the next accounting period.
  1153. \subsection{Income Statement}
  1154. The Income Statement is another tool that can be used to assist with budgetary
  1155. planning as well as provide information on the financial health of a business.
  1156. The report is run from Reports--\textgreater Income Statement. The report
  1157. preparation screen shows the following fields:
  1158. \begin{description}
  1159. \item[Department] allows you to run reports for individual departments. This is
  1160. useful for budgetary purposes.
  1161. \item[Project] allows you to run reports on individual projects. This can show
  1162. how profitable a given project was during a given time period.
  1163. \item[From and To] allow you to select arbitrary from and to dates.
  1164. \item[Period] allows you to specify a standard accounting period.
  1165. \item[Compare to fields] allow you to run a second report for comparison
  1166. purposes for a separate range of dates or accounting period.
  1167. \item[Decimalplaces] allows you to display numbers to a given precision.
  1168. \item[Method] allows you to select between accrual and cash basis reports.
  1169. \item[Include in Report] provides various options for reporting.
  1170. \item[Accounts] allows you to run GIFI reports instead of the standard ones.
  1171. \end{description}
  1172. The report shows all income and expense accounts with activity during the period
  1173. when the report is run, the balances accrued during the period, as well as the
  1174. total income and expense at the bottom of each section. The total expense is
  1175. subtracted from the total income to provide the net income during the period.
  1176. If there is a loss, it appears in parentheses.
  1177. \subsubsection{Uses of an Income Statement}
  1178. The income statement provides a basic snapshot of the overall ability of the
  1179. business to make money. It is one of the basic accounting statements and is
  1180. required, for example, on many SEC forms for publicly traded firms.
  1181. Additionally, businessmen use the income statement to look at overall trends in
  1182. the ability of the business to make money. One can compare a given month,
  1183. quarter, or year with a year prior to look for trends so that one can make
  1184. adjustments in order to maximize profit.
  1185. Finally, these reports can be used to provide a look at each department's
  1186. performance and their ability to work within their budget. One can compare a
  1187. department or project's performance to a year prior and look for patterns that
  1188. can indicate problems or opportunities that need to be addressed.
  1189. \subsection{Balance Sheet}
  1190. The balance sheet is the second major accounting statement supported by
  1191. Ledger-SMB. The balance sheet provides a snapshot of the current financial
  1192. health of the business by comparing assets, liabilities, and equity.
  1193. In essence the balance sheet is a statement of the current state of owner
  1194. equity. Traditionally, it does not track changes in owner equity in the same
  1195. way the Statement of Owner Equity does.
  1196. The Balance Sheet report preparation screen is much simpler than the Income
  1197. Statement screen. Balance sheets don't apply to projects, but they do apply to
  1198. departments. Also, unlike an income statement, a balance sheet is fixed for a
  1199. specific date in time. Therefore one does not need to select a period.
  1200. The fields in creating a balance sheet are:
  1201. \begin{description}
  1202. \item[Department] allows you to run separate balance sheets for each department.
  1203. \item[As at] specifies the date. If blank this will be the current date.
  1204. \item[Compare to] specifies the date to compare the balance sheet to.
  1205. \item[Decimalplaces] specifies the number of decimal places to use.
  1206. \item[Method] selects between cash and accrual basis.
  1207. \item[Include in report] allows you to select supplemental information on the
  1208. report.
  1209. \item[Accounts] allows you to select between standard and GIFI reports.
  1210. \end{description}
  1211. The balance sheet lists all asset, liability, and equity accounts with a
  1212. balance. Each category has a total listed, and the total of the equity and
  1213. liability accounts is also listed.
  1214. The total assets should be equal to the sum of the totals of the liability and
  1215. equity accounts.
  1216. \subsection{What if the Balance Sheet doesn't balance?}
  1217. Get technical support immediately, This may indicate that out of balance
  1218. transactions were entered or that transactions did not post properly.
  1219. \subsection{No Statement of Owner Equity?}
  1220. The Statement of Owner Equity is the one accounting statement that Ledger-SMB
  1221. does not support. However, it can be simulated by running a balance sheet at
  1222. the end of the time frame in question and comparing it to the beginning. One
  1223. can check this against an income statement for the period in question to verify
  1224. its accuracy. The statement of owner equity is not as commonly used now as it
  1225. once was.
  1226. \section{The Template System}
  1227. Ledger-SMB allows most documents to be generated according to a template system.
  1228. This allows financial statements, invoices, orders, and the like to be
  1229. customized to meet the needs of most businesses. Company logos can be inserted,
  1230. the format can be radically altered, one can print letters to be included with
  1231. checks to vendors instead of the checks themselves, and the like. In the end,
  1232. there is very little that cannot be accomplished regarding modification of these
  1233. documents with the template system.
  1234. One can define different templates for different languages, so that a customer
  1235. in Spain gets a different invoice than a customer in Canada.
  1236. \subsection{Text Templates}
  1237. The only template that uses a text-only format is the POS receipt. This example
  1238. provides the simplest way to understand the template system.
  1239. The first two lines are:\\
  1240. \textless\%company align=center width=40\%\textgreater\\
  1241. \textless\%address align=center width=40\%\textgreater\\
  1242. The first line tells Ledger-SMB to print the company name as passed to it via a
  1243. variable, centered, with a page width of 40 characters. The second line does
  1244. the same thing with the address.
  1245. These variables are usually passed to the invoice using form fields (hidden or
  1246. otherwise) in the submitting web page. The printing script, however, can
  1247. disable some of these fields or add others via database lookups and the like.
  1248. In all types of templates, variable substitution occurs between \textless\% and
  1249. \%\textgreater. One can optionally specify an alignment or a width but these
  1250. are really only useful in text templates.
  1251. \subsection{HTML Templates}
  1252. The following templates exist in HTML format:
  1253. \begin{itemize}
  1254. \item Income Statement
  1255. \item Balance Sheet
  1256. \item Invoice (AR)
  1257. \item AR Transaction
  1258. \item AP Transaction
  1259. \item Packing List
  1260. \item Pick List
  1261. \item Sales Order
  1262. \item Work Order
  1263. \item Purchase Order
  1264. \item Bin List
  1265. \item Statement
  1266. \item Quotation
  1267. \item RFQ
  1268. \item Time Card
  1269. \end{itemize}
  1270. These templates can be edited by an HTML editor. However, it is generally
  1271. recommended that one back up templates first. The reason is that some HTML
  1272. editors will fully re-parse the HTML and save it back without what they see as
  1273. invalid tags. Most editors, however, will save the variable substitution tags
  1274. because similar tags are also used by Microsoft's active server pages.
  1275. Finally, some editors are known to mangle formatting, so many problems can be
  1276. avoided by ensuring that one has a backup of the templates, especially if they
  1277. have already been customized.
  1278. \subsection{\LaTeX\ Templates}
  1279. The following templates, by default, are available in \LaTeX\ :
  1280. \begin{itemize}
  1281. \item Invoice
  1282. \item AR Transaction
  1283. \item AP Transaction
  1284. \item Packing List
  1285. \item Pick List
  1286. \item Sales Order
  1287. \item Work Order
  1288. \item Purchase Order
  1289. \item Bin List
  1290. \item Statement
  1291. \item Check
  1292. \item Receipt
  1293. \item Quotation
  1294. \item RFQ
  1295. \item Time Card
  1296. \end{itemize}
  1297. \LaTeX\ templates allow one to generate PDF and postscript documents and print
  1298. directly to a postscript-enabled printer or print software (like CUPS).
  1299. \LaTeX\ templates can be edited using a standard text editor (like vim or emacs),
  1300. or using a synchronous \LaTeX\ implementation such as LyX.
  1301. \subsubsection{What is \LaTeX\ ?}
  1302. \LaTeX\ (pronounced LAY-tech) is an extension on the \TeX\ typesetting system. It
  1303. largely consists of a set of macros that allow one to focus on the structure of
  1304. the document while letting the \TeX\ engine do the heavy lifting in terms of
  1305. determining the optimal formatting for the page. \LaTeX\ is used in a large
  1306. number of academic journals (including those of the American Mathematics
  1307. Association). It is available at \url{http://www.tug.org}.
  1308. Like HTML, \LaTeX\ uses plain text documents to store the formatting information
  1309. and then when the document is rendered, attempts to fit it onto a page. \LaTeX\
  1310. supports the concept of stylesheets, allowing one to separate content from
  1311. format, and this feature is used in many higher-end applications, like journal
  1312. publication.
  1313. Unlike HTML, \LaTeX\ is a complete though simple programming language that allows
  1314. one to redefine internals of the system for formatting purposes.
  1315. This document is written in \LaTeX.
  1316. \subsubsection{Using LyX to Edit \LaTeX\ Templates}
  1317. LyX is a synchronous \LaTeX\ editor that runs on Windows, UNIX/Linux, and
  1318. Mac OS X. It requires an installed \LaTeX-2e implementation and can be obtained
  1319. at \url{http://www.lyx.org}. Like the most common \LaTeX\ implementations, it is
  1320. open source.
  1321. In \LaTeX, the \% sign is used to begin a comment. Therefore in order to edit
  1322. the documents effectively, you must convert the \% signs into another character
  1323. combination, such as @@@. This can be done with a sed script such as:\\
  1324. sed -e "s$\vert$\%$\vert$@@@$\vert$ig" template.tex \textgreater\
  1325. template-edit.tex \\
  1326. Then when you are done:\\
  1327. sed -e "$\vert$@@@$\vert$\%$\vert$ig" template-edit.tex \textgreater\
  1328. template.tex
  1329. One can edit the template-edit.tex without worrying about LyX disregarding lines
  1330. when it encounters a \%.
  1331. \subsection{Customizing Logos}
  1332. \LaTeX\ requires different formats of logos depending on whether the document is
  1333. going to be generated as a PDF or as postscript. Postscript requires an
  1334. embedded postscript graphic, while PDF requires any type of graphic other than
  1335. embedded postscript. Usually one uses a PNG's for PDF's, though GIF's could be
  1336. used as well. The logo for a \LaTeX\ document resides in the users directory.
  1337. HTML documents can have logos in many different formats. PNG's are generally
  1338. preferred for printing reasons. The image can be stored anywhere and merely
  1339. referenced in the HTML.
  1340. Note: Always test the an invoice with an image on it to ensure that the rest of
  1341. the page format is not thrown off by it.
  1342. \subsection{How are They Stored in the Filesystem?}
  1343. The template directory ("templates" in the root Ledger-SMB install directory)
  1344. contains all the root templates used by Ledger-SMB. These follow a naming
  1345. convention of COAType-templatename.ext where COAType is the type of dataset that
  1346. was created when the user was created, templatename is the name of the template,
  1347. and ext is either txt, html, or tex (for text, html, and \LaTeX\ respectively).
  1348. Inside this directory are one or more subdirectories where the relevant
  1349. templates have been copied as default language templates for the user. Many
  1350. users can use the same user directory (which bears the name of the Ledger-SMB
  1351. username). Within this directory are more subdirectories for translated
  1352. templates, one for each language created.
  1353. \subsection{Upgrade Issues}
  1354. When Ledger-SMB is upgraded, the templates are not replaced. This is designed
  1355. to prevent the upgrade script from overwriting changes made during the course of
  1356. customizing the templates.
  1357. Occasionally, however, the data model changes in a way which can cause the
  1358. templates to stop printing certain information. When information that was
  1359. showing up before an upgrade stops showing up, one can either upgrade the
  1360. templates by copying the source template over the existing one, or one can edit
  1361. the template to make the change.
  1362. \clearpage
  1363. \part{Technical Overview}
  1364. \section{Basic Architecture}
  1365. Ledger-SMB is a web-based Perl program that interfaces with PostgreSQL using the
  1366. relevant Perl modules. The code is well partitioned, and the main operation
  1367. modules are written in an object oriented way.
  1368. \subsection{The Software Stack}
  1369. \begin{figure}[hbtp]
  1370. \label{fig-sl-stack}
  1371. \input{sl-stack.latex}
  1372. \caption{The Ledger-SMB software stack in a Typical Implementation}
  1373. \end{figure}
  1374. Ledger-SMB runs in a Perl interpreter. I do not currently know if it is
  1375. possible to run it with Perl2C or other language converters to run in other
  1376. environments. However, except for high-capacity environments, Perl is a good
  1377. language choice for this sort of program.
  1378. Ledger-SMB used to support DB2 and Oracle as well as PostgreSQL. However,
  1379. currently some of the functionality is implemented using PostgreSQL user-defined
  1380. functions. These would need to be ported to other database managers in order to
  1381. make the software work on these. It should not be too hard, but the fact that
  1382. it has not been done yet may mean that there is no real demand for running the
  1383. software under other RDBMS's.
  1384. One can substitute other web servers for Apache. Normally Ledger-SMB is run as
  1385. a CGI program but it may be possible to run it in the web server process (note
  1386. that this may not be entirely thread-safe).
  1387. The operating system can be any that supports a web server and Perl (since
  1388. PostgreSQL need not run on the same system). However, there are a few issues
  1389. running Ledger-SMB on Windows (most notably in trying to get Postscript
  1390. documents to print properly).
  1391. On the client side, any web-browser will work. Currently, the layout is
  1392. different for Lynx (which doesn't support frames), and the layout is not really
  1393. useful under eLinks (the replacement for Lynx which does support frames). Some
  1394. functionality requires Javascript to work properly, though the application is
  1395. usable without these features.
  1396. \subsection{Capacity Planning}
  1397. Some companies may ask how scalable Ledger-SMB is. In general, it is assumed
  1398. that few companies are going to have a need for a high-concurrency accounting
  1399. system. However, with all the features available in Ledger-SMB, the staff that
  1400. may have access to some of the application may be high enough to make the
  1401. question worthwhile.
  1402. This question also becomes more important when companies might look at
  1403. integrating Ledger-SMB with a CRM solution, online store, or other environment.
  1404. This section looks at a number of the known issues and their solutions.
  1405. \subsubsection{Scalability Strategies}
  1406. As Ledger-SMB is a fairly standard web-based application. However, sometimes
  1407. during upgrades, the database schema changes. In these cases, it becomes
  1408. impossible to use different versions of the software against the same database
  1409. version safely. Ledger-SMB checks the version of the database and if the
  1410. version is higher than the version of the software that is running, will refuse
  1411. to run.
  1412. Therefore although one strategy might be to run several front-end web servers
  1413. with Ledger-SMB, in reality this can be a bit of a problem. One solution is to
  1414. take half of the front-end servers off-line while doing the initial upgrade, and
  1415. then take the other offline to upgrade when these are brought back online.
  1416. The database manager is less scalable in the sense that one cannot just add more
  1417. database servers and expect to carry on as normal. However, aside from the
  1418. known issues listed below, there are few performance issues with it. If
  1419. complex reports are necessary, these can be moved to a replica database
  1420. (perhaps using Slony-I).
  1421. If this solution is insufficient for database scalability, one might be able to
  1422. move staff who do not need real-time access to new entries onto a
  1423. PG-Pool/Slony-I cluster where new transactions are entered on the master and
  1424. other data is looked up on the replica. In certain circumstances, one can also
  1425. offload a number of other queries from the master database in order to minimize
  1426. the load. Ledger-SMB has very few issues in the scalability of the application.
  1427. \subsubsection{Database Maintenance}
  1428. PostgreSQL uses a technique called Multi-version Concurrency Control (MVCC) to
  1429. provide a snapshot of the database at the beginning of a statement or
  1430. transaction (depending on the transaction isolation level). When a row is
  1431. updated, PostgreSQL leaves the old row in the database, and inserts a new
  1432. version of that row into the table. Over time, unless those old rows are
  1433. removed, performance can degrade as PostgreSQL has to search through all the old
  1434. versions of the row in order to determine which one ought to be the current one.
  1435. Due to the way the SQL statements are executed in Ledger-SMB, most inserts will
  1436. also create a dead row.
  1437. A second problem occurs in that each transaction is given a transaction id.
  1438. These id's are numbered using 32-bit integers. If the transaction id wraps
  1439. around (prior to 8.1), data from transactions that appear (due to the
  1440. wraparound) to be in the
  1441. future suddenly becomes inaccessible. This problem was corrected in PostgreSQL
  1442. 8.1, where the database will refuse to accept new transactions if the
  1443. transaction ID gets too close to a wraparound. So while the problem is not as
  1444. serious in 8.1, the application merely becomes inaccessible rather than
  1445. displaying apparent data loss. Wraparound would occur after
  1446. about a billion transactions between all databases running on that instance of
  1447. PostgreSQL.
  1448. Prior to 8.1, the main way to prevent both these problems was to run a periodic
  1449. vacuumdb command from cron (UNIX/Linux) or the task scheduler (Windows). In
  1450. 8.1 or later, autovacuum capabilities are part of the back-end and can be
  1451. configured with the database manager. See the PostgreSQL documentation for
  1452. treatment of these subjects.
  1453. In general, if performance appears to be slowly degrading, one should try to run
  1454. vacuumdb -z from the shell in order to attempt to reclaim space and
  1455. provide the planner with accurate information about the size and composition of
  1456. the tables. If this fails, then one can go to other methods of determining the
  1457. bottleneck and what to do about it.
  1458. \subsubsection{Known issues}
  1459. The PostgreSQL planner assumes a minimum page size of ten pages for a physically
  1460. empty table. The reasoning behind this choice is that a table could grow
  1461. rapidly and one could end up with bad database performance if the planner
  1462. assumes a very small table.
  1463. However, if you end up with joins between a very large table with millions of
  1464. rows and a physically empty table, one can end up with a very bad query plan.
  1465. In this case, the planner will choose a nested loop join and run through this
  1466. loop for every row in the large table. As a result, performance will suddenly
  1467. drop once the large table becomes too large to effectively do index scans of the
  1468. join criteria on both tables. This problem most often occurs when people have
  1469. no warehouses, departments, or projects defined and are running systems with a
  1470. large number of transactions (such as a point of sale environment).
  1471. Last time I saw this problem, the server would wait for thirty seconds to
  1472. display a new point of sale screen while the server CPU activity would spike to
  1473. 100\%.
  1474. One solution is to define one warehouse, department, and project, and then run
  1475. vacuumdb -z from the shell to force the planner to acknowledge these tables as
  1476. single-row tables. The other option is to go into the source code and edit the
  1477. database queries to omit unused tables.
  1478. \section{Customization Possibilities}
  1479. Ledger-SMB is designed to be customized relatively easily and rapidly. In
  1480. general, the source code is well written and compartmentalized. This section
  1481. covers the basic possibilities involving customization.
  1482. \subsection{Brief Guide to the Source Code}
  1483. Ledger-SMB is an application with over 34000 lines of code. While it is not
  1484. possible to cover the entire application here, a brief overview of the source
  1485. code is in order.
  1486. In the root of the install directory, one will find a setup.pl program, a number
  1487. of other .pl programs, and a number of directories. The setup.pl program is
  1488. used to update or install Ledger-SMB. The other .pl programs provide a basic
  1489. set of services for the framework (including authentication) and then pass the
  1490. work on to the data entry screen file in the bin directory.
  1491. The bin directory contains another directory for each terminal type. The main
  1492. two offered are lynx and mozilla. Lynx would be used for web browsers that do
  1493. not support frames and is ideal for a text-mode VGA terminal. Mozilla is the
  1494. terminal type used for most other web browsers. The perl files within these
  1495. directories provides the user interface of the software.
  1496. The css directory in the root install directory contains CSS documents to
  1497. provide various stylesheets one can select for changing various aspects of the
  1498. look and feel of the application.
  1499. The locale directory contains translation files that Ledger-SMB uses to
  1500. translate between different languages. One could add translations to these
  1501. files if necessary.
  1502. The SL directory is where the Perl modules reside that provide the core business
  1503. logic in Ledger-SMB. These modules provide functionality such as form handling,
  1504. email capabilities, and access to the database through its at least partially
  1505. object oriented API.
  1506. Finally, the sql directory provides the database schemas and upgrade scripts.
  1507. \subsection{Data Entry Screens}
  1508. One can customize the data entry screens to optimize work flow, display
  1509. additional information, etc.
  1510. \subsubsection{Examples}
  1511. We set up hot keys for payment lines, automatically focused
  1512. the keyboard on the last partnumber field, removed separate print and post
  1513. buttons to ensure that invoices were always printed and posted together, and
  1514. removed the ability to print to the screen, and even the ability to scan items
  1515. in when an invoice was received (using a portable data terminal) and import this
  1516. data into Ledger-SMB. Finally we added the ability to reconcile the till online
  1517. in a paperless manner.
  1518. For another customer, we added the ability to print AR invoices in plain text
  1519. format and added templates (based on the POS sales template) to do this.
  1520. \subsection{Extensions}
  1521. One can add functionality to the Perl modules in the SL directory and often add
  1522. missing functions easily.
  1523. \subsubsection{Examples}
  1524. For one customer, we added a module to take data from a portable data terminal
  1525. collected when inventory items were taken and use that to add shrinkage and loss
  1526. adjustments. We also extended the parts model to add a check id flag (for
  1527. alcohol sales) and added this flag to the user interface.
  1528. For another customer, we added a complex invoice/packing slip tracking system
  1529. that allowed one to track all the printed documents associated with an order or
  1530. invoice.
  1531. \subsection{Templates}
  1532. As noted before templates can be modified or extended, though sometimes this
  1533. involves extending the user interface scripts. Most templates are easy enough
  1534. to modify.
  1535. \subsubsection{Examples}
  1536. For one customer we added text-only invoices for AR and AP
  1537. transactions/Invoices and an ability to use Javascript in them to automatically
  1538. print them on load.
  1539. \subsection{Reports}
  1540. The fact that all the data is available within the database manager is a huge
  1541. advantage of Ledger-SMB over Quickbooks and the like. The rapid development of
  1542. reports allows for one to easily develop reports of any sort within Ledger-SMB.
  1543. \subsubsection{Examples}
  1544. For one customer, we developed a report of parts sold and received during
  1545. arbitrary time frames. The report allows one to go back and look up the invoices
  1546. involved.
  1547. \section{Integration Possibilities}
  1548. An open database system and programming API allows for many types of
  1549. integration. There are some challenges, but in the end, one can integrate a
  1550. large number of tools.
  1551. \subsection{Reporting Tools}
  1552. Any reporting tool which can access the PostgreSQL database can be used with
  1553. Ledger-SMB for custom reporting. These can include programs like Microsoft
  1554. Access and Excel (using the ODBC drivers), PgAccess (A PostgreSQL front-end
  1555. written in TCL/Tk with a similar feel to Access), Rekall, Crystal Reports,
  1556. OpenOffice and more.
  1557. \subsubsection{Examples}
  1558. We have created spreadsheets of the summaries of activity by day and used the
  1559. ODBC driver to import these into Excel. Excel can also read HTML tables, so one
  1560. can use PostgreSQL to create an HTML table of the result and save it with a .xls
  1561. extension so that Windows opens it with Excel. These could then be served via
  1562. the same web server that serves Ledger-SMB.
  1563. \subsection{Line of Business Tools on PostgreSQL}
  1564. Various line of business tools have been written using PostgreSQL in large part
  1565. due to the fact that it is far more mature than MySQL in areas relating to data
  1566. integrity enforcement, transactional processing, and the like. These tools can
  1567. be integrated with Ledger-SMB in various ways. One could integrate this program
  1568. with the HERMES CRM framework, for example.
  1569. \subsubsection{Known Issues}
  1570. Ledger-SMB uses a single 'id' sequence across many tables. At the same time it
  1571. is expected that these tables do not have identical id values in their records
  1572. as they are used as a sort of pseudo-foreign key by the acc\_trans table which
  1573. stores the financial transaction information.
  1574. If the integration solution does not keep this in mind, it is possible to create
  1575. a situation where the account transactions are ambiguously associated with a
  1576. number of different types of financial transactions. This would lead to a large
  1577. number of problems.
  1578. \subsubsection{Strategies}
  1579. In general, it is advisable to run all such programs that benefit from
  1580. integration in the same database but under different schemas. This allows
  1581. PostgreSQL to become the main method of synchronizing the data in real time.
  1582. However, sometimes this can require dumping the database recreating the tables
  1583. etc. in a different schema and importing the data back into Ledger-SMB.
  1584. One possibility for this sort of integration is to use database triggers to
  1585. replicate the data between the applications in real-time. This can avoid the
  1586. main issue of duplicate id's. One issue that can occur however relates to
  1587. updates. If one updates a customer record in HERMES, for example, how do we
  1588. know which record to update in Ledger-SMB? There are solutions to this problem
  1589. but they do require some forethought.
  1590. A second possibility is to use views to allow one application to present the
  1591. data from the other as its own. This can be cleaner regarding update issues,
  1592. but it can also pose issues regarding duplicate id fields.
  1593. \subsubsection{Examples}
  1594. Others have integrated L'ane POS and Ledger-SMB in order to make it work better
  1595. with touch screen devices. Still others have successfully integrated Ledger-SMB
  1596. and Interchange. In both cases, I believe that triggers were used to perform
  1597. the actual integration.
  1598. \subsection{Line of Business Tools on other RDBMS's}
  1599. Often there are requests to integrate Ledger-SMB with applications like
  1600. SugarCRM, OSCommerce, and other applications running on MySQL or other database
  1601. managers. This is a far more complex field and it requires a great deal more
  1602. effort than integrating applications within the same database.
  1603. \subsubsection{Strategies}
  1604. Ordinarily real-time integration is not always possible. MySQL does not support
  1605. the SQL extension SQL/MED (Management of External Data) so it is not possible to
  1606. replicate the data in real-time. Therefore one generally resorts to integrating
  1607. the system using time-based updates. Replication may be somewhat error-prone
  1608. unless the database manager supports triggers (first added to MySQL in 5.0) or
  1609. other mechanisms to ensure that
  1610. all changed records can be detected and replicated. In general, it is usually
  1611. advisable to add two fields to the record-- one that shows the insert time and
  1612. one that shows the last update.
  1613. Additionally, I would suggest adding additional information to the Ledger-SMB
  1614. tables so that you can track the source record from the other application in the
  1615. case of an update.
  1616. In general, one must write replication scripts that dump the information from
  1617. one and add it to the other. This must go both ways.
  1618. \subsubsection{Integration Products and Open Source Projects}
  1619. While many people write Perl scripts to accomplish the replication, an open
  1620. source project exists called DBI-Link. This package requires PL/Perl to be
  1621. installed in PostgreSQL, and it allows PostgreSQL to present any data accessible
  1622. via Perl's DBI framework as PostgreSQL tables. DBI-Link can be used to allow
  1623. PostgreSQL to pull the data from MySQL or other database managers.
  1624. DBI-Link can simplify the replication process by reducing the operation to a set
  1625. of SQL queries.
  1626. \section{Customization Guide}
  1627. This section is meant to provide a programmer with an understanding of the
  1628. technologies enough information to get up to speed quickly and minimize the time
  1629. spent familiarizing themselves with the software. Topics in this section are
  1630. listed in order of complexity. As it appeals to a narrower audience than
  1631. previous discussions of this topic, it is listed separately.
  1632. \subsection{General Information}
  1633. The main framework scripts (the ar.pl, ap.pl, etc. scripts found in the root of
  1634. the installation directory) handle such basic features as instantiating the form
  1635. object, ensuring that the user is logged in, and the like. They then pass the
  1636. execution off to the user interface script (usually in the bin/mozilla
  1637. directory).
  1638. Ledger-SMB in many ways may look sort of object oriented in its design, but in
  1639. reality, it is far more data-driven than object oriented. The Form object is
  1640. used largely as a global symbol table and also as a collection of fundamental
  1641. routines for things like database access. It also breaks down the query string
  1642. into sets of variables which are stored in its attribute hash table.
  1643. In essence one can and often will store all sorts of data structures in the
  1644. primary Form object. These can include almost anything. It is not uncommon to
  1645. see lists of hashes stored as attributes to a Form object.
  1646. \subsection{Customizing Templates}
  1647. Templates are used to generate printed checks, invoices, receipts, and more in
  1648. Ledger-SMB. Often the format of these items does not fit a specific set of
  1649. requirements and needs to be changed. This document will not include LaTeX or
  1650. HTML instruction, but will include a general introduction to editing templates.
  1651. Also, this is not intended to function as a complete reference.
  1652. Template instructions are contained in tags \textless\% and \%\textgreater.
  1653. The actual parsing is done by the parse\_template function in SL/Form.pm.
  1654. \subsubsection{Page Breaks in \LaTeX}
  1655. The first tag one will see with \LaTeX\ templates is \textless\%pagebreak num1
  1656. num2 num3\%\textgreater
  1657. \begin{itemize}
  1658. \item num1 represents characters per line
  1659. \item num2 represents lines on first page
  1660. \item num3 represents lines on second page.
  1661. \end{itemize}
  1662. The pagebreak block is terminated by \textless\%end pagebreak\%\textgreater
  1663. Any text within the pagebreak block is ignored by the template.
  1664. \subsubsection{Conditionals}
  1665. \begin{itemize}
  1666. \item \textless\%if not varname\%\textgreater tells the parser to ignore
  1667. include the next block only if varname was posted by the submitting form
  1668. (or set via the form hash elsewhere in the scripts). The block ends with
  1669. \textless\%end varname\%\textgreater
  1670. \item \textless\%if varname\%\textgreater tells the parser to ignore the
  1671. block if varname was not posted in the submitting form (or set via the form
  1672. hash elsewhere in the scripts). The block ends with \textless\%end
  1673. varname\%\textgreater
  1674. \item Lines conditionals are otherwise ignored by the parser.
  1675. \item Conditionals cannot be nested, but IF's can be nested inside loops as of
  1676. 2.6.4
  1677. \end{itemize}
  1678. \subsubsection{Loops}
  1679. \textless\%foreach varname\%\textgreater is used to iterate through a list of
  1680. vars set by the user interface system (usually one of the files under
  1681. bin/mozilla (or otherwise). The block is repeated for each varname in a list.
  1682. Block ends with \textless\%end varname\%\textgreater
  1683. \subsubsection{File Inclusion}
  1684. \begin{itemize}
  1685. \item Files may be included with the syntax \textless\%include
  1686. template\_name\%\textgreater where templatename is the name of the
  1687. template within the current template directory (usually
  1688. templates/\$username/)
  1689. \item Cannot be used with conditionals
  1690. \item Filenames cannot use slashes (/) or .. due to directory transversal
  1691. considerations.
  1692. \item Files can force other files to be included, but the same file cannot be
  1693. included more than once.
  1694. \end{itemize}
  1695. \subsubsection{Cross-referencing and multiple passes of \LaTeX}
  1696. In \LaTeX\ cross-references require two passes with latex to resolve. This is
  1697. because the type is set page by page and the program really doesn't know on
  1698. which page a given reference will fall. This becomes an even larger issue where
  1699. floats are concerned as they can move between pages for formatting reasons.
  1700. In rare cases, cross-references may point at incorrect pages even with two
  1701. passes (if the inclusion of the cross-reference data moves the object to another
  1702. page). In this case you will need to use three passes of \LaTeX\ in order to
  1703. have accurate references.
  1704. Ledger-SMB as of the time of this writing (2.6.8) only makes one pass at the
  1705. \LaTeX\ file. To force it to make more than one pass, open Form.pm with your
  1706. favorite text editor. Look for the line:
  1707. system("latex --interaction=nonstopmode
  1708. \$self-\textgreater$\lbrace$ tmpfile$\rbrace$\
  1709. \textgreater\ \$ self-\textgreater$\lbrace$ tmpfile$\rbrace$ .err");
  1710. Duplicate this line for two passes, or add two copies if you need three passes.
  1711. \subsubsection{Variable Substitution}
  1712. The following format is used for variable substitution:
  1713. \begin{itemize}
  1714. \item \textless\%varname options\%\textgreater Options are one or more
  1715. (whitespace separated) of:
  1716. \begin{itemize}
  1717. \item align=left/right/center
  1718. \item width=chars where chars is the width in characters before wrapping
  1719. \item offset=chars where chars is the number of spaces to (depending on
  1720. alignment).
  1721. \end{itemize}
  1722. \end{itemize}
  1723. \subsection{Customizing Forms}
  1724. Data entry forms and other user interface pieces are in the bin directory. In
  1725. Ledger-SMB 2.4 and below, most files were symlinked to the equivalent file in
  1726. the bin/mozilla directory. In 2.6 and later, symlinks are not generally used.
  1727. Each module is identified with a two letter combination: ar, ap, cp, etc.
  1728. These combinations are generally explained in the comment headers on each file.
  1729. Execution in these files begins with the function designated by the
  1730. form->$\lbrace$action$\rbrace$ variable. This variable is usually derived from
  1731. configuration parameters in the menu.ini or the name of the button that was
  1732. clicked on to submit the previous page. Due to localization requirements, the
  1733. following process is used to determine the appropriate action taken:
  1734. The \$locale-\textgreater getsub routine is called. This routine checks the
  1735. locale package to determine if the value needs to be translated back into an
  1736. appropriate SL function. If not, the variable is lower-cased, and all spaces
  1737. are converted into underscores.
  1738. In general there is no substitute for reading the code to understand how this
  1739. can be customized and how one might go about doing this.
  1740. \subsection{Customizing Modules}
  1741. The Perl Modules (.pm files) in the SL directory contain the main business logic
  1742. of the application including all database access. Most of these modules are
  1743. fairly easy to follow, and there is an effort to document all API's at the wiki
  1744. (\url{http://www.metatrontech.com/ledger-smb-wiki?APIReference}).
  1745. Many of these modules have a fair bit of dormant code in them which was written
  1746. for forthcoming features, such as payroll and bills of materials.
  1747. One can add a new module through the normal means and connect it to other
  1748. existing modules.
  1749. \subsubsection{Database Access}
  1750. The \$form object provides two methods for accessing the database. The
  1751. \$form-\textgreater dbconnect(\%myconfig) method commits each individual
  1752. statement as its own transaction. The \$form-\textgreater
  1753. dbconnect\_noauto(\%myconfig) method requires a manual commit. Both these
  1754. functions are thin wrappers around the standard Perl DBI operations.
  1755. \subsection{Examples}
  1756. \subsubsection{Adding a New Report for Sales Data}
  1757. One of our customers required a report of inventory activity during an arbitrary
  1758. time period. So we added this customization. This report required merely
  1759. adding a few functions to the rp.pl user interface script (bin/mozilla/rp.pl)
  1760. and slightly altering a few more.
  1761. However, as they eventually wanted to pull up invoices (AP and AR) containing
  1762. those part numbers, we also had to customize the AA.pm module to accept this
  1763. sort of filtering.
  1764. The patch is available at
  1765. \url{http://www.metatrontech.com/downloads/sl-inv\_report-2.6.7.diff} and was
  1766. built against Ledger-SMB 2.6.7.
  1767. \subsubsection{Truncating Number of Invoices on a Check Stub}
  1768. One of our customers required an ability to truncate the list of invoices
  1769. printed on a stub so that an additional report could be printed as an
  1770. attachment. This patch required truncating the list of invoices in the
  1771. bin/mozilla/cp.pl file, and slightly patching the ledger-smb.conf to allow for
  1772. the number of listed invoices to be a runtime parameter. Finally a very small
  1773. modification was made to the template.
  1774. The patch is available at
  1775. \url{http://www.metatrontech.com/downloads/sl-check-max-2.6.7.diff}
  1776. \subsubsection{Adding the a Check ID flag for Alcohol Purchases}
  1777. One of our customers is a retail store that sells alcoholic beverages. As the
  1778. law requires them to ask customers purchasing these beverages for ID, they
  1779. needed a reminder set to the screen when an alcoholic beverage was sold.
  1780. To make this change, we added a field to the parts table of the database, had to
  1781. change a few aspects of the IC.pm to handle inserting and updating this field.
  1782. Then we modified the ps.pl to display a red banner on invoices which had
  1783. alcoholic beverages associated with them.
  1784. This patch is part of SL-POS which can be downloaded at
  1785. \url{http://www.metatrontech.com/downloads/SL-POS-0.5.0.tar.gz} (note: this
  1786. patch has not been ported to Ledger-SMB 2.6.x yet).
  1787. \clearpage
  1788. \part{Appendix}
  1789. \appendix
  1790. \section{Where to Go for More Information}
  1791. There are a couple of relevant sources of information on Ledger-SMB in
  1792. particular.
  1793. \begin{itemize}
  1794. \item The latest version of this document will always be advertised at
  1795. \url{http://www.metatrontech.com/projects/}.
  1796. \item We also maintain a community wiki with more information including
  1797. programming, customization, and links to other sites. The wiki can be found at
  1798. \url{http://www.metatrontech.com/ledger-smb-wiki}
  1799. \end{itemize}
  1800. In addition, it is generally recommended that the main bookkeeper of a company
  1801. using Ledger-SMB work through at least one accounting textbook. Which textbook
  1802. is not as important as the fact that a textbook is used however.
  1803. \section{Quick Tips}
  1804. \subsection{Understanding Shipping Addresses and Carriers}
  1805. Each customer can have a default shipping address. This address is displayed
  1806. prominantly in the add new customer screen. To change the shipping address for
  1807. a single order, one can use the ship to button at the bottom of the quote,
  1808. order, or invoice screen.
  1809. The carrier can be noted in the Ship Via field. However, this is a freeform
  1810. field and is largely used as commentary (or instructions for the shipping crew).
  1811. \subsection{Handling bad debts}
  1812. In the event that a customer's check bounces or a collection requirement is
  1813. made, one can flag the customer's account by setting the credit limit to a
  1814. negative number.
  1815. If a debt needs to be written off, one can either use the allowance method (by
  1816. writing it against the contra asset account of "Allowance for Bad Debts" or
  1817. using the direct writeoff method where it is posted as an expense.
  1818. \section{Step by Steps for Vertical Markets}
  1819. \subsection{Common Installation Errors}
  1820. \begin{itemize}
  1821. \item Ledger-SMB is generally best installed in its own directory outside of the
  1822. wwwroot directory. While it is possible to install it inside the wwwroot
  1823. directory, the instructions and the faq don't cover the common problems here.
  1824. \item When the chart of accounts (COA) is altered such that it is no longer set
  1825. up with appropriate items, you can make it impossible to define goods and
  1826. services properly. In general, until you are familiar with the software, it is
  1827. best to rename and add accounts rather than deleting them.
  1828. \end{itemize}
  1829. \subsection{Retail With Light Manufacturing}
  1830. For purposes of this example we will use a business that assembles computers and
  1831. sells them on a retail store.
  1832. \begin{enumerate}
  1833. \item Install Ledger-SMB
  1834. \item Set preferences, and customize chart of accounts
  1835. \begin{enumerate}
  1836. \item Before customizing the COA it is often worth consulting an accountant.
  1837. \end{enumerate}
  1838. \item Define Goods, Labor, and Services as raw parts ordered from the vendors.
  1839. \begin{itemize}
  1840. \item These are located under the goods and services menu node.
  1841. \end{itemize}
  1842. \item Define assemblies
  1843. \begin{itemize}
  1844. \item These are also located under goods and services.
  1845. \item Component goods and services must be defined prior to creating assembly
  1846. \end{itemize}
  1847. \item Enter an AP Invoice to populate inventory with proper raw materials.
  1848. \begin{itemize}
  1849. \item One must generally add a generic vendor first. The vendor is added
  1850. under AP-\textgreater Vendors-\textgreater Add Vendor.
  1851. \end{itemize}
  1852. \item To pay an AP invoice like a check, go to cash->payment. Fill out
  1853. approrpiate fields and click print.
  1854. \begin{itemize}
  1855. \item Note that one should select an invoice and enter in the payment amount
  1856. in the appropriate line of the invoice list. If you add amounts to the
  1857. master amount list, you will find that they are added to the amount paid
  1858. on the invoice as a prepayment.
  1859. \item The source field is the check number.
  1860. \end{itemize}
  1861. \item Stock assemblies
  1862. \item One can use AR Invoices or the POS interface to sell goods and services.
  1863. \begin{itemize}
  1864. \item Sales Invoice
  1865. \begin{itemize}
  1866. \item Can be generated from orders or quotations
  1867. \item Cannot include labor/overhead except as part of an assembly
  1868. \item One can make the mistake of printing the invoice and forgetting to
  1869. post it. In this event, the invoice does not officially exist in the
  1870. accounting system.
  1871. \item For new customers, you must add the customer first (under
  1872. AR-\textgreater Customers-\textgreater Add Customer.
  1873. \end{itemize}
  1874. \item POS Interface
  1875. \begin{itemize}
  1876. \item Cannot include labor/overhead except as part of an assembly
  1877. \item Printing without posting is often even easier in the POS because of
  1878. the rapid workflow. Yet it is just as severe a problem.
  1879. \end{itemize}
  1880. \item Ecommerce and Mail Order Operations
  1881. \begin{itemize}
  1882. \item See the shipping workflow documentation above.
  1883. \end{itemize}
  1884. \item Customers are set up by going to AR-\textgreater Customers-\textgreater
  1885. Add Customer (or the
  1886. equivalent localized translation). The appropriate fields are filled
  1887. out and the buttons are used at the bottom to save the record and
  1888. optionally use it to create an invoice, etc.
  1889. \begin{itemize}
  1890. \item Saving a customer returns to the customer screen. After the
  1891. appropriate invoice, transaction, etc. is entered and posted, Ledger-SMB
  1892. will return to the add customer screen.
  1893. \end{itemize}
  1894. \end{itemize}
  1895. \item One can use the requirements report to help determine what parts need to
  1896. be ordered though one cannot generate PO's directly from this report. Note that
  1897. prior to 2.6.8 sales orders for assemblies are not properly tracked regarding.
  1898. \end{enumerate}
  1899. Note, the needs of Ledger-SMB are mostly useful for light manufacturing
  1900. operations (assembling computers, for example). More manufacturing capabilities
  1901. are expected to be released in the next version.
  1902. A custom assembly is a bit difficult to make. One must add the assembly prior
  1903. to invoice (this is not true of goods and services). If the assembly is based
  1904. on a different assembly but may cost more (due to non-standard parts) you can
  1905. load the old assembly using Goods and Services-\textgreater Reports-\textgreater
  1906. Assemblies and then make necessary changes (including to the SKU/Partnumber) and
  1907. save it as new.
  1908. Then one can add it to the invoice.
  1909. \section{Glossary}
  1910. \begin{description}
  1911. \item[BIC] Bank Identifier Code is often the same as the S.W.I.F.T. code. This
  1912. is a code for the bank a customer uses for automated money transfers.
  1913. \item[COGS] is Cost of Goods Sold. When an item is sold, then the expense of
  1914. its purchase is accrued as attached to the income of the sale. It is tracked as
  1915. COGS.
  1916. \item[Credit]: A logical transactional unit in double entry accounting. It is
  1917. the opposite of a debit. Credits affect different account types as
  1918. follows:
  1919. \begin{description}
  1920. \item[Equity]: Credits are added to the account when money is invested in the
  1921. business.
  1922. \item[Asset]: Credits are added when money is deducted from an asset account.
  1923. \item[Liability]: Credits are added when money is owed to the business
  1924. account.
  1925. \item[Income]: Credits are added when income is earned.
  1926. \item[Expense]: Credits are used to apply adjustments at the end of accounting
  1927. periods to indicate that not all the expense for an AP transaction has
  1928. been fully accrued.
  1929. \end{description}
  1930. \item[Debit]: A logical transactional unit in double entry accounting systems.
  1931. It is the opposite of a credit. Debits affect different account types as
  1932. follows:
  1933. \begin{description}
  1934. \item[Equity]: Debits are added when money is paid to business owners.
  1935. \item[Asset]: Debits are added when money is added to an account.
  1936. \item[Liability]: Debits are added when money that is owed is paid off.
  1937. \item[Income]: Debits are used to temporarily adjust income to defer unearned
  1938. income to the next accounting period.
  1939. \item[Expense]: Debits are added as expenses are incurred.
  1940. \end{description}
  1941. \item[IBAN] International Bank Account Number is related to the BIC and is used
  1942. for cross-border automated money transfers.
  1943. \item[List Price] is the recommended retail price.
  1944. \item[Markup] is the percentage increase that is applied to the last cost to get the sell price.
  1945. \item[ROP] Re-order point. Items with fewer in stock than this will show up on
  1946. short reports.
  1947. \item[Sell Price] is the price at which the item is sold.
  1948. \item[Source Document]: a paper document that can be used as evidence that a
  1949. transaction occurred. Source documents can include canceled checks, receipts,
  1950. credit card statements and the like.
  1951. \item[Terms] is the number of days one has to pay the invoice. Most businesses
  1952. abbreviate the terms as Net n where n is the number of days. For example, Net 30
  1953. means the customer has 30 days to pay the net due on an invoice before it is
  1954. late and incurs late fees.
  1955. \end{description}
  1956. \input{fdl.tex}
  1957. \end{document}