summaryrefslogtreecommitdiff
path: root/sql-ledger/templates
diff options
context:
space:
mode:
authorivan <ivan>2004-11-15 10:35:56 +0000
committerivan <ivan>2004-11-15 10:35:56 +0000
commit32306b5f8ffe4ce594409aa6e89626740b225a39 (patch)
tree8dba82e8424ebe8d089b4e0ef579d87db06742a3 /sql-ledger/templates
parent52072fcd26f2faf57923f598c358e7f47c4e2643 (diff)
import sql-ledger 2.4.4SQL_LEDGER
Diffstat (limited to 'sql-ledger/templates')
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-bin_list.html189
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-bin_list.tex147
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-check.tex12
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-invoice.html25
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-invoice.tex30
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-packing_list.tex8
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-pick_list.html153
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-pick_list.tex143
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-purchase_order.html12
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-purchase_order.tex32
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-receipt.tex12
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-request_quotation.html202
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-sales_order.html24
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-sales_order.tex15
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-statement.html12
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-statement.tex69
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-work_order.html177
-rw-r--r--sql-ledger/templates/Brazilian_Portuguese-work_order.tex177
-rw-r--r--sql-ledger/templates/Danish-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Danish-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Danish-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Danish-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Danish-bin_list.html189
-rw-r--r--sql-ledger/templates/Danish-bin_list.tex147
-rw-r--r--sql-ledger/templates/Danish-check.tex12
-rw-r--r--sql-ledger/templates/Danish-invoice.html25
-rw-r--r--sql-ledger/templates/Danish-invoice.tex14
-rw-r--r--sql-ledger/templates/Danish-packing_list.tex2
-rw-r--r--sql-ledger/templates/Danish-pick_list.html153
-rw-r--r--sql-ledger/templates/Danish-pick_list.tex144
-rw-r--r--sql-ledger/templates/Danish-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Danish-purchase_order.html12
-rw-r--r--sql-ledger/templates/Danish-purchase_order.tex14
-rw-r--r--sql-ledger/templates/Danish-receipt.tex12
-rw-r--r--sql-ledger/templates/Danish-request_quotation.html202
-rw-r--r--sql-ledger/templates/Danish-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Danish-sales_order.html24
-rw-r--r--sql-ledger/templates/Danish-sales_order.tex17
-rw-r--r--sql-ledger/templates/Danish-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Danish-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Danish-statement.html12
-rw-r--r--sql-ledger/templates/Danish-statement.tex44
-rw-r--r--sql-ledger/templates/Danish-work_order.html174
-rw-r--r--sql-ledger/templates/Danish-work_order.tex177
-rw-r--r--sql-ledger/templates/Default-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Default-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Default-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Default-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Default-balance_sheet.html18
-rw-r--r--sql-ledger/templates/Default-bin_list.html189
-rw-r--r--sql-ledger/templates/Default-bin_list.tex147
-rw-r--r--sql-ledger/templates/Default-check.tex17
-rw-r--r--sql-ledger/templates/Default-income_statement.html21
-rw-r--r--sql-ledger/templates/Default-invoice.html534
-rw-r--r--sql-ledger/templates/Default-invoice.tex164
-rw-r--r--sql-ledger/templates/Default-packing_list.html281
-rw-r--r--sql-ledger/templates/Default-packing_list.tex143
-rw-r--r--sql-ledger/templates/Default-pick_list.html153
-rw-r--r--sql-ledger/templates/Default-pick_list.tex143
-rw-r--r--sql-ledger/templates/Default-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Default-purchase_order.html156
-rw-r--r--sql-ledger/templates/Default-purchase_order.tex107
-rw-r--r--sql-ledger/templates/Default-receipt.tex14
-rw-r--r--sql-ledger/templates/Default-request_quotation.html202
-rw-r--r--sql-ledger/templates/Default-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Default-sales_order.html389
-rw-r--r--sql-ledger/templates/Default-sales_order.tex182
-rw-r--r--sql-ledger/templates/Default-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Default-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Default-statement.html29
-rw-r--r--sql-ledger/templates/Default-statement.tex121
-rw-r--r--sql-ledger/templates/Default-work_order.html177
-rw-r--r--sql-ledger/templates/Default-work_order.tex177
-rw-r--r--sql-ledger/templates/Dutch-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Dutch-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Dutch-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Dutch-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Dutch-balance_sheet.html18
-rw-r--r--sql-ledger/templates/Dutch-bin_list.html189
-rw-r--r--sql-ledger/templates/Dutch-bin_list.tex147
-rw-r--r--sql-ledger/templates/Dutch-check.tex12
-rw-r--r--sql-ledger/templates/Dutch-income_statement.html24
-rw-r--r--sql-ledger/templates/Dutch-invoice.html25
-rw-r--r--sql-ledger/templates/Dutch-invoice.tex14
-rw-r--r--sql-ledger/templates/Dutch-packing_list.tex2
-rw-r--r--sql-ledger/templates/Dutch-pick_list.html153
-rw-r--r--sql-ledger/templates/Dutch-pick_list.tex144
-rw-r--r--sql-ledger/templates/Dutch-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Dutch-purchase_order.html12
-rw-r--r--sql-ledger/templates/Dutch-purchase_order.tex14
-rw-r--r--sql-ledger/templates/Dutch-receipt.tex12
-rw-r--r--sql-ledger/templates/Dutch-request_quotation.html202
-rw-r--r--sql-ledger/templates/Dutch-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Dutch-sales_order.html24
-rw-r--r--sql-ledger/templates/Dutch-sales_order.tex17
-rw-r--r--sql-ledger/templates/Dutch-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Dutch-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Dutch-statement.html12
-rw-r--r--sql-ledger/templates/Dutch-statement.tex46
-rw-r--r--sql-ledger/templates/Dutch-work_order.html174
-rw-r--r--sql-ledger/templates/Dutch-work_order.tex177
-rw-r--r--sql-ledger/templates/Estonian-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Estonian-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Estonian-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Estonian-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Estonian-bin_list.html189
-rw-r--r--sql-ledger/templates/Estonian-bin_list.tex147
-rw-r--r--sql-ledger/templates/Estonian-check.tex12
-rw-r--r--sql-ledger/templates/Estonian-invoice.html25
-rw-r--r--sql-ledger/templates/Estonian-invoice.tex14
-rw-r--r--sql-ledger/templates/Estonian-packing_list.tex2
-rw-r--r--sql-ledger/templates/Estonian-pick_list.html153
-rw-r--r--sql-ledger/templates/Estonian-pick_list.tex143
-rw-r--r--sql-ledger/templates/Estonian-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Estonian-purchase_order.html12
-rw-r--r--sql-ledger/templates/Estonian-purchase_order.tex14
-rw-r--r--sql-ledger/templates/Estonian-receipt.tex12
-rw-r--r--sql-ledger/templates/Estonian-request_quotation.html202
-rw-r--r--sql-ledger/templates/Estonian-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Estonian-sales_order.html24
-rw-r--r--sql-ledger/templates/Estonian-sales_order.tex15
-rw-r--r--sql-ledger/templates/Estonian-statement.html12
-rw-r--r--sql-ledger/templates/Estonian-statement.tex46
-rw-r--r--sql-ledger/templates/Estonian-work_order.html174
-rw-r--r--sql-ledger/templates/Estonian-work_order.tex177
-rw-r--r--sql-ledger/templates/French-ap_transaction.html229
-rw-r--r--sql-ledger/templates/French-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/French-ar_transaction.html237
-rw-r--r--sql-ledger/templates/French-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/French-bin_list.html189
-rw-r--r--sql-ledger/templates/French-bin_list.tex147
-rw-r--r--sql-ledger/templates/French-check.tex12
-rw-r--r--sql-ledger/templates/French-invoice.html25
-rw-r--r--sql-ledger/templates/French-invoice.tex14
-rw-r--r--sql-ledger/templates/French-packing_list.tex2
-rw-r--r--sql-ledger/templates/French-pick_list.html153
-rw-r--r--sql-ledger/templates/French-pick_list.tex144
-rw-r--r--sql-ledger/templates/French-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/French-purchase_order.html12
-rw-r--r--sql-ledger/templates/French-purchase_order.tex14
-rw-r--r--sql-ledger/templates/French-receipt.tex12
-rw-r--r--sql-ledger/templates/French-request_quotation.html202
-rw-r--r--sql-ledger/templates/French-request_quotation.tex175
-rw-r--r--sql-ledger/templates/French-sales_order.html24
-rw-r--r--sql-ledger/templates/French-sales_order.tex17
-rw-r--r--sql-ledger/templates/French-sales_quotation.html225
-rw-r--r--sql-ledger/templates/French-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/French-statement.html12
-rw-r--r--sql-ledger/templates/French-statement.tex46
-rw-r--r--sql-ledger/templates/French-work_order.html174
-rw-r--r--sql-ledger/templates/French-work_order.tex177
-rw-r--r--sql-ledger/templates/German-ap_transaction.html229
-rw-r--r--sql-ledger/templates/German-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/German-ar_transaction.html237
-rw-r--r--sql-ledger/templates/German-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/German-bin_list.html189
-rw-r--r--sql-ledger/templates/German-bin_list.tex147
-rw-r--r--sql-ledger/templates/German-check.tex12
-rw-r--r--sql-ledger/templates/German-invoice.html25
-rw-r--r--sql-ledger/templates/German-invoice.tex14
-rw-r--r--sql-ledger/templates/German-packing_list.tex2
-rw-r--r--sql-ledger/templates/German-pick_list.html153
-rw-r--r--sql-ledger/templates/German-pick_list.tex144
-rw-r--r--sql-ledger/templates/German-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/German-purchase_order.html12
-rw-r--r--sql-ledger/templates/German-purchase_order.tex14
-rw-r--r--sql-ledger/templates/German-receipt.tex12
-rw-r--r--sql-ledger/templates/German-request_quotation.html202
-rw-r--r--sql-ledger/templates/German-request_quotation.tex175
-rw-r--r--sql-ledger/templates/German-sales_order.html26
-rw-r--r--sql-ledger/templates/German-sales_order.tex19
-rw-r--r--sql-ledger/templates/German-sales_quotation.html225
-rw-r--r--sql-ledger/templates/German-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/German-statement.html12
-rw-r--r--sql-ledger/templates/German-statement.tex46
-rw-r--r--sql-ledger/templates/German-work_order.html174
-rw-r--r--sql-ledger/templates/German-work_order.tex177
-rw-r--r--sql-ledger/templates/Hungarian-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Hungarian-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Hungarian-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Hungarian-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Hungarian-balance_sheet.html100
-rw-r--r--sql-ledger/templates/Hungarian-bin_list.html189
-rw-r--r--sql-ledger/templates/Hungarian-bin_list.tex147
-rw-r--r--sql-ledger/templates/Hungarian-check.tex81
-rw-r--r--sql-ledger/templates/Hungarian-income_statement.html82
-rw-r--r--sql-ledger/templates/Hungarian-invoice.html303
-rw-r--r--sql-ledger/templates/Hungarian-invoice.tex280
-rw-r--r--sql-ledger/templates/Hungarian-packing_list.html148
-rw-r--r--sql-ledger/templates/Hungarian-packing_list.tex122
-rw-r--r--sql-ledger/templates/Hungarian-pick_list.html153
-rw-r--r--sql-ledger/templates/Hungarian-pick_list.tex143
-rw-r--r--sql-ledger/templates/Hungarian-pos_invoice.txt48
-rw-r--r--sql-ledger/templates/Hungarian-purchase_order.html230
-rw-r--r--sql-ledger/templates/Hungarian-purchase_order.tex206
-rw-r--r--sql-ledger/templates/Hungarian-receipt.tex78
-rw-r--r--sql-ledger/templates/Hungarian-request_quotation.html202
-rw-r--r--sql-ledger/templates/Hungarian-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Hungarian-sales_order.html221
-rw-r--r--sql-ledger/templates/Hungarian-sales_order.tex147
-rw-r--r--sql-ledger/templates/Hungarian-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Hungarian-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Hungarian-statement.html125
-rw-r--r--sql-ledger/templates/Hungarian-statement.tex141
-rw-r--r--sql-ledger/templates/Hungarian-work_order.html174
-rw-r--r--sql-ledger/templates/Hungarian-work_order.tex177
-rw-r--r--sql-ledger/templates/Italian-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Italian-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Italian-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Italian-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Italian-balance_sheet.html103
-rw-r--r--sql-ledger/templates/Italian-bin_list.html189
-rw-r--r--sql-ledger/templates/Italian-bin_list.tex147
-rw-r--r--sql-ledger/templates/Italian-check.tex81
-rw-r--r--sql-ledger/templates/Italian-income_statement.html78
-rw-r--r--sql-ledger/templates/Italian-invoice.html209
-rw-r--r--sql-ledger/templates/Italian-invoice.tex236
-rw-r--r--sql-ledger/templates/Italian-packing_list.html126
-rw-r--r--sql-ledger/templates/Italian-packing_list.tex114
-rw-r--r--sql-ledger/templates/Italian-pick_list.html153
-rw-r--r--sql-ledger/templates/Italian-pick_list.tex144
-rw-r--r--sql-ledger/templates/Italian-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Italian-purchase_order.html232
-rw-r--r--sql-ledger/templates/Italian-purchase_order.tex206
-rw-r--r--sql-ledger/templates/Italian-receipt.tex78
-rw-r--r--sql-ledger/templates/Italian-request_quotation.html202
-rw-r--r--sql-ledger/templates/Italian-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Italian-sales_order.html207
-rw-r--r--sql-ledger/templates/Italian-sales_order.tex150
-rw-r--r--sql-ledger/templates/Italian-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Italian-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Italian-statement.html125
-rw-r--r--sql-ledger/templates/Italian-statement.tex141
-rw-r--r--sql-ledger/templates/Italian-work_order.html174
-rw-r--r--sql-ledger/templates/Italian-work_order.tex177
-rw-r--r--sql-ledger/templates/Norwegian-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Norwegian-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Norwegian-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Norwegian-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Norwegian-balance_sheet.html100
-rw-r--r--sql-ledger/templates/Norwegian-bin_list.html189
-rw-r--r--sql-ledger/templates/Norwegian-bin_list.tex147
-rw-r--r--sql-ledger/templates/Norwegian-check.tex81
-rw-r--r--sql-ledger/templates/Norwegian-income_statement.html78
-rw-r--r--sql-ledger/templates/Norwegian-invoice.html226
-rw-r--r--sql-ledger/templates/Norwegian-invoice.tex237
-rw-r--r--sql-ledger/templates/Norwegian-packing_list.html142
-rw-r--r--sql-ledger/templates/Norwegian-packing_list.tex123
-rw-r--r--sql-ledger/templates/Norwegian-pick_list.html153
-rw-r--r--sql-ledger/templates/Norwegian-pick_list.tex144
-rw-r--r--sql-ledger/templates/Norwegian-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Norwegian-purchase_order.html201
-rw-r--r--sql-ledger/templates/Norwegian-purchase_order.tex206
-rw-r--r--sql-ledger/templates/Norwegian-receipt.tex78
-rw-r--r--sql-ledger/templates/Norwegian-request_quotation.html202
-rw-r--r--sql-ledger/templates/Norwegian-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Norwegian-sales_order.html220
-rw-r--r--sql-ledger/templates/Norwegian-sales_order.tex150
-rw-r--r--sql-ledger/templates/Norwegian-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Norwegian-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Norwegian-statement.html120
-rw-r--r--sql-ledger/templates/Norwegian-statement.tex139
-rw-r--r--sql-ledger/templates/Norwegian-work_order.html174
-rw-r--r--sql-ledger/templates/Norwegian-work_order.tex177
-rw-r--r--sql-ledger/templates/Service-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Service-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Service-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Service-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Service-balance_sheet.html18
-rw-r--r--sql-ledger/templates/Service-bin_list.html189
-rw-r--r--sql-ledger/templates/Service-bin_list.tex147
-rw-r--r--sql-ledger/templates/Service-check.tex12
-rw-r--r--sql-ledger/templates/Service-income_statement.html21
-rw-r--r--sql-ledger/templates/Service-invoice.html12
-rw-r--r--sql-ledger/templates/Service-invoice.tex14
-rw-r--r--sql-ledger/templates/Service-packing_list.tex2
-rw-r--r--sql-ledger/templates/Service-pick_list.html153
-rw-r--r--sql-ledger/templates/Service-pick_list.tex144
-rw-r--r--sql-ledger/templates/Service-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Service-purchase_order.html14
-rw-r--r--sql-ledger/templates/Service-purchase_order.tex14
-rw-r--r--sql-ledger/templates/Service-receipt.tex19
-rw-r--r--sql-ledger/templates/Service-request_quotation.html202
-rw-r--r--sql-ledger/templates/Service-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Service-sales_order.html12
-rw-r--r--sql-ledger/templates/Service-sales_order.tex15
-rw-r--r--sql-ledger/templates/Service-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Service-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Service-statement.html39
-rw-r--r--sql-ledger/templates/Service-statement.tex54
-rw-r--r--sql-ledger/templates/Service-work_order.html174
-rw-r--r--sql-ledger/templates/Service-work_order.tex177
-rw-r--r--sql-ledger/templates/Spanish_A4-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Spanish_A4-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Spanish_A4-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Spanish_A4-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Spanish_A4-bin_list.html189
-rw-r--r--sql-ledger/templates/Spanish_A4-bin_list.tex147
-rw-r--r--sql-ledger/templates/Spanish_A4-check.tex12
-rw-r--r--sql-ledger/templates/Spanish_A4-invoice.html4
-rw-r--r--sql-ledger/templates/Spanish_A4-invoice.tex18
-rw-r--r--sql-ledger/templates/Spanish_A4-packing_list.html4
-rw-r--r--sql-ledger/templates/Spanish_A4-packing_list.tex16
-rw-r--r--sql-ledger/templates/Spanish_A4-pick_list.html153
-rw-r--r--sql-ledger/templates/Spanish_A4-pick_list.tex144
-rw-r--r--sql-ledger/templates/Spanish_A4-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Spanish_A4-purchase_order.html4
-rw-r--r--sql-ledger/templates/Spanish_A4-purchase_order.tex14
-rw-r--r--sql-ledger/templates/Spanish_A4-receipt.tex12
-rw-r--r--sql-ledger/templates/Spanish_A4-request_quotation.html202
-rw-r--r--sql-ledger/templates/Spanish_A4-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Spanish_A4-sales_order.html4
-rw-r--r--sql-ledger/templates/Spanish_A4-sales_order.tex16
-rw-r--r--sql-ledger/templates/Spanish_A4-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Spanish_A4-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Spanish_A4-statement.html12
-rw-r--r--sql-ledger/templates/Spanish_A4-statement.tex46
-rw-r--r--sql-ledger/templates/Spanish_A4-work_order.html174
-rw-r--r--sql-ledger/templates/Spanish_A4-work_order.tex177
-rw-r--r--sql-ledger/templates/Spanish_Letter-ap_transaction.html229
-rw-r--r--sql-ledger/templates/Spanish_Letter-ap_transaction.tex125
-rw-r--r--sql-ledger/templates/Spanish_Letter-ar_transaction.html237
-rw-r--r--sql-ledger/templates/Spanish_Letter-ar_transaction.tex131
-rw-r--r--sql-ledger/templates/Spanish_Letter-bin_list.html189
-rw-r--r--sql-ledger/templates/Spanish_Letter-bin_list.tex147
-rw-r--r--sql-ledger/templates/Spanish_Letter-check.tex12
-rw-r--r--sql-ledger/templates/Spanish_Letter-invoice.html4
-rw-r--r--sql-ledger/templates/Spanish_Letter-invoice.tex12
-rw-r--r--sql-ledger/templates/Spanish_Letter-packing_list.html4
-rw-r--r--sql-ledger/templates/Spanish_Letter-packing_list.tex12
-rw-r--r--sql-ledger/templates/Spanish_Letter-pick_list.html153
-rw-r--r--sql-ledger/templates/Spanish_Letter-pick_list.tex144
-rw-r--r--sql-ledger/templates/Spanish_Letter-pos_invoice.txt51
-rw-r--r--sql-ledger/templates/Spanish_Letter-purchase_order.html4
-rw-r--r--sql-ledger/templates/Spanish_Letter-purchase_order.tex14
-rw-r--r--sql-ledger/templates/Spanish_Letter-receipt.tex12
-rw-r--r--sql-ledger/templates/Spanish_Letter-request_quotation.html202
-rw-r--r--sql-ledger/templates/Spanish_Letter-request_quotation.tex175
-rw-r--r--sql-ledger/templates/Spanish_Letter-sales_order.html4
-rw-r--r--sql-ledger/templates/Spanish_Letter-sales_order.tex14
-rw-r--r--sql-ledger/templates/Spanish_Letter-sales_quotation.html225
-rw-r--r--sql-ledger/templates/Spanish_Letter-sales_quotation.tex157
-rw-r--r--sql-ledger/templates/Spanish_Letter-statement.html12
-rw-r--r--sql-ledger/templates/Spanish_Letter-statement.tex46
-rw-r--r--sql-ledger/templates/Spanish_Letter-work_order.html174
-rw-r--r--sql-ledger/templates/Spanish_Letter-work_order.tex177
354 files changed, 40956 insertions, 1797 deletions
diff --git a/sql-ledger/templates/Brazilian_Portuguese-ap_transaction.html b/sql-ledger/templates/Brazilian_Portuguese-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-ap_transaction.tex b/sql-ledger/templates/Brazilian_Portuguese-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-ar_transaction.html b/sql-ledger/templates/Brazilian_Portuguese-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-ar_transaction.tex b/sql-ledger/templates/Brazilian_Portuguese-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-bin_list.html b/sql-ledger/templates/Brazilian_Portuguese-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-bin_list.tex b/sql-ledger/templates/Brazilian_Portuguese-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-check.tex b/sql-ledger/templates/Brazilian_Portuguese-check.tex
index ea62b003b..4daf4eae1 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-check.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Brazilian_Portuguese-invoice.html b/sql-ledger/templates/Brazilian_Portuguese-invoice.html
index 287123833..0d280d4b1 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-invoice.html
+++ b/sql-ledger/templates/Brazilian_Portuguese-invoice.html
@@ -82,17 +82,25 @@
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
@@ -136,6 +144,7 @@ adjust the colspan if you include this to shift subtotal one to the right
you can also use netprice instead of sellprice if you
don't want to show the discount
netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
-->
<tr>
diff --git a/sql-ledger/templates/Brazilian_Portuguese-invoice.tex b/sql-ledger/templates/Brazilian_Portuguese-invoice.tex
index 15c407b89..286e00c94 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-invoice.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-invoice.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -78,13 +78,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{0.3cm}
@@ -110,13 +114,17 @@ Fax: <%customerfax%>
<%shiptoname%>
-<%shiptoaddr1%>
+<%shiptoaddress1%>
-<%shiptoaddr2%>
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
-<%shiptoaddr3%>
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
-<%shiptoaddr4%>
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
\vspace{0.3cm}
@@ -215,9 +223,5 @@ Fax: <%shiptofax%>
\centerline{\textbf{Obrigado por estarmos fazendo negócio!}}
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
\end{document}
-
-
diff --git a/sql-ledger/templates/Brazilian_Portuguese-packing_list.tex b/sql-ledger/templates/Brazilian_Portuguese-packing_list.tex
index 48102302f..9429df305 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-packing_list.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-packing_list.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
@@ -95,7 +95,6 @@
<%end number%>
\end{tabular*}
-
\parbox{\textwidth}{
\rule{\textwidth}{2pt}
@@ -107,10 +106,5 @@
}
-\vfill
-\centerline{\textbf{ }}
-
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
\end{document}
diff --git a/sql-ledger/templates/Brazilian_Portuguese-pick_list.html b/sql-ledger/templates/Brazilian_Portuguese-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-pick_list.tex b/sql-ledger/templates/Brazilian_Portuguese-pick_list.tex
new file mode 100644
index 000000000..cfe213cb8
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-pick_list.tex
@@ -0,0 +1,143 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-pos_invoice.txt b/sql-ledger/templates/Brazilian_Portuguese-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-purchase_order.html b/sql-ledger/templates/Brazilian_Portuguese-purchase_order.html
index 54b25f380..d51d3009c 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-purchase_order.html
+++ b/sql-ledger/templates/Brazilian_Portuguese-purchase_order.html
@@ -65,10 +65,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Brazilian_Portuguese-purchase_order.tex b/sql-ledger/templates/Brazilian_Portuguese-purchase_order.tex
index 61bb5183c..f25abdc88 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-purchase_order.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-purchase_order.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -78,13 +78,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{0.3cm}
@@ -109,13 +113,17 @@ Fax: <%customerfax%>
<%shiptoname%>
-<%shiptoaddr1%>
+<%shiptoaddress1%>
-<%shiptoaddr2%>
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
-<%shiptoaddr3%>
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
-<%shiptoaddr4%>
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
\vspace{0.3cm}
@@ -188,11 +196,5 @@ Fax: <%shiptofax%>
}
-
-%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-%\footnotetext[1]{\tiny }
-
\end{document}
-
diff --git a/sql-ledger/templates/Brazilian_Portuguese-receipt.tex b/sql-ledger/templates/Brazilian_Portuguese-receipt.tex
index ea62b003b..4daf4eae1 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-receipt.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Brazilian_Portuguese-request_quotation.html b/sql-ledger/templates/Brazilian_Portuguese-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-request_quotation.tex b/sql-ledger/templates/Brazilian_Portuguese-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-sales_order.html b/sql-ledger/templates/Brazilian_Portuguese-sales_order.html
index 480dc6351..9ec4fe694 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-sales_order.html
+++ b/sql-ledger/templates/Brazilian_Portuguese-sales_order.html
@@ -71,17 +71,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Brazilian_Portuguese-sales_order.tex b/sql-ledger/templates/Brazilian_Portuguese-sales_order.tex
index 4267143e7..2652fcded 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-sales_order.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-sales_order.tex
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
@@ -87,6 +91,9 @@
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
\textbf{Data} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Requerido por} & <%reqdate%> \\
+<%end reqdate%>
\textbf{Número} & <%ordnumber%>
\end{tabular}
diff --git a/sql-ledger/templates/Brazilian_Portuguese-sales_quotation.html b/sql-ledger/templates/Brazilian_Portuguese-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-sales_quotation.tex b/sql-ledger/templates/Brazilian_Portuguese-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-statement.html b/sql-ledger/templates/Brazilian_Portuguese-statement.html
index 963f65868..f2da08df1 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-statement.html
+++ b/sql-ledger/templates/Brazilian_Portuguese-statement.html
@@ -38,10 +38,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/Brazilian_Portuguese-statement.tex b/sql-ledger/templates/Brazilian_Portuguese-statement.tex
index fbc5b0350..7f2080939 100644
--- a/sql-ledger/templates/Brazilian_Portuguese-statement.tex
+++ b/sql-ledger/templates/Brazilian_Portuguese-statement.tex
@@ -44,48 +44,24 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
\parbox[t]{1cm}{\hfill}
-\parbox[t]{10.5cm}{
-
-<%name%>
-
-<%addr1%>
-
-<%addr2%>
-
-<%addr3%>
-
-<%addr4%>
+\parbox[t]{.5\textwidth}{
+<%name%>\\
+<%address1%>\\
+<%if address2%>
+<%address2%>
+<%end address2%>\\
+<%city%> <%state%> <%zipcode%>\\
+<%if country%>
+<%country%>
+<%end country%>\\
}
-\parbox[t]{7.5cm}{
+\parbox[t]{.4\textwidth}{
<%if customerphone%>
Tel: <%customerphone%>
<%end customerphone%>
@@ -100,38 +76,35 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{RELATÓRIO} \hfill
-
-\hfill <%statementdate%>
+\textbf{RELATÓRIO} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+\begin{tabular*}{\textwidth}{|l@{\extracolsep\fill}ccrrrr|}
+ \hline
\textbf{Número da Fatura \#} & \textbf{Data} & \textbf{Prazo} &
\textbf{Atual} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ \hline
<%foreach invnumber%>
<%invnumber%> & <%invdate%> & <%duedate%> &
<%c0%> & <%c30%> & <%c60%> & <%c90%> \\
<%end invnumber%>
-\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+ \multicolumn{7}{|l|}{\mbox{}} \\
+ \hline
+ \textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%> \\
+ \hline
\end{tabular*}
-\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Totais} & <%total%>
+ \textbf{Totais} & \textbf{<%total%>}
\end{tabularx}
\vfill
Favor pagar com <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Brazilian_Portuguese-work_order.html b/sql-ledger/templates/Brazilian_Portuguese-work_order.html
new file mode 100644
index 000000000..64674cdb6
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-work_order.html
@@ -0,0 +1,177 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
+
diff --git a/sql-ledger/templates/Brazilian_Portuguese-work_order.tex b/sql-ledger/templates/Brazilian_Portuguese-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Brazilian_Portuguese-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Danish-ap_transaction.html b/sql-ledger/templates/Danish-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Danish-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Danish-ap_transaction.tex b/sql-ledger/templates/Danish-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Danish-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Danish-ar_transaction.html b/sql-ledger/templates/Danish-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Danish-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Danish-ar_transaction.tex b/sql-ledger/templates/Danish-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Danish-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Danish-bin_list.html b/sql-ledger/templates/Danish-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Danish-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Danish-bin_list.tex b/sql-ledger/templates/Danish-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Danish-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Danish-check.tex b/sql-ledger/templates/Danish-check.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Danish-check.tex
+++ b/sql-ledger/templates/Danish-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Danish-invoice.html b/sql-ledger/templates/Danish-invoice.html
index d150a8475..4eda948ad 100644
--- a/sql-ledger/templates/Danish-invoice.html
+++ b/sql-ledger/templates/Danish-invoice.html
@@ -79,18 +79,26 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<%if shiptoname%>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
<%end shiptoname%>
</tr>
@@ -135,6 +143,7 @@ adjust the colspan if you include this to shift subtotal one to the right
you can also use netprice instead of sellprice if you
don't want to show the discount
netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
-->
<tr>
diff --git a/sql-ledger/templates/Danish-invoice.tex b/sql-ledger/templates/Danish-invoice.tex
index 6c3fa8b43..0cc07be60 100644
--- a/sql-ledger/templates/Danish-invoice.tex
+++ b/sql-ledger/templates/Danish-invoice.tex
@@ -46,7 +46,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -75,13 +75,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Danish-packing_list.tex b/sql-ledger/templates/Danish-packing_list.tex
index 0d6bfc47d..48217675c 100644
--- a/sql-ledger/templates/Danish-packing_list.tex
+++ b/sql-ledger/templates/Danish-packing_list.tex
@@ -46,7 +46,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
diff --git a/sql-ledger/templates/Danish-pick_list.html b/sql-ledger/templates/Danish-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Danish-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Danish-pick_list.tex b/sql-ledger/templates/Danish-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Danish-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Danish-pos_invoice.txt b/sql-ledger/templates/Danish-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Danish-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Danish-purchase_order.html b/sql-ledger/templates/Danish-purchase_order.html
index f9f21cd79..64802b7dd 100644
--- a/sql-ledger/templates/Danish-purchase_order.html
+++ b/sql-ledger/templates/Danish-purchase_order.html
@@ -64,10 +64,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Danish-purchase_order.tex b/sql-ledger/templates/Danish-purchase_order.tex
index bdd741622..9a0240025 100644
--- a/sql-ledger/templates/Danish-purchase_order.tex
+++ b/sql-ledger/templates/Danish-purchase_order.tex
@@ -46,7 +46,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -75,13 +75,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Danish-receipt.tex b/sql-ledger/templates/Danish-receipt.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Danish-receipt.tex
+++ b/sql-ledger/templates/Danish-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Danish-request_quotation.html b/sql-ledger/templates/Danish-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Danish-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Danish-request_quotation.tex b/sql-ledger/templates/Danish-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Danish-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Danish-sales_order.html b/sql-ledger/templates/Danish-sales_order.html
index f25652223..8242f371b 100644
--- a/sql-ledger/templates/Danish-sales_order.html
+++ b/sql-ledger/templates/Danish-sales_order.html
@@ -65,17 +65,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Danish-sales_order.tex b/sql-ledger/templates/Danish-sales_order.tex
index d7307cd76..b631789ca 100644
--- a/sql-ledger/templates/Danish-sales_order.tex
+++ b/sql-ledger/templates/Danish-sales_order.tex
@@ -75,20 +75,27 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
\textbf{S A L G S O R D R E}
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Dato} & <%orddate%> \\
+ \textbf{Ordredato} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Řnsket leveringsdato} & <%reqdate%> \\
+<%end reqdate%>
\textbf{Ordrenummer} & <%ordnumber%>
\end{tabular}
diff --git a/sql-ledger/templates/Danish-sales_quotation.html b/sql-ledger/templates/Danish-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Danish-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Danish-sales_quotation.tex b/sql-ledger/templates/Danish-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Danish-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Danish-statement.html b/sql-ledger/templates/Danish-statement.html
index 6fca322ee..a5efdf019 100644
--- a/sql-ledger/templates/Danish-statement.html
+++ b/sql-ledger/templates/Danish-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/Danish-statement.tex b/sql-ledger/templates/Danish-statement.tex
index 0b63f7523..5865da11f 100644
--- a/sql-ledger/templates/Danish-statement.tex
+++ b/sql-ledger/templates/Danish-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Danish-work_order.html b/sql-ledger/templates/Danish-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Danish-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Danish-work_order.tex b/sql-ledger/templates/Danish-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Danish-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Default-ap_transaction.html b/sql-ledger/templates/Default-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Default-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Default-ap_transaction.tex b/sql-ledger/templates/Default-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Default-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Default-ar_transaction.html b/sql-ledger/templates/Default-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Default-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Default-ar_transaction.tex b/sql-ledger/templates/Default-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Default-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Default-balance_sheet.html b/sql-ledger/templates/Default-balance_sheet.html
index 478caabca..c84ad95a5 100644
--- a/sql-ledger/templates/Default-balance_sheet.html
+++ b/sql-ledger/templates/Default-balance_sheet.html
@@ -1,14 +1,18 @@
-<body bgcolor=ffffff>
+<body>
<h2 align=center>
<%company%>
<br><%address%>
<p>BALANCE SHEET
-<br><%period%>
+<br>as at <%this_period%>
</h2>
+<%if department%>
+<h4>Department: <%department%></h4>
+<%end department%>
+
<table border=0>
<tr>
<th align=left width=400 colspan=2>ASSETS<br><hr align=left width=250 size=5 noshade></th>
@@ -58,7 +62,7 @@
<tr valign=top>
<td></td>
- <th align=left>Total Liabilities</th>
+ <th align=left>TOTAL LIABILITIES</th>
<td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
<td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
</tr>
@@ -84,7 +88,7 @@
<tr valign=top>
<td></td>
- <th align=left>Total Equity</th>
+ <th align=left>TOTAL EQUITY</th>
<td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
<td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
</tr>
@@ -98,3 +102,9 @@
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Default-bin_list.html b/sql-ledger/templates/Default-bin_list.html
new file mode 100644
index 000000000..204da54d5
--- /dev/null
+++ b/sql-ledger/templates/Default-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Default-bin_list.tex b/sql-ledger/templates/Default-bin_list.tex
new file mode 100644
index 000000000..82e19c196
--- /dev/null
+++ b/sql-ledger/templates/Default-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Default-check.tex b/sql-ledger/templates/Default-check.tex
index a1ab20169..7f25a218c 100644
--- a/sql-ledger/templates/Default-check.tex
+++ b/sql-ledger/templates/Default-check.tex
@@ -39,17 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
\vspace{1.8cm}
-<%notes%>
+<%memo%>
\vspace{0.8cm}
@@ -69,9 +69,10 @@
<%end invnumber%>
\end{tabularx}
-\vfill
-
-\end{document}
+\vspace{1cm}
+<%memo%>
+\vfill
+\end{document}
diff --git a/sql-ledger/templates/Default-income_statement.html b/sql-ledger/templates/Default-income_statement.html
index e9d6a4002..eab9ff0f6 100644
--- a/sql-ledger/templates/Default-income_statement.html
+++ b/sql-ledger/templates/Default-income_statement.html
@@ -1,5 +1,5 @@
-<body bgcolor=ffffff>
+<body>
<h2 align=center>
<%company%>
@@ -9,6 +9,13 @@
<br><%period%>
</h2>
+<%if department%>
+<h4>Department: <%department%></h4>
+<%end department%>
+
+<%if projectnumber%>
+<h4>Project Number: <%projectnumber%></h4>
+<%end projectnumber%>
<table width=100% border=0>
<tr>
@@ -34,7 +41,7 @@
<tr valign=top>
<td> </td>
- <th align=left>Total Income</th>
+ <th align=left>TOTAL INCOME</th>
<td align=right><%total_income_this_period%><hr noshade size=2></td>
<td align=right><%total_income_last_period%><hr noshade size=2></td>
</tr>
@@ -60,7 +67,7 @@
<tr valign=top>
<td> </td>
- <th align=left>Total Expenses</th>
+ <th align=left>TOTAL EXPENSES</th>
<td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
<td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
</tr>
@@ -72,11 +79,3 @@
</tr>
</table>
-
-
-
-
-
-
-
-
diff --git a/sql-ledger/templates/Default-invoice.html b/sql-ledger/templates/Default-invoice.html
index 0ba06cc32..6f37b8783 100644
--- a/sql-ledger/templates/Default-invoice.html
+++ b/sql-ledger/templates/Default-invoice.html
@@ -2,130 +2,171 @@
<body bgcolor=ffffff>
<table width=100%>
-<tr valign=bottom>
- <td width=10>&nbsp;</td>
- <td>
-
- <table width=100%>
<tr>
- <td>
- <h4>
- <%company%>
- <br><%address%>
- </h4>
- </td>
+ <td width=10>&nbsp;</td>
- <td align=right>
- <h4>
- Telephone: <%tel%>
- <br>Facsimile: <%fax%>
- </h4>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>I N V O I C E</h4>
+ </th>
+ </tr>
+ </table>
</td>
</tr>
<tr>
- <th colspan=3>
- <h4>I N V O I C E</h4>
- </th>
- </tr>
-
- </table>
-
-
- <table width=100% callspacing=0 cellpadding=0>
-
- <tr>
- <td align=right>
- <table>
- <tr>
- <th align=right>Invoice Date</th><td width=10>&nbsp;</td><td><%invdate%></td>
- </tr>
-
- <tr>
- <th align=right>Due Date</th><td width=10>&nbsp;</td><td><%duedate%></td>
- </tr>
-
- <tr>
- <th align=right>Number</th><td>&nbsp;</td><td><%invnumber%></td></tr>
- </tr>
-
-<!--
- <tr>
- <th align=right>Clerk:</th><td>&nbsp;</td><td><%employee%></td>
- </tr>
--->
+ <td>&nbsp;</td>
- <tr>
- <td>&nbsp;</td>
- </tr>
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <br>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
</td>
- </table>
</tr>
+ <tr height=5></tr>
+
<tr>
+ <td>&nbsp;</td>
+
<td>
- <table width=100%>
- <tr bgcolor=000000>
- <th align=left><font color=ffffff>To:</th>
- <th align=left><font color=ffffff>Ship To:</th>
- </tr>
-
-<!--
- other variables which can be use:
- contact, shiptocontact, shiptophone, shiptofax
--->
-
- <tr valign=top>
- <td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
- </td>
-
- <td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
- </td>
- </tr>
- </table>
+ <table width=100% border=1>
+ <tr>
+ <th width=14% align=left nowrap>Invoice #</th>
+ <th width=14% align=left nowrap>Date</th>
+ <th width=14% align=left nowrap>Due</th>
+ <th width=14% align=left>Order #</th>
+ <th width=14% align=left nowrap>Salesperson</th>
+ <th width=14% align=left nowrap>Shipping Point</th>
+ <th width=14% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td><%ordnumber%>&nbsp;</td>
+ <td><%employee%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
- </tr>
- <tr>
<td>
- <table width=100%>
- <tr bgcolor=000000>
-<!-- <th align=right><font color=ffffff>No.</th> -->
- <th align=left><font color=ffffff>Number</th>
- <th align=left><font color=ffffff>Description</th>
- <th><font color=ffffff>Qt'y</th>
- <th>&nbsp;</th>
- <th><font color=ffffff>Price</th>
- <th><font color=ffffff>Disc</th>
- <th><font color=ffffff>Amount</th>
- </tr>
-
-<%foreach number%>
- <tr valign=top>
-<!-- <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
- <td><%number%></td>
- <td><%description%></td>
- <td align=right><%qty%></td>
- <td><%unit%></td>
- <td align=right><%sellprice%></td>
- <td align=right><%discount%></td>
- <td align=right><%linetotal%></td>
- </tr>
-<%end number%>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>&nbsp;</th>
+ <th align=right><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th align=right><font color=ffffff>Unit Price</th>
+ <th align=right><font color=ffffff>Disc %</th>
+ <th align=right><font color=ffffff>Extended</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+ <%end number%>
<!--
you can also use netprice instead of sellprice if you
@@ -133,175 +174,162 @@ don't want to show the discount
netprice = sellprice - discount
-->
- <tr>
- <td colspan=7><hr noshade></td>
- </tr>
+ <tr>
+ <td colspan=9><hr noshade></td>
+ </tr>
- <tr>
-<%if taxincluded%>
- <th colspan=5 align=right>Total</th>
- <td colspan=2 align=right><%invtotal%></td>
-<%end taxincluded%>
-<%if not taxincluded%>
- <th colspan=5 align=right>Subtotal</th>
- <td colspan=2 align=right><%subtotal%></td>
-<%end taxincluded%>
- </tr>
-
-<%foreach tax%>
- <tr>
- <th colspan=5 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
- <td colspan=2 align=right><%tax%></td>
- </tr>
-<%end tax%>
-
-<%if paid%>
- <tr>
- <th colspan=5 align=right>Paid</th>
- <td colspan=2 align=right>- <%paid%></td>
- </tr>
-<%end paid%>
-
- <tr>
- <td colspan=3>&nbsp;</td>
- <td colspan=4><hr noshade></td>
- </tr>
-
- <tr>
- <td colspan=3>Terms Net <b><%terms%></b> days</td>
- <th colspan=2 align=right>Outstanding</th>
- <th colspan=2 align=right><%total%></th>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- </tr>
-
- </table>
+ <tr>
+ <%if taxincluded%>
+ <th colspan=7 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=7 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=7 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if paid%>
+ <tr>
+ <th colspan=7 align=right>Paid</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+ <%end paid%>
+
+ <tr>
+ <td colspan=5>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <%if total%>
+ <tr>
+ <td colspan=5>&nbsp;</td>
+ <th colspan=2 align=right nowrap>Balance Due</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+ <%end total%>
+
+ <tr>
+ </table>
</td>
</tr>
-<tr>
- <td>
- <table width=100%>
- <tr valign=top>
-<%if notes%>
- <td>Notes</td>
- <td><%notes%></td>
-<%end notes%>
- <td align=right>
- All prices in <b><%currency%></b> Funds
- <br><%shippingpoint%>
- </td>
- </tr>
-
- </table>
- </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-
-<%if paid%>
-<tr>
- <td colspan=7>
- <table width=60%>
- <tr>
- <th align=left>Payments</th>
- </tr>
- <tr>
- <td colspan=4>
- <hr noshade>
- </td>
- </tr>
- <tr>
- <th align=left>Date</th>
- <th align=left>Account</th>
- <th align=left>Source</th>
- <th align=left>Amount</th>
- </tr>
-<%end paid%>
-
-<%foreach payment%>
- <tr>
- <td><%paymentdate%></td>
- <td><%paymentaccount%></td>
- <td><%paymentsource%></td>
- <td><%payment%></td>
- </tr>
-<%end payment%>
-
-<%if paid%>
- </table>
- </td>
-</tr>
-
-<tr>
- <td>&nbsp;</td>
-</tr>
-<%end paid%>
-
-<tr>
- <th colspan=7>
- <br>Thank you for your valued business!
- </th>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-
-<tr>
- <td>
- <table width=100%>
- <tr valign=top>
- <td><font size=-3>
- Payment due NET <%terms%> Days from date of Invoice.
- Interest on overdue amounts will acrue at the rate of 1.5% per month
- from due date until paid in full. Items returned are subject to
- a 10% restocking charge. A return authorization must be obtained
- from <%company%> before goods are returned. Returns must be shipped
- prepaid and properly insured. <%company%> will not be responsible
- for damages during transit.
- </font>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+
+ <td><%text_amount%> ***** <%decimal%>/100</td>
+
+ <td align=right nowrap>
+ All prices in <b><%currency%></b>
+ </td>
+ </tr>
+ </table>
</td>
- <td width=150>
- X <hr noshade>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td colspan=9>
+ <table width=60%>
+
+ <tr>
+ <th align=left>Payments</th>
+ </tr>
+
+ <tr>
+ <td colspan=4>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
</td>
</tr>
- </table>
- </td>
-</tr>
+ <%end paid%>
+
+ <tr height=10></tr>
-<%foreach tax%>
<tr>
- <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ <td>&nbsp;</td>
+
+ <th>
+ Thank you for your valued business!
+ </th>
</tr>
-<%end tax%>
-<%if taxincluded%>
<tr>
- <th colspan=7 align=left><font size=-2>Taxes shown are included in price.</th>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Payment due by <%duedate%>.
+ Items returned are subject to a 10% restocking charge. A return authorization must be obtained from <%company%> before goods are returned. Returns must be shipped prepaid and properly insured. <%company%> will not be responsible for damages during transit.
+ </font>
+ </td>
+
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
</tr>
-<%end taxincluded%>
-<!-- business number
+ <%foreach tax%>
<tr>
- <th colspan=7 align=left><font size=-2>Business Number: <%businessnumber%></font></th>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
</tr>
--->
+ <%end tax%>
-<!-- banking information
+ <%if taxincluded%>
<tr>
- <th colspan=7 align=left>Banking Information:
- <br>Bank
- <br>Transit No.
- <br>Account No.
- </td>
+ <td>&nbsp;</td>
</tr>
--->
-</table>
+ <tr>
+ <th colspan=8 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
-</td>
-</tr>
</table>
</body>
diff --git a/sql-ledger/templates/Default-invoice.tex b/sql-ledger/templates/Default-invoice.tex
index 58a340d5e..a57f98b07 100644
--- a/sql-ledger/templates/Default-invoice.tex
+++ b/sql-ledger/templates/Default-invoice.tex
@@ -1,9 +1,10 @@
-\documentclass[twoside]{scrartcl}
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
\usepackage[frame]{xy}
\usepackage{tabularx}
\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
+\setlength{\hoffset}{-1.9cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
@@ -11,41 +12,51 @@
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
+\setlength{\textheight}{24.7cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
+
\begin{document}
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\pagestyle{myheadings}
+\thispagestyle{empty}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\newsavebox{\ftr}
+\sbox{\ftr}{
\parbox{\textwidth}{
- \parbox[b]{12cm}{
- <%company%>
-
- <%address%>}\hfill
- \begin{tabular}[b]{rr@{}}
- Telephone & <%tel%>\\
- Facsimile & <%fax%>
- \end{tabular}
-
- \rule[1.5ex]{\textwidth}{0.5pt}
+ \tiny
+ \rule[1.5em]{\textwidth}{0.5pt}
+Payment due NET <%terms%> Days from date of Invoice. Interest on overdue amounts will acrue at the rate of 12\% per annum starting from <%duedate%> until paid in full. Items returned are subject to a 10\% restocking charge.
+A return authorization must be obtained from <%company%> before goods are returned. Returns must be shipped prepaid and properly insured.
+<%company%> will not be responsible for damages during transit.
}
}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+\vspace*{-1.3cm}
-\pagestyle{myheadings}
-%\thispagestyle{empty} use this with letterhead paper
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
-<%pagebreak 90 27 48%>
-\end{tabular*}
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
\rule{\textwidth}{2pt}
@@ -56,43 +67,40 @@
\newpage
-\markright{<%company%>\hfill <%invnumber%>}
+\markboth{<%company%>\hfill <%invnumber%>}{<%company%>\hfill <%invnumber%>}
\vspace*{-12pt}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
- \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
- & carried forward from page <%lastpage%> & & & & & <%sumcarriedforward%> \\
+\begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em]
+ & carried forward from page <%lastpage%> & & & & & & <%sumcarriedforward%> \\ [0.5em]
<%end pagebreak%>
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
\vspace*{0.5cm}
\parbox[t]{1cm}{\hfill}
- \parbox[t]{10.5cm}{
- \textbf{To}
- \vspace{0.5cm}
+\parbox[t]{.6\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
\vspace{0.3cm}
-%<%if contact%>
-%Attn: <%contact%>
-%\vspace{0.3cm}
-%<%end contact%>
-\vspace{0.5cm}
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
<%if customerphone%>
Tel: <%customerphone%>
@@ -104,27 +112,25 @@ Fax: <%customerfax%>
<%email%>
}
-\parbox[t]{7.5cm}{
+\parbox[t]{.4\textwidth}{
\textbf{Ship To}
-\vspace{0.5cm}
+\vspace{0.7cm}
<%shiptoname%>
-<%shiptoaddr1%>
+<%shiptoaddress1%>
-<%shiptoaddr2%>
+<%shiptoaddress2%>
-<%shiptoaddr3%>
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
-<%shiptoaddr4%>
-
-\vspace{0.3cm}
+<%shiptocountry%>
\vspace{0.3cm}
<%if shiptocontact%>
-Attn: <%shiptocontact%>
-\vspace{0.3cm}
+<%shiptocontact%>
+\vspace{0.2cm}
<%end shiptocontact%>
<%if shiptophone%>
@@ -146,23 +152,26 @@ Fax: <%shiptofax%>
\vspace{1cm}
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Date} & <%invdate%> \\
- \textbf{Number} & <%invnumber%> \\
- \textbf{Order} & <%ordnumber%> \\
- \textbf{Clerk} & <%employee%>
-\end{tabular}
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} & \textbf{Order \#}
+ & \textbf{Salesperson} & \textbf{Shipping Point} &
+ \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%invdate%> & <%duedate%> & <%ordnumber%> & <%employee%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
\vspace{1cm}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
- \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+\begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\ [0.5em]
<%foreach number%>
- <%number%> & <%description%> & <%qty%> &
- <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+ <%runningnumber%> & <%number%> & <%description%> & <%deliverydate%> &
+ <%qty%> & <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
<%end number%>
-\end{tabular*}
+\end{tabularx}
\parbox{\textwidth}{
@@ -172,21 +181,24 @@ Fax: <%shiptofax%>
\hfill
\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+ Subtotal & <%subtotal%> \\
<%foreach tax%>
<%taxdescription%> on <%taxbase%> & <%tax%> \\
<%end tax%>
<%if paid%>
- \textbf{Paid} & - <%paid%> \\
+ Paid & - <%paid%> \\
<%end paid%>
\hline
- \textbf{Balance Owing} & \textbf{<%total%>} \\
+<%if total%>
+ Balance Due & <%total%>
+<%end total%>
\end{tabularx}
\vspace{0.3cm}
+<%text_amount%> ***** <%decimal%>/100
\hfill
- All prices in \textbf{<%currency%>} funds.
+All prices in \textbf{<%currency%>}.
\vspace{12pt}
@@ -202,7 +214,7 @@ Fax: <%shiptofax%>
\begin{tabularx}{10cm}{@{}lXlr@{}}
\textbf{Payments} & & & \\
\hline
- \textbf{Date} & \textbf{Account} & \textbf{Source} & \textbf{Amount} \\
+ \textbf{Date} & & \textbf{Source} & \textbf{Amount} \\
<%end paid%>
<%foreach payment%>
<%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%> \\
@@ -215,17 +227,9 @@ Fax: <%shiptofax%>
\centerline{\textbf{Thank You for your valued business!}}
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+\rule{\textwidth}{0.5pt}
-\footnotetext[1]{\tiny
-Payment due NET <%terms%> Days from date of Invoice. Interest on overdue
-amounts will acrue at the rate of 1.5\% per month starting <%duedate%>
-until paid in full. Items returned are subject to a 10\% restocking charge.
-A return authorization must be obtained from <%company%> before goods are
-returned. Returns must be shipped prepaid and properly insured.
-<%company%> will not be responsible for damages during transit.}
+\usebox{\ftr}
\end{document}
-
-
diff --git a/sql-ledger/templates/Default-packing_list.html b/sql-ledger/templates/Default-packing_list.html
index 07ba8d61d..130f45485 100644
--- a/sql-ledger/templates/Default-packing_list.html
+++ b/sql-ledger/templates/Default-packing_list.html
@@ -2,147 +2,196 @@
<body bgcolor=ffffff>
<table width=100%>
-<tr>
- <td width=10>
- </td>
- <td>
-
- <table width=100%>
<tr>
+ <td width=10>&nbsp;</td>
+
<td>
- <h4>
- <%company%>
- <br><%address%>
- </h4>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P A C K I N G &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
</td>
-
- <th colspan=2>
- <h4 align=center>P A C K I N G &nbsp;&nbsp; L I S T</h4>
- </th>
</tr>
- </table>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
- <table width=100% callspacing=0 cellpadding=0>
-
- <tr>
- <td align=right>
- <table>
- <tr>
- <th align=right>Date</th><td width=10> </td><td><%invdate%></td>
- </tr>
+ <tr height=5></tr>
- <tr>
- <th align=right>Number</th><td></td><td><%invnumber%></td></tr>
- </tr>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>Invoice #</th>
+ <th width=17% align=left>Order #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
- <tr>
- <td>
- </td>
- </tr>
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%>&nbsp;</td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
</td>
- </table>
</tr>
<tr>
+ <td>&nbsp;</td>
+
<td>
- <table width=100%>
- <tr bgcolor=000000>
- <th align=left><font color=ffffff>Ship To:</th>
- </tr>
-
- <tr>
- <td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
-<%if shiptocontact%>
- <p>Attn: <%shiptocontact%>
-<%end shiptocontact%>
-
- </td>
- </tr>
- </table>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th align=left><font color=ffffff>Serial Number</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ </tr>
+ <%end number%>
+
+ </table>
</td>
</tr>
<tr>
- <td>
- </td>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
</tr>
-
+
<tr>
+ <td>&nbsp;</td>
+
<td>
- <table width=100%>
- <tr bgcolor=000000>
- <th align=left><font color=ffffff>Number</th>
- <th align=left><font color=ffffff>Description</th>
- <th><font color=ffffff>Qt'y</th>
- <th>&nbsp;</th>
- </tr>
-
-<%foreach number%>
- <tr valign=top>
- <td><%number%></td>
- <td><%description%></td>
- <td align=right><%qty%></td>
- <td><%unit%></td>
- </tr>
-<%end number%>
-
- <tr>
- <td colspan=4><hr noshade></td>
- </tr>
-
- </table>
+ <table width=100%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+ </table>
</td>
</tr>
-<tr>
- <td>
- <table width=100%>
- <tr valign=top>
-<%if notes%>
- <td>Notes</td>
- <td><pre><%notes%></pre></td>
-<%end notes%>
- <td align=right>
- <%shippingpoint%>
- </td>
- </tr>
-
- </table>
- </td>
-</tr>
-
-<tr>
- <td>
- <table width=100%>
- <tr valign=top>
- <td><font size=-3>
- Items returned are subject to
- a 10% restocking charge. A return authorization must be obtained
- from <%company%> before goods are returned. Returns must be shipped
- prepaid and properly insured. <%company%> will not be responsible
- for damages during transit.
- </font>
- </td>
- <td width=150>
- X <hr noshade>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%><font size=-3>
+ Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
- </table>
- </td>
-</tr>
-
</table>
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
diff --git a/sql-ledger/templates/Default-packing_list.tex b/sql-ledger/templates/Default-packing_list.tex
index fce17823c..9d08a611e 100644
--- a/sql-ledger/templates/Default-packing_list.tex
+++ b/sql-ledger/templates/Default-packing_list.tex
@@ -2,8 +2,9 @@
\usepackage[frame]{xy}
\usepackage{tabularx}
\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
+\setlength{\hoffset}{-1.9cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
@@ -11,89 +12,129 @@
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
+\setlength{\textheight}{24.7cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
+
\begin{document}
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
- \parbox{\textwidth}{
- \parbox[b]{12cm}{
- <%company%>
-
- <%address%>}\hfill
- \begin{tabular}[b]{rr@{}}
- Telephone & <%tel%>\\
- Facsimile & <%fax%>
- \end{tabular}
-
- \rule[1.5ex]{\textwidth}{0.5pt}
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
}
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
\newpage
-\markright{<%company%>\hfill <%invnumber%>}
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
\vspace*{-12pt}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
- \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Bin} \\
+\begin{tabularx}{\textwidth}{@{}rlXllrrl@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Ship} & \\
<%end pagebreak%>
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{Ship To}} \hfill
-\vspace*{2cm}
+\vspace{0.7cm}
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
<%shiptoname%>
-<%shiptoaddr1%>
+<%shiptoaddress1%>
-<%shiptoaddr2%>
+<%shiptoaddress2%>
-<%shiptoaddr3%>
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
-<%shiptoaddr4%>
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
-\vspace{3.5cm}
+\vspace{1cm}
\textbf{P A C K I N G} \parbox{0.3cm}{\hfill} \textbf{L I S T}
-
\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Date} & <%invdate%> \\
- \textbf{Number} & <%invnumber%> \\
- \textbf{Customer} & <%customer_id%>
-\end{tabular}
\vspace{1cm}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
- \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Bin} \\
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrl@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Ship} & \\
+
<%foreach number%>
- <%number%> & <%description%> & <%qty%> &
- <%unit%> & <%bin%> \\
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> \\
<%end number%>
-\end{tabular*}
+\end{tabularx}
\parbox{\textwidth}{
@@ -101,9 +142,7 @@
\vspace{12pt}
-<%if notes%>
- <%notes%>
-<%end if%>
+<%notes%>
}
diff --git a/sql-ledger/templates/Default-pick_list.html b/sql-ledger/templates/Default-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Default-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Default-pick_list.tex b/sql-ledger/templates/Default-pick_list.tex
new file mode 100644
index 000000000..a23dc9fe9
--- /dev/null
+++ b/sql-ledger/templates/Default-pick_list.tex
@@ -0,0 +1,143 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Default-pos_invoice.txt b/sql-ledger/templates/Default-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Default-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Default-purchase_order.html b/sql-ledger/templates/Default-purchase_order.html
index 7df399ed6..f353a11df 100644
--- a/sql-ledger/templates/Default-purchase_order.html
+++ b/sql-ledger/templates/Default-purchase_order.html
@@ -15,10 +15,13 @@
</h4>
</td>
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
<td align=right>
<h4>
- Telephone: <%tel%>
- <br>Facsimile: <%fax%>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
</h4>
</td>
</tr>
@@ -35,28 +38,6 @@
<table width=100% callspacing=0 cellpadding=0>
<tr>
- <td align=right>
- <table>
- <tr>
- <th align=right>Order Date</th><td width=10>&nbsp;</td><td><%orddate%></td>
- </tr>
-
- <tr>
- <th align=right>Required by</th><td width=10>&nbsp;</td><td><%reqdate%></td>
- </tr>
-
- <tr>
- <th align=right>Number</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- </tr>
- </td>
- </table>
- </tr>
-
- <tr>
<td>
<table width=100%>
<tr bgcolor=000000>
@@ -66,11 +47,14 @@
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
-
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
<br>
<%if contact%>
<br>Attn: <%contact%>
@@ -84,11 +68,14 @@
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
-
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
<br>
<%if shiptocontact%>
<br>Attn: <%shiptocontact%>
@@ -99,16 +86,38 @@
<%if shiptofax%>
<br>Fax: <%shiptofax%>
<%end shiptofax%>
-
</tr>
</table>
</td>
</tr>
+ <tr><td>&nbsp;</td></tr>
+
<tr>
- <td>&nbsp;</td>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>Order #</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
</tr>
-
+
+
<tr>
<td>
<table width=100%>
@@ -119,12 +128,14 @@
<th><font color=ffffff>Qt'y</th>
<th>&nbsp;</th>
<th><font color=ffffff>Price</th>
+ <th><font color=ffffff>%</th>
<th><font color=ffffff>Amount</th>
</tr>
<%foreach number%>
<tr valign=top>
<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
adjust the colspan if you include this to shift subtotal one to the right
-->
<td><%number%></td>
@@ -132,40 +143,69 @@ adjust the colspan if you include this to shift subtotal one to the right
<td align=right><%qty%></td>
<td><%unit%></td>
<td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></th>
<td align=right><%linetotal%></td>
</tr>
<%end number%>
<tr>
- <td colspan=6><hr noshade></td>
+ <td colspan=7><hr noshade></td>
</tr>
<tr>
- <th colspan=4 align=right>Subtotal</th>
- <td colspan=2 align=right><%subtotal%></td>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <th colspan=1 align=right><%ordtotal%></th>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=1 align=right><%subtotal%></td>
+<%end taxincluded%>
</tr>
<%foreach tax%>
<tr>
- <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
- <td colspan=2 align=right><%tax%></td>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=1 align=right><%tax%></td>
</tr>
<%end tax%>
<tr>
- <td colspan=2>&nbsp;</td>
+ <td colspan=3>&nbsp;</td>
<td colspan=4><hr noshade></td>
</tr>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=1 align=right><%ordtotal%></td>
+<%end taxincluded%>
+
+<%if terms%>
+ <tr>
+ <td colspan=3>Terms Net <b><%terms%></b> days</td>
+ <th colspan=3 align=right>Total</th>
+ <th colspan=1 align=right><%ordtotal%></th>
+ </tr>
+<%end terms%>
+<%if taxincluded%>
<tr>
- <td colspan=2>Terms Net <b><%terms%></b> days</td>
- <th colspan=2 align=right>Total</th>
- <th colspan=2 align=right><%ordtotal%></th>
+ <td colspan=2>Tax included</td>
</tr>
+<%end taxincluded%>
<tr>
<td>&nbsp;</td>
</tr>
+
+<%if ordtotal%>
+ <tr>
+ <td colspan=7 align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+<%end ordtotal%>
</table>
</td>
@@ -174,16 +214,12 @@ adjust the colspan if you include this to shift subtotal one to the right
<tr>
<td>
<table width=100%>
- <tr valign=top>
<%if notes%>
+ <tr valign=top>
<td>Notes</td>
- <td><pre><%notes%></pre></td>
-<%end notes%>
- <td align=right>
- All prices in <b><%currency%></b> Funds
- <br><%shippingpoint%>
- </td>
+ <td><%notes%></td>
</tr>
+<%end notes%>
</table>
</td>
@@ -195,17 +231,9 @@ adjust the colspan if you include this to shift subtotal one to the right
<td>
<table width=100%>
<tr valign=top>
- <td><font size=-3>
- Payment due NET <%terms%> Days from date of Invoice.
- Interest on overdue amounts will acrue at the rate of 1.5% per month
- from due date until paid in full. Items returned are subject to
- a 10% restocking charge. A return authorization must be obtained
- from <%company%> before goods are returned. Returns must be shipped
- prepaid and properly insured. <%company%> will not be responsible
- for damages during transit.
- </font>
- </td>
- <td width=150>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
X <hr noshade>
</td>
</tr>
diff --git a/sql-ledger/templates/Default-purchase_order.tex b/sql-ledger/templates/Default-purchase_order.tex
index 4e1deb2f0..863b6547f 100644
--- a/sql-ledger/templates/Default-purchase_order.tex
+++ b/sql-ledger/templates/Default-purchase_order.tex
@@ -1,9 +1,9 @@
\documentclass[twoside]{scrartcl}
\usepackage[frame]{xy}
\usepackage{tabularx}
-\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
+\setlength{\hoffset}{-1.9cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
@@ -11,47 +11,46 @@
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
+\setlength{\textheight}{24.7cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
\begin{document}
\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
- \parbox{\textwidth}{
- \parbox[b]{12cm}{
- <%company%>
-
- <%address%>}\hfill
- \begin{tabular}[b]{rr@{}}
- Telephone & <%tel%>\\
- Facsimile & <%fax%>
- \end{tabular}
-
- \rule[1.5ex]{\textwidth}{0.5pt}
- }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
+\pagestyle{myheadings}
+\thispagestyle{empty}
-\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+\vspace*{-1.3cm}
-\pagestyle{myheadings}
-%\thispagestyle{empty} use this with letterhead paper
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
<%pagebreak 90 27 48%>
-\end{tabular*}
+\end{tabularx}
\rule{\textwidth}{2pt}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ Subtotal & <%sumcarriedforward%> \\
\end{tabularx}
\newpage
@@ -60,31 +59,29 @@
\vspace*{-12pt}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
\textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
\textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
& carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
<%end pagebreak%>
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
\vspace*{0.5cm}
\parbox[t]{1cm}{\hfill}
-\parbox[t]{10.5cm}{
+\parbox[t]{.45\textwidth}{
\textbf{To}
\vspace{0.5cm}
-
+
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
\vspace{0.3cm}
@@ -103,19 +100,19 @@ Fax: <%vendorfax%>
<%email%>
}
-\parbox[t]{7.5cm}{
+\parbox[t]{.45\textwidth}{
\textbf{Ship To}
-\vspace{0.3cm}
+\vspace{0.5cm}
<%shiptoname%>
-<%shiptoaddr1%>
+<%shiptoaddress1%>
-<%shiptoaddr2%>
+<%shiptoaddress2%>
-<%shiptoaddr3%>
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
-<%shiptoaddr4%>
+<%shiptocountry%>
\vspace{0.3cm}
@@ -140,24 +137,25 @@ Fax: <%shiptofax%>
\textbf{P U R C H A S E} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Date} & <%orddate%> \\
-<%if reqdate%>
- \textbf{Required by} & <%reqdate%> \\
-<%end reqdate%>
- \textbf{Number} & <%ordnumber%>
-\end{tabular}
+
+\vspace{1cm}
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
\vspace{1cm}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
\textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
\textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
<%foreach number%>
<%number%> & <%description%> & <%qty%> &
<%unit%> & <%sellprice%> & <%linetotal%> \\
<%end number%>
-\end{tabular*}
+\end{tabularx}
\parbox{\textwidth}{
@@ -167,18 +165,18 @@ Fax: <%shiptofax%>
\hfill
\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+ Subtotal & <%subtotal%> \\
<%foreach tax%>
<%taxdescription%> on <%taxbase%> & <%tax%>\\
<%end tax%>
\hline
- \textbf{Total} & \textbf{<%ordtotal%>}\\
+ Total & <%ordtotal%>\\
\end{tabularx}
\vspace{0.3cm}
\hfill
- All prices in \textbf{<%currency%>} funds.
+ All prices in \textbf{<%currency%>}.
\vspace{12pt}
@@ -195,4 +193,3 @@ Fax: <%shiptofax%>
\end{document}
-
diff --git a/sql-ledger/templates/Default-receipt.tex b/sql-ledger/templates/Default-receipt.tex
index 24427b369..7f25a218c 100644
--- a/sql-ledger/templates/Default-receipt.tex
+++ b/sql-ledger/templates/Default-receipt.tex
@@ -39,17 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
\vspace{1.8cm}
-<%notes%>
+<%memo%>
\vspace{0.8cm}
@@ -69,6 +69,10 @@
<%end invnumber%>
\end{tabularx}
+\vspace{1cm}
+
+<%memo%>
+
\vfill
\end{document}
diff --git a/sql-ledger/templates/Default-request_quotation.html b/sql-ledger/templates/Default-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Default-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Default-request_quotation.tex b/sql-ledger/templates/Default-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Default-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Default-sales_order.html b/sql-ledger/templates/Default-sales_order.html
index c09e13a1c..5d12e6b31 100644
--- a/sql-ledger/templates/Default-sales_order.html
+++ b/sql-ledger/templates/Default-sales_order.html
@@ -2,211 +2,244 @@
<body bgcolor=ffffff>
<table width=100%>
-<tr valign=bottom>
- <td width=10>&nbsp;</td>
- <td>
-
- <table width=100%>
<tr>
+ <td width=10>&nbsp;</td>
+
<td>
- <h4>
- <%company%>
- <br><%address%>
- </h4>
- </td>
-
- <td align=right>
- <h4>
- Telephone: <%tel%>
- <br>Facsimile: <%fax%>
- </h4>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>S A L E S &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
</td>
</tr>
<tr>
- <th colspan=3>
- <h4>S A L E S &nbsp;&nbsp; O R D E R</h4>
- </th>
- </tr>
-
- </table>
-
-
- <table width=100% callspacing=0 cellpadding=0>
-
- <tr>
- <td align=right>
- <table>
- <tr>
- <th align=right>Order Date</th><td width=10>&nbsp;</td><td><%orddate%></td>
- </tr>
-
- <tr>
- <th align=right>Required by</th><td width=10>&nbsp;</td><td><%reqdate%></td>
- </tr>
+ <td>&nbsp;</td>
- <tr>
- <th align=right>Number</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- </tr>
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
</td>
- </table>
</tr>
+ <tr height=5></tr>
+
<tr>
+ <td>&nbsp;</td>
+
<td>
- <table width=100%>
- <tr bgcolor=000000>
- <th align=left><font color=ffffff>To:</th>
- <th align=left><font color=ffffff>Ship To:</th>
- </tr>
-
- <tr>
- <td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
- </td>
-
- <td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
- </td>
- </tr>
- </table>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>
+ <%text_amount%> ***** <%decimal%>/100
+ <%if terms%>
+ <br>Terms Net <b><%terms%></b> days
+ <%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
</tr>
-
+
<tr>
+ <td>&nbsp;</td>
+
<td>
- <table width=100%>
- <tr bgcolor=000000>
-<!-- <th align=right><font color=ffffff>No.</th> -->
- <th align=left><font color=ffffff>Number</th>
- <th align=left><font color=ffffff>Description</th>
- <th><font color=ffffff>Qt'y</th>
- <th>&nbsp;</th>
- <th><font color=ffffff>Price</th>
- <th><font color=ffffff>Disc</th>
- <th><font color=ffffff>Amount</th>
- </tr>
-
-<%foreach number%>
- <tr valign=top>
-<!-- <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
- <td><%number%></td>
- <td><%description%></td>
- <td align=right><%qty%></td>
- <td><%unit%></td>
- <td align=right><%sellprice%></td>
- <td align=right><%discount%></td>
- <td align=right><%linetotal%></td>
- </tr>
-<%end number%>
-
- <tr>
- <td colspan=7><hr noshade></td>
- </tr>
-
- <tr>
-<%if taxincluded%>
- <th colspan=5 align=right>Total</th>
- <td colspan=2 align=right><%ordtotal%></td>
-<%end taxincluded%>
-
-<%if not taxincluded%>
- <th colspan=5 align=right>Subtotal</th>
- <td colspan=2 align=right><%subtotal%></td>
-<%end taxincluded%>
- </tr>
-
-<%foreach tax%>
- <tr>
- <th colspan=5 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
- <td colspan=2 align=right><%tax%></td>
- </tr>
-<%end tax%>
-
- <tr>
- <td colspan=2>&nbsp;</td>
- <td colspan=5><hr noshade></td>
- </tr>
-
- <tr>
- <td colspan=3>Terms Net <b><%terms%></b> days</td>
- <th colspan=2 align=right>Total</th>
- <th colspan=2 align=right><%ordtotal%></th>
- </tr>
-<%if taxincluded%>
- <tr>
- <td colspan=3>Tax is included in Total</td>
- </tr>
-<%end taxincluded%>
-
- <tr>
- <td>&nbsp;</td>
- </tr>
-
- </table>
+ <table width=100%>
+ <tr valign=top>
+ <%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+ <%end notes%>
+ <td align=right nowrap>
+ All prices in <%currency%> Funds</b>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
-<tr>
- <td>
- <table width=100%>
- <tr valign=top>
-<%if notes%>
- <td>Notes</td>
- <td><pre><%notes%></pre></td>
-<%end notes%>
- <td align=right>
- All prices in <b><%currency%></b> Funds
- <br><%shippingpoint%>
- </td>
- </tr>
-
- </table>
- </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-
-<tr>
- <td>
- <table width=100%>
- <tr valign=top>
- <td><font size=-3>
- A 10% order cancellation fee will be applied for any special order
- products or products that have been customized, enhanced or
- upgraded at customers request.
- </font>
- </td>
- <td width=150>
- X <hr noshade>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% order cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
- </table>
- </td>
-</tr>
-
-</table>
-</td>
-</tr>
</table>
</body>
</html>
-
diff --git a/sql-ledger/templates/Default-sales_order.tex b/sql-ledger/templates/Default-sales_order.tex
index d5ac40c67..026941957 100644
--- a/sql-ledger/templates/Default-sales_order.tex
+++ b/sql-ledger/templates/Default-sales_order.tex
@@ -1,9 +1,9 @@
\documentclass[twoside]{scrartcl}
\usepackage[frame]{xy}
\usepackage{tabularx}
-\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
+\setlength{\hoffset}{-1.9cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
@@ -11,41 +11,40 @@
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
+\setlength{\textheight}{24.7cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
\begin{document}
\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
- \parbox{\textwidth}{
- \parbox[b]{12cm}{
- <%company%>
-
- <%address%>}\hfill
- \begin{tabular}[b]{rr@{}}
- Telephone & <%tel%>\\
- Facsimile & <%fax%>
- \end{tabular}
-
- \rule[1.5ex]{\textwidth}{0.5pt}
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
}
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty} use this with letterhead paper
<%pagebreak 90 27 48%>
-\end{tabular*}
+\end{tabularx}
\rule{\textwidth}{2pt}
@@ -56,50 +55,108 @@
\newpage
-\markright{<%company%>\hfill <%ordnumber%>}
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
\vspace*{-12pt}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
- \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+\begin{tabularx}{\textwidth}{@{}rlXrlrrr@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
& carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
<%end pagebreak%>
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
+\vspace*{0.5cm}
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
-\vspace{3.5cm}
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
\textbf{S A L E S} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Date} & <%orddate%> \\
- \textbf{Number} & <%ordnumber%>
-\end{tabular}
\vspace{1cm}
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
- \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
- \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrlrrr@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
<%foreach number%>
- <%number%> & <%description%> & <%qty%> &
- <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
<%end number%>
-\end{tabular*}
+\end{tabularx}
\parbox{\textwidth}{
@@ -109,35 +166,42 @@
\hfill
\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+ Subtotal & <%subtotal%> \\
<%foreach tax%>
<%taxdescription%> on <%taxbase%> & <%tax%>\\
<%end tax%>
\hline
- \textbf{Total} & \textbf{<%ordtotal%>}\\
+ Total & <%ordtotal%>\\
\end{tabularx}
\vspace{0.3cm}
+<%text_amount%> ***** <%decimal%>/100
\hfill
- All prices in \textbf{<%currency%>} funds.
+All prices in \textbf{<%currency%>}.
+
+<%if terms%>
+Terms: <%terms%> days
+<%end terms%>
\vspace{12pt}
-<%if notes%>
- <%notes%>
-<%end if%>
+<%notes%>
}
+\vfill
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+\vspace{1cm}
-\footnotetext[1]{\tiny
-A 10\% order cancellation fee will be applied for any special order products or
-products that have been customized, enhanced or upgraded at customers request.
-Items which are non-returnable are indicated above.
-}
+\centerline{\textbf{Thank You for your valued business!}}
+
+\rule{\textwidth}{0.5pt}
\end{document}
+
+
+
+
+
diff --git a/sql-ledger/templates/Default-sales_quotation.html b/sql-ledger/templates/Default-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Default-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Default-sales_quotation.tex b/sql-ledger/templates/Default-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Default-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Default-statement.html b/sql-ledger/templates/Default-statement.html
index 6fca322ee..f00ad0ebf 100644
--- a/sql-ledger/templates/Default-statement.html
+++ b/sql-ledger/templates/Default-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
@@ -62,8 +66,10 @@
<table width=100%>
<tr>
<th align=left>Invoice #</th>
- <th width=15%>Date</th>
- <th width=15%>Due</th>
+ <th align=left>Order#</th>
+<th align=left>Notes</th>
+ <th width=10%>Date</th>
+ <th width=10%>Due</th>
<th width=10%>Current</th>
<th width=10%>30</th>
<th width=10%>60</th>
@@ -72,6 +78,8 @@
<%foreach invnumber%>
<tr>
<td><%invnumber%></td>
+<td><%ordnumber%></td>
+<td><%notes%></td>
<td><%invdate%></td>
<td><%duedate%></td>
<td align=right><%c0%></td>
@@ -81,12 +89,14 @@
</tr>
<%end invnumber%>
<tr>
- <td colspan=7><hr size=1></td>
+ <td colspan=9><hr size=1></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
<th align=right><%c0total%></td>
<th align=right><%c30total%></td>
<th align=right><%c60total%></td>
@@ -116,6 +126,9 @@
<td>Please make check payable to <b><%company%></b>.
</td>
</tr>
- <tr height=20></tr>
+
</table>
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Default-statement.tex b/sql-ledger/templates/Default-statement.tex
index 0b63f7523..3edeacc2a 100644
--- a/sql-ledger/templates/Default-statement.tex
+++ b/sql-ledger/templates/Default-statement.tex
@@ -1,9 +1,11 @@
-\documentclass[twoside]{scrartcl}
+\documentclass[english,twoside]{scrartcl}
\usepackage[frame]{xy}
\usepackage{tabularx}
\usepackage[latin1]{inputenc}
+\usepackage{babel}
+\usepackage{graphicx}
\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
+\setlength{\hoffset}{-1.9cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
@@ -11,81 +13,53 @@
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
+\setlength{\textheight}{24.7cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
\begin{document}
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\pagestyle{myheadings}
+\thispagestyle{empty}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
- \parbox{\textwidth}{
- \parbox[b]{12cm}{
- <%company%>
+\vspace*{-1.3cm}
- <%address%>}\hfill
- \begin{tabular}[b]{rrr@{}}
- Tel & <%tel%>\\
- Fax & <%fax%>
- \end{tabular}
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
- \rule[1.5ex]{\textwidth}{0.5pt}
+ <%address%>
}
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
}
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty} use this with letterhead paper
-
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{1.5cm}
+
+\vspace*{0.5cm}
\parbox[t]{1cm}{\hfill}
-\parbox[t]{10.5cm}{
-
+\parbox[t]{.45\textwidth}{
<%name%>
-<%addr1%>
-
-<%addr2%>
+<%address1%>
-<%addr3%>
+<%address2%>
-<%addr4%>
+<%city%> <%state%> <%zipcode%>
+<%country%>
}
-\parbox[t]{7.5cm}{
+\parbox[t]{.45\textwidth}{
<%if customerphone%>
Tel: <%customerphone%>
<%end customerphone%>
@@ -100,38 +74,37 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+\begin{tabularx}{\textwidth}{|llXccrrrr|}
+ \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Notes} &
+ \textbf{Date} & \textbf{Due} &
\textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ \hline
<%foreach invnumber%>
- <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%invnumber%> & <%ordnumber%> & <%notes%> & <%invdate%> & <%duedate%> &
<%c0%> & <%c30%> & <%c60%> & <%c90%> \\
<%end invnumber%>
-\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
-\end{tabular*}
-\rule{\textwidth}{1pt}
+ \multicolumn{9}{|l|}{\mbox{}} \\
+ \hline
+ \textbf{Subtotal} & & & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%> \\
+ \hline
+\end{tabularx}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
-\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Total outstanding} & <%total%>
+\begin{tabularx}{.4\textwidth}{Xr@{}}
+ \textbf{Total outstanding} & \textbf{<%total%>}
\end{tabularx}
\vfill
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
+
diff --git a/sql-ledger/templates/Default-work_order.html b/sql-ledger/templates/Default-work_order.html
new file mode 100644
index 000000000..64674cdb6
--- /dev/null
+++ b/sql-ledger/templates/Default-work_order.html
@@ -0,0 +1,177 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
+
diff --git a/sql-ledger/templates/Default-work_order.tex b/sql-ledger/templates/Default-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Default-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Dutch-ap_transaction.html b/sql-ledger/templates/Dutch-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Dutch-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Dutch-ap_transaction.tex b/sql-ledger/templates/Dutch-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Dutch-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Dutch-ar_transaction.html b/sql-ledger/templates/Dutch-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Dutch-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Dutch-ar_transaction.tex b/sql-ledger/templates/Dutch-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Dutch-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Dutch-balance_sheet.html b/sql-ledger/templates/Dutch-balance_sheet.html
index 16ede7037..5eef5f52c 100644
--- a/sql-ledger/templates/Dutch-balance_sheet.html
+++ b/sql-ledger/templates/Dutch-balance_sheet.html
@@ -1,14 +1,18 @@
-<body bgcolor=ffffff>
+<body>
<h2 align=center>
<%company%>
<br><%address%>
<p>BALANS
-<br><%period%>
+<br>per <%this_period%>
</h2>
+<%if department%>
+<h4>Afdeling: <%department%></h4>
+<%end department%>
+
<table border=0>
<tr>
<th align=left width=400 colspan=2>ACTIVA<br><hr align=left width=250 size=5 noshade></th>
@@ -32,7 +36,7 @@
</tr>
<tr valign=top>
- <th align=left colspan=2>Totaal Activa</th>
+ <th align=left colspan=2>TOTAAL ACTIVA</th>
<td align=right><%total_assets_this_period%><hr noshade size=2></td>
<td align=right><%total_assets_last_period%><hr noshade size=2></td>
</tr>
@@ -64,7 +68,7 @@
</tr>
<tr>
- <th align=left colspan=4>ONVERDEELD RESULTAAT<br><hr align=left width=250 size=5 noshade></th>
+ <th align=left colspan=4>EIGEN VERMOGEN<br><hr align=left width=250 size=5 noshade></th>
</tr>
<%foreach equity_account%>
@@ -84,13 +88,13 @@
<tr valign=top>
<td></td>
- <th align=left>Totaal Opbrengst</th>
+ <th align=left>Totaal Eigen Vermogen</th>
<td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
<td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
</tr>
<tr valign=top>
- <th align=left colspan=2>TOTAAL PASSIVA & RESULTAAT</th>
+ <th align=left colspan=2>TOTAAL PASSIVA & EIGEN VERMOGEN</th>
<td align=right><%total_this_period%><br><hr noshade size=2></td>
<td align=right><%total_last_period%><br><hr noshade size=2></td>
</tr>
@@ -102,3 +106,5 @@
+
+
diff --git a/sql-ledger/templates/Dutch-bin_list.html b/sql-ledger/templates/Dutch-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Dutch-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Dutch-bin_list.tex b/sql-ledger/templates/Dutch-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Dutch-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Dutch-check.tex b/sql-ledger/templates/Dutch-check.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Dutch-check.tex
+++ b/sql-ledger/templates/Dutch-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Dutch-income_statement.html b/sql-ledger/templates/Dutch-income_statement.html
index ce4fd2462..c4c1cfb4f 100644
--- a/sql-ledger/templates/Dutch-income_statement.html
+++ b/sql-ledger/templates/Dutch-income_statement.html
@@ -1,5 +1,5 @@
-<body bgcolor=ffffff>
+<body>
<h2 align=center>
<%company%>
@@ -9,6 +9,13 @@
<br><%period%>
</h2>
+<%if department%>
+<h4>Afdeling: <%department%></h4>
+<%end department%>
+
+<%if projectnumber%>
+<h4>Project Nummer: <%projectnumber%></h4>
+<%end projectnumber%>
<table width=100% border=0>
<tr>
@@ -34,13 +41,13 @@
<tr valign=top>
<td> </td>
- <th align=left>Totaal Inkomsten</th>
+ <th align=left>TOTAAL INKOMSTEN</th>
<td align=right><%total_income_this_period%><hr noshade size=2></td>
<td align=right><%total_income_last_period%><hr noshade size=2></td>
</tr>
<tr>
- <th align=left colspan=2>ONKOSTEN<br><hr width=300 size=5 align=left noshade></th>
+ <th align=left colspan=2>UITGAVEN<br><hr width=300 size=5 align=left noshade></th>
</tr>
<%foreach expense_account%>
@@ -60,7 +67,7 @@
<tr valign=top>
<td> </td>
- <th align=left>Totaal Onkosten</th>
+ <th align=left>TOTAAL UITGAVEN</th>
<td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
<td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
</tr>
@@ -72,12 +79,3 @@
</tr>
</table>
-
-
-
-
-
-
-
-
-
diff --git a/sql-ledger/templates/Dutch-invoice.html b/sql-ledger/templates/Dutch-invoice.html
index 9dc656c88..1ebb63a4c 100644
--- a/sql-ledger/templates/Dutch-invoice.html
+++ b/sql-ledger/templates/Dutch-invoice.html
@@ -66,17 +66,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
@@ -120,6 +128,7 @@ adjust the colspan if you include this to shift subtotal one to the right
you can also use netprice instead of sellprice if you
don't want to show the discount
netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
-->
<tr>
diff --git a/sql-ledger/templates/Dutch-invoice.tex b/sql-ledger/templates/Dutch-invoice.tex
index c19d8e2cf..6cd7a8327 100644
--- a/sql-ledger/templates/Dutch-invoice.tex
+++ b/sql-ledger/templates/Dutch-invoice.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Dutch-packing_list.tex b/sql-ledger/templates/Dutch-packing_list.tex
index 84289bc33..be19440ac 100644
--- a/sql-ledger/templates/Dutch-packing_list.tex
+++ b/sql-ledger/templates/Dutch-packing_list.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
diff --git a/sql-ledger/templates/Dutch-pick_list.html b/sql-ledger/templates/Dutch-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Dutch-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Dutch-pick_list.tex b/sql-ledger/templates/Dutch-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Dutch-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Dutch-pos_invoice.txt b/sql-ledger/templates/Dutch-pos_invoice.txt
new file mode 100644
index 000000000..18de4c2de
--- /dev/null
+++ b/sql-ledger/templates/Dutch-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Kassa: <%till align=left width=3%> Telefoon: <%tel%>
+Kassier: <%username%>
+Verkoper: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Hoeveelheid Omschrijving Bedrag
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Aantal items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Bedrag : <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotaal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Bedrag : <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Wisselgeld: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Te betalen : <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Dank u en tot ziens!
+
+<%if taxincluded%>
+Belasting is in de prijs inbegrepen.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Dutch-purchase_order.html b/sql-ledger/templates/Dutch-purchase_order.html
index 0cb58d7e4..2aafc4692 100644
--- a/sql-ledger/templates/Dutch-purchase_order.html
+++ b/sql-ledger/templates/Dutch-purchase_order.html
@@ -65,10 +65,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Dutch-purchase_order.tex b/sql-ledger/templates/Dutch-purchase_order.tex
index c6c68d12c..0e6d69069 100644
--- a/sql-ledger/templates/Dutch-purchase_order.tex
+++ b/sql-ledger/templates/Dutch-purchase_order.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Dutch-receipt.tex b/sql-ledger/templates/Dutch-receipt.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Dutch-receipt.tex
+++ b/sql-ledger/templates/Dutch-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Dutch-request_quotation.html b/sql-ledger/templates/Dutch-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Dutch-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Dutch-request_quotation.tex b/sql-ledger/templates/Dutch-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Dutch-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Dutch-sales_order.html b/sql-ledger/templates/Dutch-sales_order.html
index 42b20a9c0..a94b44693 100644
--- a/sql-ledger/templates/Dutch-sales_order.html
+++ b/sql-ledger/templates/Dutch-sales_order.html
@@ -66,17 +66,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Dutch-sales_order.tex b/sql-ledger/templates/Dutch-sales_order.tex
index 79acb4d32..1dc08d400 100644
--- a/sql-ledger/templates/Dutch-sales_order.tex
+++ b/sql-ledger/templates/Dutch-sales_order.tex
@@ -73,20 +73,27 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
\textbf{V E R K O O P} \parbox{0.3cm}{\hfill} \textbf{B E S T E L L I N G}
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Datum} & <%orddate%> \\
+ \textbf{Bestel Datum} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Gewenste Leverdatum} & <%reqdate%> \\
+<%end reqdate%>
\textbf{Bestel Nummer} & <%ordnumber%>
\end{tabular}
diff --git a/sql-ledger/templates/Dutch-sales_quotation.html b/sql-ledger/templates/Dutch-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Dutch-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Dutch-sales_quotation.tex b/sql-ledger/templates/Dutch-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Dutch-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Dutch-statement.html b/sql-ledger/templates/Dutch-statement.html
index 599a2f5ca..f2a386eda 100644
--- a/sql-ledger/templates/Dutch-statement.html
+++ b/sql-ledger/templates/Dutch-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/Dutch-statement.tex b/sql-ledger/templates/Dutch-statement.tex
index 470bb1bf1..eaedd20e7 100644
--- a/sql-ledger/templates/Dutch-statement.tex
+++ b/sql-ledger/templates/Dutch-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Factuur \#} & \textbf{Datum} & \textbf{Vervaldatum} &
- \textbf{Huidig} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{O P E N S T A A N D E F A C T U R E N} \hfill
-
-\hfill <%statementdate%>
+\textbf{O P E N S T A A N D E F A C T U R E N} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -117,7 +96,7 @@ Fax: <%customerfax%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Maak U betalingen over aan <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Dutch-work_order.html b/sql-ledger/templates/Dutch-work_order.html
new file mode 100644
index 000000000..3b6b89ee9
--- /dev/null
+++ b/sql-ledger/templates/Dutch-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W E R K &nbsp;&nbsp; B O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>Voor</th>
+ <th align=left width=50%><font color=ffffff>Verzendadres</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>t.a.v. <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Nr</th>
+ <th width=17% align=left>Order Datum</th>
+ <th width=17% align=left>Gewenste Leverdatum</th>
+ <th width=17% align=left nowrap>Verkoper</th>
+ <th width=17% align=left nowrap>Verzenden vanaf</th>
+ <th width=15% align=left nowrap>Verzenden via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Omschrijving</th>
+ <th><font color=ffffff>Hoeveelheid</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serie Nr.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Dutch-work_order.tex b/sql-ledger/templates/Dutch-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Dutch-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Estonian-ap_transaction.html b/sql-ledger/templates/Estonian-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Estonian-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Estonian-ap_transaction.tex b/sql-ledger/templates/Estonian-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Estonian-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Estonian-ar_transaction.html b/sql-ledger/templates/Estonian-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Estonian-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Estonian-ar_transaction.tex b/sql-ledger/templates/Estonian-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Estonian-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Estonian-bin_list.html b/sql-ledger/templates/Estonian-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Estonian-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Estonian-bin_list.tex b/sql-ledger/templates/Estonian-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Estonian-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Estonian-check.tex b/sql-ledger/templates/Estonian-check.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Estonian-check.tex
+++ b/sql-ledger/templates/Estonian-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Estonian-invoice.html b/sql-ledger/templates/Estonian-invoice.html
index 8660fb866..7522436ce 100644
--- a/sql-ledger/templates/Estonian-invoice.html
+++ b/sql-ledger/templates/Estonian-invoice.html
@@ -56,17 +56,25 @@ tel, fax, signature, username, businessnumber -->
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
@@ -101,6 +109,7 @@ tel, fax, signature, username, businessnumber -->
you can also use netprice instead of sellprice if you
don't want to show the discount
netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
-->
<tr>
diff --git a/sql-ledger/templates/Estonian-invoice.tex b/sql-ledger/templates/Estonian-invoice.tex
index bfa2f7ad6..f54dfa4f5 100644
--- a/sql-ledger/templates/Estonian-invoice.tex
+++ b/sql-ledger/templates/Estonian-invoice.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Estonian-packing_list.tex b/sql-ledger/templates/Estonian-packing_list.tex
index 06c763a44..cdd72fc6b 100644
--- a/sql-ledger/templates/Estonian-packing_list.tex
+++ b/sql-ledger/templates/Estonian-packing_list.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
diff --git a/sql-ledger/templates/Estonian-pick_list.html b/sql-ledger/templates/Estonian-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Estonian-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Estonian-pick_list.tex b/sql-ledger/templates/Estonian-pick_list.tex
new file mode 100644
index 000000000..1300f5307
--- /dev/null
+++ b/sql-ledger/templates/Estonian-pick_list.tex
@@ -0,0 +1,143 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Estonian-pos_invoice.txt b/sql-ledger/templates/Estonian-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Estonian-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Estonian-purchase_order.html b/sql-ledger/templates/Estonian-purchase_order.html
index 7ee0073e8..4ad1c7f81 100644
--- a/sql-ledger/templates/Estonian-purchase_order.html
+++ b/sql-ledger/templates/Estonian-purchase_order.html
@@ -68,10 +68,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Estonian-purchase_order.tex b/sql-ledger/templates/Estonian-purchase_order.tex
index ee1d77871..1074982d1 100644
--- a/sql-ledger/templates/Estonian-purchase_order.tex
+++ b/sql-ledger/templates/Estonian-purchase_order.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Estonian-receipt.tex b/sql-ledger/templates/Estonian-receipt.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Estonian-receipt.tex
+++ b/sql-ledger/templates/Estonian-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Estonian-request_quotation.html b/sql-ledger/templates/Estonian-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Estonian-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Estonian-request_quotation.tex b/sql-ledger/templates/Estonian-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Estonian-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Estonian-sales_order.html b/sql-ledger/templates/Estonian-sales_order.html
index d608b730b..1c712ead7 100644
--- a/sql-ledger/templates/Estonian-sales_order.html
+++ b/sql-ledger/templates/Estonian-sales_order.html
@@ -69,17 +69,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/Estonian-sales_order.tex b/sql-ledger/templates/Estonian-sales_order.tex
index beb32c52d..605603944 100644
--- a/sql-ledger/templates/Estonian-sales_order.tex
+++ b/sql-ledger/templates/Estonian-sales_order.tex
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
@@ -87,6 +91,9 @@
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
\textbf{Kuupäev} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Tarnekuupäev} & <%reqdate%> \\
+<%end reqdate%>
\textbf{Number} & <%ordnumber%>
\end{tabular}
diff --git a/sql-ledger/templates/Estonian-statement.html b/sql-ledger/templates/Estonian-statement.html
index 6fca322ee..a5efdf019 100644
--- a/sql-ledger/templates/Estonian-statement.html
+++ b/sql-ledger/templates/Estonian-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/Estonian-statement.tex b/sql-ledger/templates/Estonian-statement.tex
index 0b63f7523..fdc7339fc 100644
--- a/sql-ledger/templates/Estonian-statement.tex
+++ b/sql-ledger/templates/Estonian-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -117,7 +96,7 @@ Fax: <%customerfax%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Estonian-work_order.html b/sql-ledger/templates/Estonian-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Estonian-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Estonian-work_order.tex b/sql-ledger/templates/Estonian-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Estonian-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/French-ap_transaction.html b/sql-ledger/templates/French-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/French-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/French-ap_transaction.tex b/sql-ledger/templates/French-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/French-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/French-ar_transaction.html b/sql-ledger/templates/French-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/French-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/French-ar_transaction.tex b/sql-ledger/templates/French-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/French-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/French-bin_list.html b/sql-ledger/templates/French-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/French-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/French-bin_list.tex b/sql-ledger/templates/French-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/French-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/French-check.tex b/sql-ledger/templates/French-check.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/French-check.tex
+++ b/sql-ledger/templates/French-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/French-invoice.html b/sql-ledger/templates/French-invoice.html
index 901a31737..69cae5650 100644
--- a/sql-ledger/templates/French-invoice.html
+++ b/sql-ledger/templates/French-invoice.html
@@ -87,17 +87,25 @@
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
@@ -142,6 +150,7 @@ ceci permettra de décaler le poste sous-total vers la gauche.
vous pouvez également utiliser netprice ŕ la place de sellprice
si vous ne voulez pas afficher la remise
netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
-->
<tr>
diff --git a/sql-ledger/templates/French-invoice.tex b/sql-ledger/templates/French-invoice.tex
index 2896fc936..828c6250c 100644
--- a/sql-ledger/templates/French-invoice.tex
+++ b/sql-ledger/templates/French-invoice.tex
@@ -45,7 +45,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -74,13 +74,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/French-packing_list.tex b/sql-ledger/templates/French-packing_list.tex
index 87113deab..d8be76c32 100644
--- a/sql-ledger/templates/French-packing_list.tex
+++ b/sql-ledger/templates/French-packing_list.tex
@@ -45,7 +45,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
diff --git a/sql-ledger/templates/French-pick_list.html b/sql-ledger/templates/French-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/French-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/French-pick_list.tex b/sql-ledger/templates/French-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/French-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/French-pos_invoice.txt b/sql-ledger/templates/French-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/French-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/French-purchase_order.html b/sql-ledger/templates/French-purchase_order.html
index a5da0ad67..29af338fc 100644
--- a/sql-ledger/templates/French-purchase_order.html
+++ b/sql-ledger/templates/French-purchase_order.html
@@ -75,10 +75,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/French-purchase_order.tex b/sql-ledger/templates/French-purchase_order.tex
index 670d59ca4..d95653dbc 100644
--- a/sql-ledger/templates/French-purchase_order.tex
+++ b/sql-ledger/templates/French-purchase_order.tex
@@ -45,7 +45,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -74,13 +74,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/French-receipt.tex b/sql-ledger/templates/French-receipt.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/French-receipt.tex
+++ b/sql-ledger/templates/French-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/French-request_quotation.html b/sql-ledger/templates/French-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/French-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/French-request_quotation.tex b/sql-ledger/templates/French-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/French-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/French-sales_order.html b/sql-ledger/templates/French-sales_order.html
index 492e75e6c..3bf0a7b59 100644
--- a/sql-ledger/templates/French-sales_order.html
+++ b/sql-ledger/templates/French-sales_order.html
@@ -76,17 +76,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/French-sales_order.tex b/sql-ledger/templates/French-sales_order.tex
index 88e142fce..ceefade72 100644
--- a/sql-ledger/templates/French-sales_order.tex
+++ b/sql-ledger/templates/French-sales_order.tex
@@ -45,7 +45,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -74,13 +74,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
@@ -88,6 +92,9 @@
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
\textbf{Date de la commande} & <%orddate%> \\
+ <%if reqdate%>
+ \textbf{Livrable le} & <%reqdate%> \\
+ <%end reqdate%>
\textbf{Numéro de commande} & <%ordnumber%>
\end{tabular}
diff --git a/sql-ledger/templates/French-sales_quotation.html b/sql-ledger/templates/French-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/French-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/French-sales_quotation.tex b/sql-ledger/templates/French-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/French-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/French-statement.html b/sql-ledger/templates/French-statement.html
index c2c9a5d07..015a8de54 100644
--- a/sql-ledger/templates/French-statement.html
+++ b/sql-ledger/templates/French-statement.html
@@ -47,10 +47,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tél&nbsp;: <%customerphone%>
diff --git a/sql-ledger/templates/French-statement.tex b/sql-ledger/templates/French-statement.tex
index 0b63f7523..fdc7339fc 100644
--- a/sql-ledger/templates/French-statement.tex
+++ b/sql-ledger/templates/French-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -117,7 +96,7 @@ Fax: <%customerfax%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/French-work_order.html b/sql-ledger/templates/French-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/French-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/French-work_order.tex b/sql-ledger/templates/French-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/French-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/German-ap_transaction.html b/sql-ledger/templates/German-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/German-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/German-ap_transaction.tex b/sql-ledger/templates/German-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/German-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/German-ar_transaction.html b/sql-ledger/templates/German-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/German-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/German-ar_transaction.tex b/sql-ledger/templates/German-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/German-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/German-bin_list.html b/sql-ledger/templates/German-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/German-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/German-bin_list.tex b/sql-ledger/templates/German-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/German-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/German-check.tex b/sql-ledger/templates/German-check.tex
index d6256e7dc..881ee374a 100644
--- a/sql-ledger/templates/German-check.tex
+++ b/sql-ledger/templates/German-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/German-invoice.html b/sql-ledger/templates/German-invoice.html
index b2128c959..d181bdae2 100644
--- a/sql-ledger/templates/German-invoice.html
+++ b/sql-ledger/templates/German-invoice.html
@@ -77,17 +77,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
@@ -131,6 +139,7 @@ adjust the colspan if you include this to shift subtotal one to the right
you can also use netprice instead of sellprice if you
don't want to show the discount
netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
-->
<tr>
diff --git a/sql-ledger/templates/German-invoice.tex b/sql-ledger/templates/German-invoice.tex
index 0b38bb51a..77c432b4e 100644
--- a/sql-ledger/templates/German-invoice.tex
+++ b/sql-ledger/templates/German-invoice.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/German-packing_list.tex b/sql-ledger/templates/German-packing_list.tex
index dbfc93b61..2ddf99b49 100644
--- a/sql-ledger/templates/German-packing_list.tex
+++ b/sql-ledger/templates/German-packing_list.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
diff --git a/sql-ledger/templates/German-pick_list.html b/sql-ledger/templates/German-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/German-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/German-pick_list.tex b/sql-ledger/templates/German-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/German-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/German-pos_invoice.txt b/sql-ledger/templates/German-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/German-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/German-purchase_order.html b/sql-ledger/templates/German-purchase_order.html
index 9771d02d9..c9cebc8c0 100644
--- a/sql-ledger/templates/German-purchase_order.html
+++ b/sql-ledger/templates/German-purchase_order.html
@@ -65,10 +65,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/German-purchase_order.tex b/sql-ledger/templates/German-purchase_order.tex
index f56f1a3bc..e1e62c29f 100644
--- a/sql-ledger/templates/German-purchase_order.tex
+++ b/sql-ledger/templates/German-purchase_order.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/German-receipt.tex b/sql-ledger/templates/German-receipt.tex
index d6256e7dc..881ee374a 100644
--- a/sql-ledger/templates/German-receipt.tex
+++ b/sql-ledger/templates/German-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/German-request_quotation.html b/sql-ledger/templates/German-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/German-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/German-request_quotation.tex b/sql-ledger/templates/German-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/German-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/German-sales_order.html b/sql-ledger/templates/German-sales_order.html
index edb8b9076..ce37fc492 100644
--- a/sql-ledger/templates/German-sales_order.html
+++ b/sql-ledger/templates/German-sales_order.html
@@ -38,7 +38,7 @@
<td align=right>
<table>
<tr>
- <th align=right>Datum</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ <th align=right>Bestelldatum</th><td width=10>&nbsp;</td><td><%orddate%></td>
</tr>
<tr>
@@ -66,17 +66,25 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
<td><%shiptoname%>
- <br><%shiptoaddr1%>
- <br><%shiptoaddr2%>
- <br><%shiptoaddr3%>
- <br><%shiptoaddr4%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
</td>
</tr>
</table>
diff --git a/sql-ledger/templates/German-sales_order.tex b/sql-ledger/templates/German-sales_order.tex
index 21948c682..98f2cc401 100644
--- a/sql-ledger/templates/German-sales_order.tex
+++ b/sql-ledger/templates/German-sales_order.tex
@@ -73,21 +73,28 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
\textbf{B E S T E L L U N G}
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Datum} & <%orddate%> \\
- \textbf{Nummer} & <%ordnumber%>
+ \textbf{Bestelldatum} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Lieferbar bei} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Bestellnummer} & <%ordnumber%>
\end{tabular}
\vspace{1cm}
diff --git a/sql-ledger/templates/German-sales_quotation.html b/sql-ledger/templates/German-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/German-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/German-sales_quotation.tex b/sql-ledger/templates/German-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/German-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/German-statement.html b/sql-ledger/templates/German-statement.html
index 6fca322ee..a5efdf019 100644
--- a/sql-ledger/templates/German-statement.html
+++ b/sql-ledger/templates/German-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/German-statement.tex b/sql-ledger/templates/German-statement.tex
index 0b63f7523..fdc7339fc 100644
--- a/sql-ledger/templates/German-statement.tex
+++ b/sql-ledger/templates/German-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -117,7 +96,7 @@ Fax: <%customerfax%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/German-work_order.html b/sql-ledger/templates/German-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/German-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/German-work_order.tex b/sql-ledger/templates/German-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/German-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Hungarian-ap_transaction.html b/sql-ledger/templates/Hungarian-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-ap_transaction.tex b/sql-ledger/templates/Hungarian-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-ar_transaction.html b/sql-ledger/templates/Hungarian-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-ar_transaction.tex b/sql-ledger/templates/Hungarian-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-balance_sheet.html b/sql-ledger/templates/Hungarian-balance_sheet.html
new file mode 100644
index 000000000..b3efde2ce
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-balance_sheet.html
@@ -0,0 +1,100 @@
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>MÉRLEG
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>ESZKÖZÖK<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>Eszközök összesen</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+<tr>
+ <th align=left colspan=4>SAJÁT TŐKE<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Tőke összesen</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>KÖTELEZETTSÉGEK<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Kötelezettségek összesen</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+
+<tr valign=top>
+ <th align=left colspan=2>KÖTELEZETTSÉGEK & TŐKE ÖSSZESEN</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+
+
+
diff --git a/sql-ledger/templates/Hungarian-bin_list.html b/sql-ledger/templates/Hungarian-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Hungarian-bin_list.tex b/sql-ledger/templates/Hungarian-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-check.tex b/sql-ledger/templates/Hungarian-check.tex
new file mode 100644
index 000000000..08c95c3d0
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-check.tex
@@ -0,0 +1,81 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin2]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{1.8cm}
+
+<%notes%>
+
+\vspace{0.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Számlaszám} & \textbf{Telj. dátuma}
+ & \textbf{Esedékes} & \textbf{Kifizetett} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
+
+
diff --git a/sql-ledger/templates/Hungarian-income_statement.html b/sql-ledger/templates/Hungarian-income_statement.html
new file mode 100644
index 000000000..e9e4a45d7
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-income_statement.html
@@ -0,0 +1,82 @@
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>EREDMÉNYKIMUTATÁS
+<br><%period%>
+</h2>
+
+
+<table width=100% border=0>
+<tr>
+ <th width=400 align=left colspan=2>BEVÉTELEK<br><hr width=300 size=5 align=left noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach income_account%>
+<tr>
+ <td width=4> </td>
+ <td><%income_account%></td>
+ <td align=right><%income_this_period%></td>
+ <td align=right><%income_last_period%></td>
+</tr>
+<%end income_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Bevételek összesen</th>
+ <td align=right><%total_income_this_period%><hr noshade size=2></td>
+ <td align=right><%total_income_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=2><br><hr width=300 size=5 align=left noshade>RÁFORDÍTÁSOK</th>
+</tr>
+
+<%foreach expense_account%>
+<tr>
+ <td> </td>
+ <td><%expense_account%></td>
+ <td align=right><%expenses_this_period%></td>
+ <td align=right><%expenses_last_period%></td>
+</tr>
+<%end expense_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Ráfordítások összesen</th>
+ <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>NYERESÉG / (VESZTESÉG)</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+
+</table>
+
+
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Hungarian-invoice.html b/sql-ledger/templates/Hungarian-invoice.html
new file mode 100644
index 000000000..a7a7198cf
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-invoice.html
@@ -0,0 +1,303 @@
+
+<body bgcolor=ffffff>
+
+<table width=100% >
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100% >
+ <tr>
+ <td align=center><!--<img src=logo.jpg>--><br>&nbsp;<br>
+ <font size=3><B> SZÁMLA</B></font>
+ </td>
+ </tr>
+
+ <tr>
+ <td align=right>
+ <!-- <%copysum%> -->
+ </td>
+ </tr>
+ <tr>
+ <td align=right>
+ Másolat
+ </td>
+ </tr>
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0 >
+<tr>
+ <td><hr noshade></td>
+</tr>
+
+ <tr>
+ <td>
+ <table width=100% >
+ <tr >
+ <th align=left width=50%>Eladó:</th>
+ <th align=left width=50%>Vevő:</th>
+ </tr>
+ <tr valign=top>
+ <td><%company%>
+ <br><%address%>
+ <br>Adószám:<%businessnumber%>
+ <br>tel:<%tel%>
+ <br>fax:<%fax%>
+ </td>
+
+
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+<tr>
+ <td><hr noshade></td>
+</tr>
+
+<tr>
+<td>
+ <table width=100%>
+ <tr>
+ <th>Fizetési mód</th>
+ <th>Telj. dátuma</th>
+ <th>Számla kelte</th>
+ <th>Esedékesség</th>
+ <th>Megrendelés</th>
+ <th>Kiállította</th>
+ <th>Sorszám</th>
+ </tr>
+ <tr>
+ <td align=center><%shippingpoint%></td>
+ <td align=center><%invdate%></td>
+ <td align=center><%crdate%></td>
+ <td align=center><%duedate%></td>
+ <td align=center><%ordnumber%></td>
+ <td align=center><%employee%></td>
+ <td align=center><font size=2><%invnumber%></font></td>
+ </tr>
+ </table>
+<td>
+<tr>
+<tr>
+ <td><hr noshade></td>
+</tr>
+
+ <tr >
+ <td height=470 valign=top>
+ <table width=100% >
+ <tr>
+ <th align=right>&nbsp;</th>
+ <th align=left>Áru</th>
+ <th align=left>Megnevezés</th>
+ <th align=left nowrap>VTSZ</th>
+ <th>Menny.</th>
+ <th>&nbsp;</th>
+ <th align=right>Nettó egységár</th>
+<!-- <th><font color=ffffff>Disc</th> -->
+ <th align=right>Nettó összeg</th>
+ <th align=right>ÁFA%</th>
+ <th align=right>ÁFA összeg</th>
+ <th align=right>Bruttó összeg</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=center><%runningnumber%>.</td>
+ <td nowrap align=left><%number%></td>
+ <td nowrap align=left><%description%></td>
+ <td nowrap align=center><%bin%></td>
+ <td align=center><%qty%></td>
+ <td align=center><%unit%></td>
+ <td align=right><%netprice%></td>
+<!-- <td align=right><%discount%></td> -->
+ <td align=right><%linetotal%></td>
+ <td align=right><%linetaxrate%></td>
+ <td align=right><%taxamount%></td>
+ <td align=right><%linetotal2%></td>
+ </tr>
+<%end number%>
+
+<!--
+you can also use netprice instead of sellprice if you
+don't want to show the discount
+netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
+-->
+
+ <tr>
+ <td colspan=11><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=9 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+<%if not taxincluded%>
+ <th colspan=9 align=right>Nettó összesen</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=9 align=right>alap: <%taxbase%> ráta: <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<%if paid%>
+ <tr>
+ <th colspan=9 align=right>Fizetve</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td colspan=6>&nbsp;</td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+<!-- <td colspan=6>Fizetési határidő: <b><%terms%></b> nap</td> -->
+ <th colspan=9 align=right>A számla végösszege:</th>
+ <th colspan=2 align=right><%total%>&nbsp;Ft</th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100% >
+ <tr valign=top>
+<%if notes%>
+ <td><b>Megjegyzés:</b>&nbsp;<%notes%></td>
+ <td ></td>
+<%end notes%>
+ <td align=right>
+<!-- All prices in <b><%currency%></b> Funds -->
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<%if paid%>
+<tr>
+ <td colspan=7>
+ <table width=60% >
+ <tr>
+ <th align=left>Fizetések</th>
+ </tr>
+ <tr>
+ <td colspan=4>
+ <hr noshade>
+ </td>
+ </tr>
+ <tr>
+ <th align=left>Dátum</th>
+ <th align=left>Számla</th>
+ <th align=left>Bizonylatszám</th>
+ <th align=left>Összeg</th>
+ </tr>
+<%end paid%>
+
+<%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%payment%></td>
+ </tr>
+<%end payment%>
+
+<%if paid%>
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>&nbsp;</td>
+</tr>
+<%end paid%>
+
+<tr>
+ <th colspan=7>
+<!-- <br>Thank you for your valued business! -->
+ </th>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100% >
+ <tr valign=top>
+ <td><font size=-3>
+<%intnotes%>
+ </font>
+
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<%foreach tax%>
+ <tr>
+<!-- <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th> -->
+ </tr>
+<%end tax%>
+
+<%if taxincluded%>
+ <tr>
+ <th colspan=7 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+<%end taxincluded%>
+
+
+
+
+<!-- banking information
+ <tr>
+ <th colspan=7 align=left>Banking Information:
+ <br>Bank
+ <br>Transit No.
+ <br>Account No.
+ </td>
+ </tr>
+-->
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-invoice.tex b/sql-ledger/templates/Hungarian-invoice.tex
new file mode 100644
index 000000000..09878b05a
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-invoice.tex
@@ -0,0 +1,280 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %%%
+%%% Szamla - LaTeX sablon v. 1.01 %%%
+%%% Kovacs Laszlo -- lakovacs@inf.unideb.hu %%%
+%%% %%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%
+%%% 2003.10.31.
+%%%
+%%%
+
+
+\documentclass[twoside]{article}
+%\documentclass[twoside]{scrartcl}
+% \usepackage[frame]{xy}
+\usepackage{tabularx}
+%\usepackage{graphicx}
+\usepackage[latin2]{inputenc}
+
+
+
+\setlength{\voffset}{-0.5cm}
+\setlength{\hoffset}{-2.5cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+
+\newcommand{\PAR}[1]{\texttt{\upshape <\%#1\%>}\typeout{#1}}
+
+
+\begin{document}
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+
+\newsavebox{\headright}
+\sbox{\headright}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+ \parbox{\textwidth}{
+ \begin{center}
+% \includegraphics[scale=1.0]{/tmp/logo_04.eps} \\[.3cm]
+ {\large\bfseries SZÁMLA} \\
+ \end{center}
+
+ \mbox{}\hfill <%copysum%> \\
+ \mbox{}\hfill <%copynumber%>
+ }
+}
+
+\newsavebox{\headleft}
+\sbox{\headleft}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+ \parbox{\textwidth}{
+% \includegraphics[scale=.5]{/tmp/logo_04.eps}
+ \hfill <%invnumber%>\\[-3mm]
+ \rule{\textwidth}{.5pt}
+ }
+}
+
+
+
+\markboth{}{\usebox{\headright}}
+
+\pagestyle{myheadings}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\fontshape{n}\selectfont
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+}
+
+\rule{\textwidth}{1.5pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{X@{ }r@{}}
+ \textbf{Részösszeg} & <%sumcarriedforward%> \cr
+ \end{tabularx}
+
+\newpage
+
+\markboth{\usebox{\headleft}}{\usebox{\headleft}}
+
+\mbox{}\vspace{.5cm}
+
+\rule{\textwidth}{1.5pt}
+
+\vspace{.3cm}
+
+{\scriptsize
+\begin{tabularx}{\textwidth}{>{\hsize=0.4cm\centering}X@{\ }
+ >{\hsize=0.9cm\raggedleft}X@{\ }
+ >{\hsize=1.9cm\raggedleft}X@{\ }
+ >{\hsize=2.9cm\raggedleft}X@{\ }
+ >{\hsize=1.9cm\centering}X@{\ }
+ >{\hsize=0.9cm\centering}X@{\ }
+ >{\hsize=0.5cm\centering}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{\ }
+ >{\hsize=0.8cm\raggedleft}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{}
+ }
+ \textbf{no} & \textbf{Márka} & \textbf{Áru} & \centering\textbf{Megnevezés} &
+ \textbf{VTSZ} & \textbf{Menny.} & \textbf{u} &
+ \textbf{Nettó egységár} & \textbf{Nettó összeg} & \textbf{ÁFA\%} &
+ \textbf{ÁFA összeg} & \textbf{Bruttó összeg}
+ \cr
+ & & \textbf{előző oldalról} &
+ & & &
+ & & &
+ & & <%sumcarriedforward%>
+ \cr
+<%end pagebreak%>
+
+\mbox{}\vspace{3.5cm}
+
+\rule{\textwidth}{1.5pt}
+
+\vspace{3mm}
+
+\hbox to\hsize{
+\begin{minipage}[t]{9.5cm}
+\textbf{Eladó:} \\
+<%company%>\\
+<%address%>\\
+Adószám: <%businessnumber%>\\
+tel: <%tel%>\\
+fax: <%fax%>
+\end{minipage}
+\hfill \
+\begin{minipage}[t]{9.5cm}
+\textbf{Vevő:} \\
+<%name%>\\
+<%address1%>\\
+<%if address2%>
+<%address2%>
+<%end address2%>\\
+<%city%> <%state%> <%zipcode%>\\
+<%if country%>
+<%country%>
+<%end country%>
+\end{minipage}
+}
+
+
+\vspace{5mm}
+
+\rule{\textwidth}{1.5pt}
+
+\vspace{3mm}
+
+\hspace{-3mm}
+\begin{tabularx}{\textwidth}{>{\hsize=2.1cm\centering}X@{\ }
+ >{\hsize=2.8cm\centering}X@{\ }
+ >{\hsize=2.8cm\centering}X@{\ }
+ >{\hsize=2.8cm\centering}X@{\ }
+ >{\hsize=3.4cm\centering}X@{\ }
+ >{\hsize=2.5cm\centering}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{}}
+ \textbf{Fizetési mód} & \textbf{Telj.~dátuma} & \textbf{Számla kelte} &
+ \textbf{Esedékesség} & \textbf{Megrendelés} & \textbf{Kiállította} & \textbf{Sorszám}
+ \cr
+ <%shippingpoint%> & <%invdate%> & <%crdate%> &
+ <%duedate%> & <%ordnumber%> & <%employee%> & <%invnumber%>
+\end{tabularx}
+
+
+\vspace{5mm}
+
+\rule{\textwidth}{1.5pt}
+
+\vspace{3mm}
+
+\hspace{-3mm}
+{\scriptsize
+\begin{tabularx}{\textwidth}{>{\hsize=0.4cm\centering}X@{\ }
+ >{\hsize=0.9cm\raggedright}X@{\ }
+ >{\hsize=1.9cm\raggedright}X@{\ }
+ >{\hsize=2.9cm\raggedright}X@{\ }
+ >{\hsize=1.9cm\centering}X@{\ }
+ >{\hsize=0.9cm\raggedleft}X@{\ }
+ >{\hsize=0.5cm\centering}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{\ }
+ >{\hsize=0.8cm\raggedleft}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{\ }
+ >{\hsize=2.0cm\raggedleft}X@{}
+ }
+ \centering\textbf{sz.} & \raggedright\textbf{Márka} & \raggedright\textbf{Áru} & \raggedright\textbf{Megnevezés} &
+ \centering\textbf{VTSZ} & \raggedleft\textbf{Menny.} & \centering\textbf{egys.} &
+ \raggedleft\textbf{Nettó egységár} & \raggedleft\textbf{Nettó összeg} & \raggedright\textbf{ÁFA\%} &
+ \raggedleft\textbf{ÁFA összeg} & \raggedleft\textbf{Bruttó összeg}
+ \cr
+<%foreach number%>
+ <%runningnumber%> & <%partsgroup%> & <%number%> & <%description%> &
+ <%bin%> & <%qty%> & <%unit%> &
+ <%netprice%> & <%linetotal%> & <%linetaxrate%> &
+ <%taxamount%> & <%linetotal2%>
+ \cr
+<%end number%>
+\end{tabularx}
+}
+
+\rule{\textwidth}{1.5pt}
+
+\hbox to\hsize{
+\hspace{8.4cm}
+\begin{minipage}[t]{11cm}
+
+\rule{10.6cm}{1.5pt}
+
+\vspace{.2cm}
+
+\begin{tabularx}{10cm}{>{\hsize=7cm\raggedleft}X>{\hsize=3cm\raggedleft}X}
+%\textbf{Total} & <%invtotal%> \cr
+\textbf{Nettó összesen} & <%subtotal%> \cr
+<%foreach tax%>
+\textbf{Alap:} <%taxbase%> \textbf{ráta:} <%taxrate%> & <%tax%> \cr
+<%end tax%>
+<%if paid%>
+\textbf{Fizetve:} & -<%paid%>
+<%end paid%>
+\end{tabularx}
+
+\rule{10.6cm}{1.5pt}
+\begin{tabularx}{10cm}{>{\hsize=7cm\raggedleft}X>{\hsize=3cm\raggedleft}X}
+\textbf{A számla végösszege} & <%total%> \textbf{Ft}
+\end{tabularx}
+
+\end{minipage}
+}
+
+
+\vfill
+\vspace{1cm}
+<%if notes%>
+\textbf{Megjegyzés:} <%notes%>
+\vspace{1cm}
+<%end if%>
+
+
+<%if paid%>
+\textbf{Fizetések:}
+
+\rule{12cm}{1.5pt}
+
+\vspace{.2cm}
+
+\begin{tabularx}{12cm}{@{}>{\hsize=2.9cm\centering}X@{\ }
+ >{\hsize=2.9cm\centering}X@{\ }
+ >{\hsize=2.9cm\centering}X@{\ }
+ >{\hsize=2.9cm\raggedleft}X@{}}
+ \textbf{Dátum} & \textbf{Számla} & \textbf{Bizonylatszám} & \textbf{Összeg}
+ \cr
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%>
+ \cr
+<%end payment%>
+<%if paid%>
+\end{tabularx}
+<%end paid%>
+
+\vspace{1cm}
+
+<%intnotes%>
+
+\end{document}
+
+
+
diff --git a/sql-ledger/templates/Hungarian-packing_list.html b/sql-ledger/templates/Hungarian-packing_list.html
new file mode 100644
index 000000000..f3cf6b4e8
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-packing_list.html
@@ -0,0 +1,148 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=left>SZÁLLÍTÓLEVÉL</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Dátum</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Szám</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Szállítási cím:</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptoaddr1%>
+ <br><%shiptoaddr2%>
+ <br><%shiptoaddr3%>
+ <br><%shiptoaddr4%>
+<%if shiptocontact%>
+ <p>Kapcsolattartó: <%shiptocontact%>
+<%end shiptocontact%>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Szám</th>
+ <th align=left><font color=ffffff>Szöveges leírás</th>
+ <th align=right><font color=ffffff>Menny.</th>
+ <th>&nbsp;</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Megjegyzés</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ <%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ A visszaszállított áruk után 10 % újraraktározási
+ díjat kell fizetni. Engedélyt a visszaszállításra csak
+ a <%company%> adhat ki. A visszárut csak előre kifizetve és biztosítva
+ lehet visszaszállítani. <%company%> nem tehető felelőssé a visszaszállítás
+ során keletkezett kárért.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-packing_list.tex b/sql-ledger/templates/Hungarian-packing_list.tex
new file mode 100644
index 000000000..506b2428e
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-packing_list.tex
@@ -0,0 +1,122 @@
+\documentclass[twoside]{article}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin2]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Szám} & \textbf{Szöveges leírás} & \textbf{Menny.} &
+ \textbf{egys.} & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptoaddr1%>
+
+<%shiptoaddr2%>
+
+<%shiptoaddr3%>
+
+<%shiptoaddr4%>
+
+\vspace{3.5cm}
+
+\textbf{S Z Á L L I T Ó} \parbox{0.3cm}{\hfill} \textbf{L E V É L}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Dátum} & <%invdate%> \\
+ \textbf{Szám} & <%invnumber%> \\
+ \textbf{Vevő} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Szám} & \textbf{Szöveges leírás} & \textbf{Menny.} &
+ \textbf{egys.} & \textbf{Bin} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+\centerline{\textbf{Köszönjük az együttműködést!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+A visszaszállított áruk után 10\% újraraktározási díjat kell fizetni.
+Engedélyt a visszaszállításra csak a <%company%> adhat ki. A visszárut
+csak előre kifizetve és biztosítva lehet visszaszállítani. <%company%>
+nem tehető felelőssé a visszaszállítás során keletkezett kárért.
+}
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-pick_list.html b/sql-ledger/templates/Hungarian-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Hungarian-pick_list.tex b/sql-ledger/templates/Hungarian-pick_list.tex
new file mode 100644
index 000000000..fc331fae8
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-pick_list.tex
@@ -0,0 +1,143 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabular*}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-pos_invoice.txt b/sql-ledger/templates/Hungarian-pos_invoice.txt
new file mode 100644
index 000000000..bbca9a072
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-pos_invoice.txt
@@ -0,0 +1,48 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Kassza: <%till align=left width=3%> Telefon#: <%tel%>
+ Eladó: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+Menny Név Összeg
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+ Tételszám: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Bruttó: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Nettó: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Bruttó: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Visszajáró: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Fizetendő: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Engedmény levonva
+<%end discount%>
+
+ Köszönjük a vásárlást!
+
+<%if taxincluded%>
+A végösszeg bruttóban értendő
+<%end taxincluded%>
+
+
diff --git a/sql-ledger/templates/Hungarian-purchase_order.html b/sql-ledger/templates/Hungarian-purchase_order.html
new file mode 100644
index 000000000..2f95eb736
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-purchase_order.html
@@ -0,0 +1,230 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>BESZERZÉSI &nbsp;&nbsp; RENDELÉS</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Rendelés dátuma</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Leszállítás</th><td width=10>&nbsp;</td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Szám</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>Szállító:</th>
+ <th align=left width=50%><font color=ffffff>Szállítási cím:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+
+<br>
+<%if contact%>
+<br>Kapcsolattartó: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+<br>
+<%if shiptocontact%>
+<br>Kapcsolattartó: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Szám</th>
+ <th align=left><font color=ffffff>Szöveges leírás</th>
+ <th align=right><font color=ffffff>Menny</th>
+ <th>&nbsp;</th>
+ <th align=right><font color=ffffff>Ár</th>
+ <th align=right><font color=ffffff>Összeg</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right> Nettó összeg</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%>alap: <%taxbase%> ráta: <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>Határidő <b><%terms%></b> nap</td>
+ <th colspan=2 align=right> Bruttó összeg</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Megjegyzés</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+<!-- Az árak <b><%currency%></b>-ban vannak meghatározva-->
+ Az árak Forintban értendők
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+<!--
+További megjegyzések
+-->
+
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-purchase_order.tex b/sql-ledger/templates/Hungarian-purchase_order.tex
new file mode 100644
index 000000000..7b59e756a
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-purchase_order.tex
@@ -0,0 +1,206 @@
+\documentclass[twoside]{article}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin2]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Részösszeg} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Szám} & \textbf{Szöveges leírás} & \textbf{Menny.} &
+ \textbf{egys.} & \textbf{Ár} & \textbf{Összeg} \\
+ & folytatás az előző oldalról: <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+\textbf{Szállító}
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+Kapcsolattartó: <%contact%>
+\vspace{0.3cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Szállítási cím}
+\vspace{0.3cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Szállítási kapcsolattartó: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B E S Z E R Z É S I} \parbox{0.3cm}{\hfill} \textbf{R E N D E L É S}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Dátum} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Leszállítás} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Szám} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Szám} & \textbf{Szöveges leírás} & \textbf{Menny.} &
+ \textbf{egys.} & \textbf{Ár} & \textbf{Összeg} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{9cm}{Xr@{}}
+ \textbf{Nettó összeg} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> alap <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Bruttó összeg} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ % All prices in \textbf{<%currency%>} funds.
+Az árak Forintban értendők
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Hungarian-receipt.tex b/sql-ledger/templates/Hungarian-receipt.tex
new file mode 100644
index 000000000..a77e595ef
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-receipt.tex
@@ -0,0 +1,78 @@
+\documentclass[twoside]{article}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin2]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{1.8cm}
+
+<%notes%>
+
+\vspace{0.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Számlaszám} & \textbf{Telj. dátuma}
+ & \textbf{Esedékes} & \textbf{Kifizetett} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
diff --git a/sql-ledger/templates/Hungarian-request_quotation.html b/sql-ledger/templates/Hungarian-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-request_quotation.tex b/sql-ledger/templates/Hungarian-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-sales_order.html b/sql-ledger/templates/Hungarian-sales_order.html
new file mode 100644
index 000000000..ff518a111
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-sales_order.html
@@ -0,0 +1,221 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>VEVŐRENDELÉS</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Rendelés dátuma</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Leszállítás</th><td width=10>&nbsp;</td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Szám</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Vevő:</th>
+ <th align=left><font color=ffffff>Szállítási cím:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Szám</th>
+ <th align=left><font color=ffffff>Szöveges leírás</th>
+ <th align=right><font color=ffffff>Menny</th>
+ <th>&nbsp;</th>
+ <th align=right><font color=ffffff>Ár</th>
+ <th align=right><font color=ffffff>Engedmény</th>
+ <th align right><font color=ffffff>Összeg</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=5 align=right>Bruttó összeg</th>
+ <td colspan=2 align=right><%ordtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=5 align=right>Nettó összeg</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> alap <%taxbase%> ráta: <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2>&nbsp;</td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Fizetési határidő: <b><%terms%></b> nap</td>
+ <th colspan=2 align=right>Bruttó összeg</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+<%if taxincluded%>
+ <tr>
+ <td colspan=3>A végösszeg tartalmazza az adó összegét</td>
+ </tr>
+<%end taxincluded%>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Megjegyzés</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+<!-- All prices in <b><%currency%></b> Funds -->
+ Az árak Forintban értendők
+ <br><!--<%shippingpoint%>-->
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+<!-- A 10% order cancellation fee will be applied for any special order
+ products or products that have been customized, enhanced or
+ upgraded at customers request. -->
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-sales_order.tex b/sql-ledger/templates/Hungarian-sales_order.tex
new file mode 100644
index 000000000..7f536f4a3
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-sales_order.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{article}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin2]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Részösszeg} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Szám} & \textbf{Szöveges leírás} & \textbf{Menny.} &
+ \textbf{egys.} & \textbf{Ár} & \textbf{Engedmény} & \textbf{Összeg} \\
+ & folytatás az előző oldalról: <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{3.5cm}
+
+\textbf{V E V Ő} \parbox{0.3cm}{\hfill} \textbf{R E N D E L É S}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Rendelés dátuma} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Leszállítás} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Szám} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Szám} & \textbf{Szöveges leírás} & \textbf{Menny.} &
+ \textbf{egys.} & \textbf{Ár} & \textbf{Engedmény} & \textbf{Összeg} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{9cm}{Xr@{}}
+ \textbf{Nettó összeg} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> alap <%taxbase%> <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Bruttó összeg} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+% All prices in \textbf{<%currency%>} funds.
+Az árak Forintban értendők
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-sales_quotation.html b/sql-ledger/templates/Hungarian-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-sales_quotation.tex b/sql-ledger/templates/Hungarian-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Hungarian-statement.html b/sql-ledger/templates/Hungarian-statement.html
new file mode 100644
index 000000000..20945a3a7
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-statement.html
@@ -0,0 +1,125 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>K I M U T A T Á S</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ <br>
+<%if customerphone%>
+ <br>Tel: <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Fax: <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Számla #</th>
+ <th width=15% align=left>Dátum</th>
+ <th width=15% align=left>Esedékesség</th>
+ <th width=10% align=right>0-30</th>
+ <th width=10% align=right>30</th>
+ <th width=10% align=right>60</th>
+ <th width=10% align=right>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td align=left><%invnumber%></td>
+ <td align=left><%invdate%></td>
+ <td align=left><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Nyitott tételek összesen:</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><hr noshade></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>Kérjük a fizetendő összeget a <b><%company%></b> bankszámlájára átutalni szíveskedjenek.
+ </td>
+ </tr>
+ <tr height=20></tr>
+</table>
+
diff --git a/sql-ledger/templates/Hungarian-statement.tex b/sql-ledger/templates/Hungarian-statement.tex
new file mode 100644
index 000000000..fb685e17a
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-statement.tex
@@ -0,0 +1,141 @@
+\documentclass[twoside]{article}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin2]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Részösszeg} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%statementdate%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Számla \#} & \textbf{Dátum} & \textbf{Esedékesség} &
+ \textbf{0-30} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ folytatás az előző oldalról: <%lastpage%> & & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{K I M U T A T Á S} \hfill
+
+\hfill <%statementdate%>
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Számla \#} & \textbf{Dátum} & \textbf{Esedékesség} &
+ \textbf{Nem lejárt} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Összesen} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{1cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Nyitott tételek összesen} & <%total%>
+\end{tabularx}
+
+\vfill
+
+Kérjük a fizetendő összeget a <%company%> bankszámlájára átutalni szíveskedjenek.
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Hungarian-work_order.html b/sql-ledger/templates/Hungarian-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Hungarian-work_order.tex b/sql-ledger/templates/Hungarian-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Hungarian-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Italian-ap_transaction.html b/sql-ledger/templates/Italian-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Italian-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-ap_transaction.tex b/sql-ledger/templates/Italian-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Italian-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-ar_transaction.html b/sql-ledger/templates/Italian-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Italian-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-ar_transaction.tex b/sql-ledger/templates/Italian-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Italian-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-balance_sheet.html b/sql-ledger/templates/Italian-balance_sheet.html
new file mode 100644
index 000000000..d7ea69bee
--- /dev/null
+++ b/sql-ledger/templates/Italian-balance_sheet.html
@@ -0,0 +1,103 @@
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>STATO PATRIMONIALE
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>ATTIVITA'<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTALE ATTIVITA</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>PASSIVITA'<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Totale Passivita'</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>CAPITALE NETTO<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Totale Capitale Netto</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTALE PASSIVITA'</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Italian-bin_list.html b/sql-ledger/templates/Italian-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Italian-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Italian-bin_list.tex b/sql-ledger/templates/Italian-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Italian-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-check.tex b/sql-ledger/templates/Italian-check.tex
new file mode 100644
index 000000000..a5c06aa6e
--- /dev/null
+++ b/sql-ledger/templates/Italian-check.tex
@@ -0,0 +1,81 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{1.8cm}
+
+<%notes%>
+
+\vspace{0.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Fattura Numero} & \textbf{Data Fattura}
+ & \textbf{Dovuto} & \textbf{Applicato} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
+
+
diff --git a/sql-ledger/templates/Italian-income_statement.html b/sql-ledger/templates/Italian-income_statement.html
new file mode 100644
index 000000000..557710102
--- /dev/null
+++ b/sql-ledger/templates/Italian-income_statement.html
@@ -0,0 +1,78 @@
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>CONTO ECONOMICO
+<br><%period%>
+</h2>
+
+
+<table width=100% border=0>
+<tr>
+ <th width=400 align=left colspan=2>RICAVI<br><hr width=300 size=5 align=left noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach income_account%>
+<tr>
+ <td width=4> </td>
+ <td><%income_account%></td>
+ <td align=right><%income_this_period%></td>
+ <td align=right><%income_last_period%></td>
+</tr>
+<%end income_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Totale Ricavi</th>
+ <td align=right><%total_income_this_period%><hr noshade size=2></td>
+ <td align=right><%total_income_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=2>COSTI<br><hr width=300 size=5 align=left noshade></th>
+</tr>
+
+<%foreach expense_account%>
+<tr>
+ <td> </td>
+ <td><%expense_account%></td>
+ <td align=right><%expenses_this_period%></td>
+ <td align=right><%expenses_last_period%></td>
+</tr>
+<%end expense_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Totale Costi</th>
+ <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>UTILE / (PERDITA)</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+
+</table>
+
+
+
+
diff --git a/sql-ledger/templates/Italian-invoice.html b/sql-ledger/templates/Italian-invoice.html
new file mode 100644
index 000000000..3fd6e3dc8
--- /dev/null
+++ b/sql-ledger/templates/Italian-invoice.html
@@ -0,0 +1,209 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>FATTURA</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Data fattura</th><td width=10>&nbsp;</td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Scadenza</th><td width=10>&nbsp;</td><td><%duedate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Numero fattura</th><td>&nbsp;</td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Sede legale:</th>
+ <th align=left><font color=ffffff>Inviare fattura a:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Numero</th>
+ <th align=left><font color=ffffff>Descrizione</th>
+ <th><font color=ffffff>Quantit&agrave;</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Prezzo</th>
+ <th><font color=ffffff>Sconto</th>
+ <th><font color=ffffff>Totale riga</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+<!--
+you can also use netprice instead of sellprice if you
+don't want to show the discount
+netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
+-->
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=5 align=right>Totale righe</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%>: <%taxrate%>% su <%taxbase%></th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<%if paid%>
+ <tr>
+ <th colspan=5 align=right>Importo gi&agrave; pagato</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td colspan=3>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Scadenza a <b><%terms%></b> giorni data fattura.</td>
+ <th colspan=2 align=right>Totale da pagare</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>Note</td>
+ <td><%notes%></td>
+ <td align=right>
+ I prezzi sono espressi in valuta <b><%currency%></b>.
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ Per i pagamenti successivi alla scadenza della fattura sar&agrave;
+ addebitato l'interesse legale, aumentato di due punti percentuali, fino al
+ pagamento completo.
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
diff --git a/sql-ledger/templates/Italian-invoice.tex b/sql-ledger/templates/Italian-invoice.tex
new file mode 100644
index 000000000..6d3cb106a
--- /dev/null
+++ b/sql-ledger/templates/Italian-invoice.tex
@@ -0,0 +1,236 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{18cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Totale riga} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Codice} & \textbf{Descrizione} & \textbf{Quantita'} &
+ \textbf{Unita'} & \textbf{Prezzo} & \textbf{Sc.} & \textbf{Totale righe} \\
+ & carried forward from page <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+ \parbox[t]{10.5cm}{
+ \textbf{Sede legale:}
+ \vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{0.3cm}
+
+%<%if contact%>
+%Attn: <%contact%>
+%\vspace{0.3cm}
+%<%end contact%>
+\vspace{0.5cm}
+
+<%if customerphone%>
+Telefono: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Inviare fatttura a:}
+\vspace{0.5cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+\vspace{0.3cm}
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Attn: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{FATTURA}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Data fattura} & <%invdate%> \\
+ \textbf{Numero fattura} & <%invnumber%> \\
+ \textbf{Ordine} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Codice} & \textbf{Descrizione} & \textbf{Qt\`a} &
+ \textbf{Un.} & \textbf{Prezzo} & \textbf{Sc.} & \textbf{Tot. riga} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Totale righe} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%>: <%taxrate%>\% & <%tax%>\\
+<%end tax%>
+<%if paid%>
+ \textbf{Pagato} & - <%paid%> \\
+<%end paid%>
+ \hline
+ \textbf{Totale da pagare} & \textbf{<%total%>} \\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Tutti i prezzi sono espressi in valuta \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+<%if paid%>
+\begin{tabularx}{10cm}{@{}lXlr@{}}
+ \textbf{Pagamenti} & & & \\
+ \hline
+ \textbf{Data} & \textbf{Conto} & \textbf{Documento di riferimento} & \textbf{Importo} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabularx}
+<%end paid%>
+
+\vspace{1cm}
+
+%\centerline{\textbf{Grazie per averci scelto!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Per i pagamenti successivi alla scadenza della fattura sara'
+addebitato l'interesse legale, aumentato di due punti percentuali, fino al
+pagamento completo.
+}
+
+\end{document}
+
+
+
diff --git a/sql-ledger/templates/Italian-packing_list.html b/sql-ledger/templates/Italian-packing_list.html
new file mode 100644
index 000000000..4a451d824
--- /dev/null
+++ b/sql-ledger/templates/Italian-packing_list.html
@@ -0,0 +1,126 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>L I S T A &nbsp;&nbsp; E T I C H E T T E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Data</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Numero</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Inviare a:</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptoaddr1%>
+ <br><%shiptoaddr2%>
+ <br><%shiptoaddr3%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Numero</th>
+ <th align=left><font color=ffffff>Descrizione</th>
+ <th><font color=ffffff>Quantit&agrave;</th>
+ <th>&nbsp;</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>Note</td>
+ <td><%notes%></td>
+ <td align=right>
+ <%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+
+
+
diff --git a/sql-ledger/templates/Italian-packing_list.tex b/sql-ledger/templates/Italian-packing_list.tex
new file mode 100644
index 000000000..2140c24f4
--- /dev/null
+++ b/sql-ledger/templates/Italian-packing_list.tex
@@ -0,0 +1,114 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fac & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Numero} & \textbf{Descrizione} & \textbf{Quantita'} &
+ \textbf{Unita'} & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptoaddr1%>
+
+<%shiptoaddr2%>
+
+<%shiptoaddr3%>
+
+<%shiptoaddr4%>
+
+\vspace{3.5cm}
+
+\textbf{L I S T A} \parbox{0.3cm}{\hfill} \textbf{E T I C H E T T E}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Data} & <%invdate%> \\
+ \textbf{Numero} & <%invnumber%> \\
+ \textbf{Cliente} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Codice} & \textbf{Descrizione} & \textbf{Quantita'} &
+ \textbf{Unita'} & \textbf{Bin} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-pick_list.html b/sql-ledger/templates/Italian-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Italian-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Italian-pick_list.tex b/sql-ledger/templates/Italian-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Italian-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-pos_invoice.txt b/sql-ledger/templates/Italian-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Italian-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Italian-purchase_order.html b/sql-ledger/templates/Italian-purchase_order.html
new file mode 100644
index 000000000..27a982a8e
--- /dev/null
+++ b/sql-ledger/templates/Italian-purchase_order.html
@@ -0,0 +1,232 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefono: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>ORDINE DI ACQUISTO</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Data ordine</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Consegna</th><td width=10>&nbsp;</td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Ordine numero</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>Ordinare a:</th>
+ <th align=left width=50%><font color=ffffff>Recapito:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+
+<br>
+<%if contact%>
+<br>All'attenzione di: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Telefono: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+<br>
+<%if shiptocontact%>
+<br>All'attenzione di: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Telefono: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Codice</th>
+ <th align=left><font color=ffffff>Descrizione</th>
+ <th><font color=ffffff>Quantit&agrave;</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Prezzo</th>
+ <th><font color=ffffff>Totale riga</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Totale righe</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%>: <%taxrate%>% su <%taxbase%></th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2><!--Termine di pagamento: <b><%terms%></b> giorni--></td>
+ <th colspan=2 align=right>Totale ordine</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Note</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ Tutti i prezzi sono espressi in valuta <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><!--<font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full. Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.-->
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-purchase_order.tex b/sql-ledger/templates/Italian-purchase_order.tex
new file mode 100644
index 000000000..db8f451d0
--- /dev/null
+++ b/sql-ledger/templates/Italian-purchase_order.tex
@@ -0,0 +1,206 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{18cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotale} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Numero} & \textbf{Descrizione} & \textbf{Quantita'} &
+ \textbf{Unita'} & \textbf{Prezzo} & \textbf{Subtotale} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+\textbf{Ordinare a:}
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+Attn: <%contact%>
+\vspace{0.3cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Spedire la merce a:}
+\vspace{0.3cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Attn: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{ORDINE DI ACQUISTO}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Data} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Consegna} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Ordine numero} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Codice} & \textbf{Descrizione} & \textbf{Quantit\`a} &
+ \textbf{Unit\`a} & \textbf{Prezzo} & \textbf{Totale riga} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{10cm}{Xr@{}}
+ \textbf{Totale righe} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%>: <%taxrate%>\% su <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Totale ordine} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Tutti i prezzi sono espressi in valuta \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Italian-receipt.tex b/sql-ledger/templates/Italian-receipt.tex
new file mode 100644
index 000000000..3baf6d7a4
--- /dev/null
+++ b/sql-ledger/templates/Italian-receipt.tex
@@ -0,0 +1,78 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{1.8cm}
+
+<%notes%>
+
+\vspace{0.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Fattura Numero} & \textbf{Data}
+ & \textbf{Dovuto} & \textbf{Applicato} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
diff --git a/sql-ledger/templates/Italian-request_quotation.html b/sql-ledger/templates/Italian-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Italian-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-request_quotation.tex b/sql-ledger/templates/Italian-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Italian-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-sales_order.html b/sql-ledger/templates/Italian-sales_order.html
new file mode 100644
index 000000000..af79e81c2
--- /dev/null
+++ b/sql-ledger/templates/Italian-sales_order.html
@@ -0,0 +1,207 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>ORDINE DI VENDITA</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Data ordine</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Consegna</th><td width=10>&nbsp;</td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Ordine numero</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Ordinato da:</th>
+ <th align=left><font color=ffffff>Recapito:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Numero</th>
+ <th align=left><font color=ffffff>Descrizione</th>
+ <th><font color=ffffff>Quantit&agrave;</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Prezzo</th>
+ <th><font color=ffffff>Totale riga</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Totale righe</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%>: <%taxrate%>% su <%taxbase%></th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2>&nbsp;</td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3><!--Termine: <b><%terms%></b> giorni.--></td>
+ <th colspan=2 align=right>Totale</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+<%if taxincluded%>
+ <tr>
+ <td colspan=3>L'IVA &egrave; inclusa nel Totale</td>
+ </tr>
+<%end taxincluded%>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Note</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ Tutti i prezzi sono espressi in valuta <b><%currency%></b>.
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><!--<font size=-3>
+ Verr&agrave; applicato un 10% di commissione sulla cancellazione dell'ordine
+ per ogni modifica a richiesta del cliente.
+ </font>-->
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-sales_order.tex b/sql-ledger/templates/Italian-sales_order.tex
new file mode 100644
index 000000000..3c0c4d8d5
--- /dev/null
+++ b/sql-ledger/templates/Italian-sales_order.tex
@@ -0,0 +1,150 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{18cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefono & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Codice} & \textbf{Descrzione} & \textbf{Quantit\`a} &
+ \textbf{Unit\`a} & \textbf{Prezzo} & \textbf{Sconto} & \textbf{Totale riga} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{3.5cm}
+
+\textbf{ORDINE DI VENDITA}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Data ordine} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Consegna} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Ordine numero} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Codice} & \textbf{Descrizione} & \textbf{Qt\`a} &
+ \textbf{Un.} & \textbf{Prezzo} & \textbf{Sconto} & \textbf{Tot. riga} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Totale righe} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%>: <%taxrate%>\% su <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Totale ordine} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Tutti i prezzi sono in valuta \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+%
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+%
+%\footnotetext[1]{\tiny
+%A 10\% order cancellation fee will be applied for any special order products or
+%products that have been customized, enhanced or upgraded at customers request.
+%Items which are non-returnable are indicated above.
+%}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-sales_quotation.html b/sql-ledger/templates/Italian-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Italian-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-sales_quotation.tex b/sql-ledger/templates/Italian-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Italian-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Italian-statement.html b/sql-ledger/templates/Italian-statement.html
new file mode 100644
index 000000000..d3e1b32f7
--- /dev/null
+++ b/sql-ledger/templates/Italian-statement.html
@@ -0,0 +1,125 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>E S T R A T T O &nbsp;&nbsp;&nbsp;&nbsp; C O N T O</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ <br>
+<%if customerphone%>
+ <br>Tel: <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Fax: <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Fattura Numero</th>
+ <th width=15%>Data</th>
+ <th width=15%>Dovuto</th>
+ <th width=10%>Corrente</th>
+ <th width=10%>30</th>
+ <th width=10%>60</th>
+ <th width=10%>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Totale Dovuto</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><hr noshade></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>Per favore intestare gli assegni a: <b><%company%></b>.
+ </td>
+ </tr>
+ <tr height=20></tr>
+</table>
+
diff --git a/sql-ledger/templates/Italian-statement.tex b/sql-ledger/templates/Italian-statement.tex
new file mode 100644
index 000000000..bb4834c5c
--- /dev/null
+++ b/sql-ledger/templates/Italian-statement.tex
@@ -0,0 +1,141 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotale} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%statementdate%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Fattura Numero} & \textbf{Data} & \textbf{Dovuto} &
+ \textbf{Scaduto} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{E S T R A T T O} \parbox{0.3cm}{\hfill} \textbf{C O N T O} \hfill
+
+\hfill <%statementdate%>
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Fattura Numero} & \textbf{Data} & \textbf{Dovuto} &
+ \textbf{Corrente} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Subtotale} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{1cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Totale Dovuto} & <%total%>
+\end{tabularx}
+
+\vfill
+
+Per favore intestare gli assegni a: <%company%>
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Italian-work_order.html b/sql-ledger/templates/Italian-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Italian-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Italian-work_order.tex b/sql-ledger/templates/Italian-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Italian-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Norwegian-ap_transaction.html b/sql-ledger/templates/Norwegian-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-ap_transaction.tex b/sql-ledger/templates/Norwegian-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-ar_transaction.html b/sql-ledger/templates/Norwegian-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-ar_transaction.tex b/sql-ledger/templates/Norwegian-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-balance_sheet.html b/sql-ledger/templates/Norwegian-balance_sheet.html
new file mode 100644
index 000000000..204743292
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-balance_sheet.html
@@ -0,0 +1,100 @@
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>B A L A N S E
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>AKTIVA<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTALE AKTIVA</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>PASSIVA<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total gjeld</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>EGENKAPITAL<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total egenkapital</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL GJELD OG EGENKAPITAL</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+
+
+
diff --git a/sql-ledger/templates/Norwegian-bin_list.html b/sql-ledger/templates/Norwegian-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Norwegian-bin_list.tex b/sql-ledger/templates/Norwegian-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-check.tex b/sql-ledger/templates/Norwegian-check.tex
new file mode 100644
index 000000000..75699ba37
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-check.tex
@@ -0,0 +1,81 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{1.8cm}
+
+<%notes%>
+
+\vspace{0.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Faktura nr.} & \textbf{Faktura dato}
+ & \textbf{Skyldig} & \textbf{Betalt} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
+
+
diff --git a/sql-ledger/templates/Norwegian-income_statement.html b/sql-ledger/templates/Norwegian-income_statement.html
new file mode 100644
index 000000000..945d19a59
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-income_statement.html
@@ -0,0 +1,78 @@
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>D R I F T S R E G N S K A P
+<br><%period%>
+</h2>
+
+
+<table width=100% border=0>
+<tr>
+ <th width=400 align=left colspan=2><br></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<tr>
+ <th align=left colspan=2>INNTEKTER<br><hr width=300 size=5 align=left noshade></th>
+</tr>
+
+<%foreach income_account%>
+<tr>
+ <td width=4> </td>
+ <td><%income_account%></td>
+ <td align=right><%income_this_period%></td>
+ <td align=right><%income_last_period%></td>
+</tr>
+<%end income_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Totale inntekter</th>
+ <td align=right><%total_income_this_period%><hr noshade size=2></td>
+ <td align=right><%total_income_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=2>UTGIFTER<br><hr width=300 size=5 align=left noshade></th>
+</tr>
+
+<%foreach expense_account%>
+<tr>
+ <td> </td>
+ <td><%expense_account%></td>
+ <td align=right><%expenses_this_period%></td>
+ <td align=right><%expenses_last_period%></td>
+</tr>
+<%end expense_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Totale utgifter</th>
+ <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>RESULTAT</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+
+</table>
diff --git a/sql-ledger/templates/Norwegian-invoice.html b/sql-ledger/templates/Norwegian-invoice.html
new file mode 100644
index 000000000..8ac71439a
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-invoice.html
@@ -0,0 +1,226 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>F A K T U R A</h4>
+ </th>
+ </tr>
+
+ </table>
+
+<!-- other variables you can use include
+tel, fax, signature, username, businessnumber -->
+
+ <table width=100% cellspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+
+ <tr>
+ <th align=right>Fakturanr.:</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <th align=right>Fakturadato:</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Fakturaadresse:</th>
+ <%if shiptoname%>
+ <th align=left><font color=ffffff>Leveringsadresse:</th>
+ <%end shiptoname%>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+ <%if shiptoname%>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+ </td>
+ <%end shiptoname%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Beskrivelse</th>
+ <th><font color=ffffff>Antall</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Pris</th>
+ <th><font color=ffffff>Rabatt</th>
+ <th><font color=ffffff>Sum</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+<!--
+you can also use netprice instead of sellprice if you
+don't want to show the discount
+netprice = sellprice - discount
+to show the percentage for a discount use <%discountrate%>
+-->
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=5 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<%if paid%>
+ <tr>
+ <th colspan=5 align=right>Allerede betalt</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td colspan=3> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Betalingsfrist <b><%terms%></b> dager</td>
+ <th colspan=2 align=right>Ĺ betale</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Merk</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ Alle priser i <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <th colspan=7>
+<!-- 20030814/Marius Kjeldahl: Commented out check statement as checks
+are dead in Norway AFAIK -->
+
+<!-- Utsted vennligst sjekk til <%company%> pĺ norsk bank -->
+ <br>
+ </th>
+</tr>
+
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Betaling innen <%terms%> dager fra fakturadato.
+ Etterskuddsrenter beregnes med 1% per pĺbegynt mĺned.
+
+ </font>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<%foreach tax%>
+<tr>
+ <th colspan=7 align=left><font size=-2><%taxdescription%> Organisasjonsnr.: <%taxnumber%></th>
+</tr>
+<%end tax%>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-invoice.tex b/sql-ledger/templates/Norwegian-invoice.tex
new file mode 100644
index 000000000..05c75c6dc
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-invoice.tex
@@ -0,0 +1,237 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefaks & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Pris} & \textbf{Rabatt} & \textbf{Sum} \\
+ & carried forward from page <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+ \parbox[t]{10.5cm}{
+ \textbf{Til}
+ \vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{0.3cm}
+
+%<%if contact%>
+%Attn: <%contact%>
+%\vspace{0.3cm}
+%<%end contact%>
+\vspace{0.5cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Faks: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Leveringsadresse}
+\vspace{0.5cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+\vspace{0.3cm}
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Attn: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel.: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Faks: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{F A K T U R A}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Dato} & <%invdate%> \\
+ \textbf{Fakturanr.} & <%invnumber%> \\
+ \textbf{Ordrenr.} & <%ordnumber%> \\
+ \textbf{Kontakt} & <%employee%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Pris} & \textbf{Rabatt} & \textbf{Sum} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%> \\
+<%end tax%>
+<%if paid%>
+ \textbf{Betalt} & - <%paid%> \\
+<%end paid%>
+ \hline
+ \textbf{Skyldig} & \textbf{<%total%>} \\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Alle priser i \textbf{<%currency%>} valuta.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+<%if paid%>
+\begin{tabularx}{10cm}{@{}lXlr@{}}
+ \textbf{Innbetalinger} & & & \\
+ \hline
+ \textbf{Dato} & \textbf{Konto} & \textbf{Kilde} & \textbf{Sum} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabularx}
+<%end paid%>
+
+\vspace{1cm}
+
+\centerline{\textbf{Takk for handelen!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Betalingen mĺ betales innen <%terms%> dager fra fakturadato. Ved
+forsinket betaling belastes en mĺnedlig rente pĺ 1.5\% per mĺned,
+fra <%duedate%> inntil betalingen er fullstendig. Varer som returneres
+belastes med 10\% returgebyr. Retur mĺ forhĺndsgodkjennes fra
+<%company%> fřr varene returneres. Retur mĺ sendes forhĺndsbetalt og
+mĺ vćre forsikret. <%company%> er ikke ansvarlig for transportskader.
+}
+
+\end{document}
diff --git a/sql-ledger/templates/Norwegian-packing_list.html b/sql-ledger/templates/Norwegian-packing_list.html
new file mode 100644
index 000000000..6f9be8e79
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-packing_list.html
@@ -0,0 +1,142 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>F Ř L G E S E D D E L</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Dato</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Nummer</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Leveringsadresse:</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptoaddr1%>
+ <br><%shiptoaddr2%>
+ <br><%shiptoaddr3%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Beskrivelse</th>
+ <th><font color=ffffff>Antall</th>
+ <th>&nbsp;</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Note</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ <%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+
+Retur skal sendes forskuddsbetalt og vćre forsvarlig pakket.
+<%company%> er ikke vćre ansvarlig for skader under
+transport.
+
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+
+
diff --git a/sql-ledger/templates/Norwegian-packing_list.tex b/sql-ledger/templates/Norwegian-packing_list.tex
new file mode 100644
index 000000000..4444b8fd6
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-packing_list.tex
@@ -0,0 +1,123 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefaks & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptoaddr1%>
+
+<%shiptoaddr2%>
+
+<%shiptoaddr3%>
+
+<%shiptoaddr4%>
+
+\vspace{3.5cm}
+
+\textbf{F Ř L G E} \parbox{0.3cm}{\hfill} \textbf{S E D D E L}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Dato} & <%invdate%> \\
+ \textbf{Fakturanr.} & <%invnumber%> \\
+ \textbf{Kundeid.} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Kurv} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+\centerline{\textbf{Takk for handelen!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Varer som returneres
+belastes med 10\% returgebyr. Retur mĺ forhĺndsgodkjennes fra
+<%company%> fřr varene returneres. Retur mĺ sendes forhĺndsbetalt og
+mĺ vćre forsikret. <%company%> er ikke ansvarlig for transportskader.
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-pick_list.html b/sql-ledger/templates/Norwegian-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Norwegian-pick_list.tex b/sql-ledger/templates/Norwegian-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-pos_invoice.txt b/sql-ledger/templates/Norwegian-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Norwegian-purchase_order.html b/sql-ledger/templates/Norwegian-purchase_order.html
new file mode 100644
index 000000000..3991f5555
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-purchase_order.html
@@ -0,0 +1,201 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon: <%tel%>
+ <br>Telefaks: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>I N N K J Ř P S &nbsp;&nbsp; O R D R E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Ordre dato</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Leveres innen</th><td width=10>&nbsp;</td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Ordrenr.</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Beskrivelse</th>
+ <th><font color=ffffff>Ant.</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Pris</th>
+ <th><font color=ffffff>Sum</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>Betalingsfirst <b><%terms%></b> dager</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Note</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ Alle priser i valuta <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+
+Betaling skal skje innen <%terms%> dager fra
+fakturadato. Forsinkelsesrente pĺregnes med 1.5% per mĺned fra
+fakturadato inntil det fulle belřpet er betalt.
+
+Ved retur belastes 10% returgebyr. Retur av varer mĺ
+forhĺndsgodkjennes av <%company%> fřr varer sendes. Vareretur mĺ
+sendes forhĺndsbetalt og med tilstrekkelig forsikring. <%company%> er
+ikke ansvarlig for transportskader.
+
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-purchase_order.tex b/sql-ledger/templates/Norwegian-purchase_order.tex
new file mode 100644
index 000000000..8b1821040
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-purchase_order.tex
@@ -0,0 +1,206 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefaks & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Pris} & \textbf{Sum} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+\textbf{Til}
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+Attn: <%contact%>
+\vspace{0.3cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Send til}
+\vspace{0.3cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Attn: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{I N N K J Ř P S} \parbox{0.3cm}{\hfill} \textbf{O R D R E}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Dato} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Levers innen} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Ordrenr.} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Pris} & \textbf{Sum} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Alle priser i valuta \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Norwegian-receipt.tex b/sql-ledger/templates/Norwegian-receipt.tex
new file mode 100644
index 000000000..1914cec5d
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-receipt.tex
@@ -0,0 +1,78 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{1.8cm}
+
+<%notes%>
+
+\vspace{0.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Fakturanr.} & \textbf{Fakturadato}
+ & \textbf{Skyldig} & \textbf{Betalt} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
diff --git a/sql-ledger/templates/Norwegian-request_quotation.html b/sql-ledger/templates/Norwegian-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-request_quotation.tex b/sql-ledger/templates/Norwegian-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-sales_order.html b/sql-ledger/templates/Norwegian-sales_order.html
new file mode 100644
index 000000000..9a6e8318e
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-sales_order.html
@@ -0,0 +1,220 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon: <%tel%>
+ <br>Telefaks: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>S A L G S &nbsp;&nbsp; O R D R E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Ordre dato</th><td width=10>&nbsp;</td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Leveringsdato</th><td width=10>&nbsp;</td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Ordrenr.</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ <th align=left><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+<br><%shiptoaddress2%>
+<%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Beskrivelse</th>
+ <th><font color=ffffff>Ant.</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Pris</th>
+ <th><font color=ffffff>Rabatt</th>
+ <th><font color=ffffff>Sum</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%ordtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=5 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2>&nbsp;</td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Betalingsfrist <b><%terms%></b> dager</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+<%if taxincluded%>
+ <tr>
+ <td colspan=3>Mva er inkludert i Total</td>
+ </tr>
+<%end taxincluded%>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Note</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ Alle priser i valuta <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+Ved spesialtilpassede ordre (pĺkrevd av kunden), skreddersydde produkter, utvidede eller
+oppgraderte produkter belastes et 10% avbestillingsgebyr. Varer som
+ikke kan returneres er merket over.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-sales_order.tex b/sql-ledger/templates/Norwegian-sales_order.tex
new file mode 100644
index 000000000..10916f575
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-sales_order.tex
@@ -0,0 +1,150 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefaks & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Pris} & \textbf{Rabatt} & \textbf{Sum} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+\vspace{3.5cm}
+
+\textbf{S A L G S} \parbox{0.3cm}{\hfill} \textbf{O R D R E}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Ordre dato} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Leveres innen} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Ordrenr.} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Beskrivelse} & \textbf{Ant.} &
+ \textbf{Enhet} & \textbf{Pris} & \textbf{Rabatt} & \textbf{Sum} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Alle priser i valuta \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Ved spesialtilpassede ordre (pĺkrevd av kunden), skreddersydde produkter, utvidede eller
+oppgraderte produkter belastes et 10\% avbestillingsgebyr. Varer som
+ikke kan returneres er merket over.
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-sales_quotation.html b/sql-ledger/templates/Norwegian-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-sales_quotation.tex b/sql-ledger/templates/Norwegian-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Norwegian-statement.html b/sql-ledger/templates/Norwegian-statement.html
new file mode 100644
index 000000000..97ba64e9b
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-statement.html
@@ -0,0 +1,120 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+ <td align=right>
+ <h4>
+ Telefon: <%tel%>
+ <br>Telefaks: <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>O V E R S I K T</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
+ <br>
+<%if customerphone%>
+ <br>Telefon: <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Telefaks: <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Faktura #</th>
+ <th width=15%>Dato</th>
+ <th width=15%>Betalingsfrist</th>
+ <th width=10%>Nĺvćrende</th>
+ <th width=10%>30</th>
+ <th width=10%>60</th>
+ <th width=10%>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Totalt utestĺende</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><hr noshade></td>
+ </tr>
+ <tr height=20></tr>
+</table>
+
diff --git a/sql-ledger/templates/Norwegian-statement.tex b/sql-ledger/templates/Norwegian-statement.tex
new file mode 100644
index 000000000..6975c1b51
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-statement.tex
@@ -0,0 +1,139 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel. & <%tel%>\\
+ Faks & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%statementdate%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%address1%>
+
+<%if address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country%>
+<%end country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{O V E R S I K T} \hfill
+
+\hfill <%statementdate%>
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Faktura \#} & \textbf{Dato} & \textbf{Frist} &
+ \textbf{Skyldig} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{1cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Totalt skyldig} & <%total%>
+\end{tabularx}
+
+\vfill
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Norwegian-work_order.html b/sql-ledger/templates/Norwegian-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Norwegian-work_order.tex b/sql-ledger/templates/Norwegian-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Norwegian-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Service-ap_transaction.html b/sql-ledger/templates/Service-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Service-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Service-ap_transaction.tex b/sql-ledger/templates/Service-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Service-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Service-ar_transaction.html b/sql-ledger/templates/Service-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Service-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Service-ar_transaction.tex b/sql-ledger/templates/Service-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Service-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Service-balance_sheet.html b/sql-ledger/templates/Service-balance_sheet.html
index 478caabca..c84ad95a5 100644
--- a/sql-ledger/templates/Service-balance_sheet.html
+++ b/sql-ledger/templates/Service-balance_sheet.html
@@ -1,14 +1,18 @@
-<body bgcolor=ffffff>
+<body>
<h2 align=center>
<%company%>
<br><%address%>
<p>BALANCE SHEET
-<br><%period%>
+<br>as at <%this_period%>
</h2>
+<%if department%>
+<h4>Department: <%department%></h4>
+<%end department%>
+
<table border=0>
<tr>
<th align=left width=400 colspan=2>ASSETS<br><hr align=left width=250 size=5 noshade></th>
@@ -58,7 +62,7 @@
<tr valign=top>
<td></td>
- <th align=left>Total Liabilities</th>
+ <th align=left>TOTAL LIABILITIES</th>
<td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
<td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
</tr>
@@ -84,7 +88,7 @@
<tr valign=top>
<td></td>
- <th align=left>Total Equity</th>
+ <th align=left>TOTAL EQUITY</th>
<td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
<td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
</tr>
@@ -98,3 +102,9 @@
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Service-bin_list.html b/sql-ledger/templates/Service-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Service-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Service-bin_list.tex b/sql-ledger/templates/Service-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Service-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Service-check.tex b/sql-ledger/templates/Service-check.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Service-check.tex
+++ b/sql-ledger/templates/Service-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Service-income_statement.html b/sql-ledger/templates/Service-income_statement.html
index e9d6a4002..eab9ff0f6 100644
--- a/sql-ledger/templates/Service-income_statement.html
+++ b/sql-ledger/templates/Service-income_statement.html
@@ -1,5 +1,5 @@
-<body bgcolor=ffffff>
+<body>
<h2 align=center>
<%company%>
@@ -9,6 +9,13 @@
<br><%period%>
</h2>
+<%if department%>
+<h4>Department: <%department%></h4>
+<%end department%>
+
+<%if projectnumber%>
+<h4>Project Number: <%projectnumber%></h4>
+<%end projectnumber%>
<table width=100% border=0>
<tr>
@@ -34,7 +41,7 @@
<tr valign=top>
<td> </td>
- <th align=left>Total Income</th>
+ <th align=left>TOTAL INCOME</th>
<td align=right><%total_income_this_period%><hr noshade size=2></td>
<td align=right><%total_income_last_period%><hr noshade size=2></td>
</tr>
@@ -60,7 +67,7 @@
<tr valign=top>
<td> </td>
- <th align=left>Total Expenses</th>
+ <th align=left>TOTAL EXPENSES</th>
<td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
<td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
</tr>
@@ -72,11 +79,3 @@
</tr>
</table>
-
-
-
-
-
-
-
-
diff --git a/sql-ledger/templates/Service-invoice.html b/sql-ledger/templates/Service-invoice.html
index 8ae689775..193dd1f48 100644
--- a/sql-ledger/templates/Service-invoice.html
+++ b/sql-ledger/templates/Service-invoice.html
@@ -54,10 +54,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
diff --git a/sql-ledger/templates/Service-invoice.tex b/sql-ledger/templates/Service-invoice.tex
index 810a50e81..b4baba8ca 100644
--- a/sql-ledger/templates/Service-invoice.tex
+++ b/sql-ledger/templates/Service-invoice.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Service-packing_list.tex b/sql-ledger/templates/Service-packing_list.tex
index b5a6a8a11..f7e158a6c 100644
--- a/sql-ledger/templates/Service-packing_list.tex
+++ b/sql-ledger/templates/Service-packing_list.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
diff --git a/sql-ledger/templates/Service-pick_list.html b/sql-ledger/templates/Service-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Service-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Service-pick_list.tex b/sql-ledger/templates/Service-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Service-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Service-pos_invoice.txt b/sql-ledger/templates/Service-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Service-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Service-purchase_order.html b/sql-ledger/templates/Service-purchase_order.html
index f2e9f7e22..de5fd8052 100644
--- a/sql-ledger/templates/Service-purchase_order.html
+++ b/sql-ledger/templates/Service-purchase_order.html
@@ -65,10 +65,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
</td>
</tr>
</table>
@@ -130,7 +134,7 @@ adjust the colspan if you include this to shift subtotal one to the right
<tr>
<td colspan=2>Terms Net <b><%terms%></b> days</td>
<th colspan=2 align=right>Total</th>
- <th colspan=2 align=right><%total%></th>
+ <th colspan=2 align=right><%ordtotal%></th>
</tr>
<tr>
diff --git a/sql-ledger/templates/Service-purchase_order.tex b/sql-ledger/templates/Service-purchase_order.tex
index e6cc92c25..5195c20b2 100644
--- a/sql-ledger/templates/Service-purchase_order.tex
+++ b/sql-ledger/templates/Service-purchase_order.tex
@@ -44,7 +44,7 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\rule{\textwidth}{2pt}
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
diff --git a/sql-ledger/templates/Service-receipt.tex b/sql-ledger/templates/Service-receipt.tex
index 5b64e818e..7f25a218c 100644
--- a/sql-ledger/templates/Service-receipt.tex
+++ b/sql-ledger/templates/Service-receipt.tex
@@ -39,15 +39,19 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
-\vspace{2.8cm}
+\vspace{1.8cm}
+
+<%memo%>
+
+\vspace{0.8cm}
<%company%>
@@ -65,7 +69,10 @@
<%end invnumber%>
\end{tabularx}
+\vspace{1cm}
+
+<%memo%>
+
\vfill
\end{document}
-
diff --git a/sql-ledger/templates/Service-request_quotation.html b/sql-ledger/templates/Service-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Service-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Service-request_quotation.tex b/sql-ledger/templates/Service-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Service-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Service-sales_order.html b/sql-ledger/templates/Service-sales_order.html
index 319cc3bd7..8150db11b 100644
--- a/sql-ledger/templates/Service-sales_order.html
+++ b/sql-ledger/templates/Service-sales_order.html
@@ -65,10 +65,14 @@
<tr>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<%if contact%>
<p>Attn: <%contact%>
%end contact%>
diff --git a/sql-ledger/templates/Service-sales_order.tex b/sql-ledger/templates/Service-sales_order.tex
index c5664e056..aadfffa20 100644
--- a/sql-ledger/templates/Service-sales_order.tex
+++ b/sql-ledger/templates/Service-sales_order.tex
@@ -73,13 +73,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{3.5cm}
@@ -87,6 +91,9 @@
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
\textbf{Date} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Required by} & <%reqdate%> \\
+<%end reqdate%>
\textbf{Number} & <%ordnumber%>
\end{tabular}
diff --git a/sql-ledger/templates/Service-sales_quotation.html b/sql-ledger/templates/Service-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Service-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Service-sales_quotation.tex b/sql-ledger/templates/Service-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Service-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Service-statement.html b/sql-ledger/templates/Service-statement.html
index 6fca322ee..5e288505e 100644
--- a/sql-ledger/templates/Service-statement.html
+++ b/sql-ledger/templates/Service-statement.html
@@ -36,20 +36,24 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
<br>
-<%if customerphone%>
+ <%if customerphone%>
<br>Tel: <%customerphone%>
-<%end customerphone%>
-<%if customerfax%>
+ <%end customerphone%>
+ <%if customerfax%>
<br>Fax: <%customerfax%>
-<%end customerfax%>
-<%if email%>
+ <%end customerfax%>
+ <%if email%>
<br><%email%>
-<%end email%>
+ <%end email%>
</td>
</tr>
</table>
@@ -62,16 +66,20 @@
<table width=100%>
<tr>
<th align=left>Invoice #</th>
- <th width=15%>Date</th>
- <th width=15%>Due</th>
+ <th align=left>Order #</th>
+<!-- <th align=left>Notes</th> -->
+ <th width=10%>Date</th>
+ <th width=10%>Due</th>
<th width=10%>Current</th>
<th width=10%>30</th>
<th width=10%>60</th>
<th width=10%>90+</th>
</tr>
-<%foreach invnumber%>
+ <%foreach invnumber%>
<tr>
<td><%invnumber%></td>
+ <td><%ordnumber%></td>
+<!-- <td><%notes%></td> -->
<td><%invdate%></td>
<td><%duedate%></td>
<td align=right><%c0%></td>
@@ -79,14 +87,15 @@
<td align=right><%c60%></td>
<td align=right><%c90%></td>
</tr>
-<%end invnumber%>
+ <%end invnumber%>
<tr>
- <td colspan=7><hr size=1></td>
+ <td colspan=8><hr size=1></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
+ <td>&nbsp;</td>
<th align=right><%c0total%></td>
<th align=right><%c30total%></td>
<th align=right><%c60total%></td>
diff --git a/sql-ledger/templates/Service-statement.tex b/sql-ledger/templates/Service-statement.tex
index 0b63f7523..c927c5da5 100644
--- a/sql-ledger/templates/Service-statement.tex
+++ b/sql-ledger/templates/Service-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,24 +81,22 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+\begin{tabular*}{\textwidth}{@{}ll@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Due} &
\textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
<%foreach invnumber%>
- <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%invnumber%> & <%ordnumber%> & <%invdate%> & <%duedate%> &
<%c0%> & <%c30%> & <%c60%> & <%c90%> \\
<%end invnumber%>
-\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\textbf{Subtotal} & & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Service-work_order.html b/sql-ledger/templates/Service-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Service-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Service-work_order.tex b/sql-ledger/templates/Service-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Service-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Spanish_A4-ap_transaction.html b/sql-ledger/templates/Spanish_A4-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_A4-ap_transaction.tex b/sql-ledger/templates/Spanish_A4-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_A4-ar_transaction.html b/sql-ledger/templates/Spanish_A4-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_A4-ar_transaction.tex b/sql-ledger/templates/Spanish_A4-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_A4-bin_list.html b/sql-ledger/templates/Spanish_A4-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Spanish_A4-bin_list.tex b/sql-ledger/templates/Spanish_A4-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_A4-check.tex b/sql-ledger/templates/Spanish_A4-check.tex
index a1ef96935..4e7cfc628 100644
--- a/sql-ledger/templates/Spanish_A4-check.tex
+++ b/sql-ledger/templates/Spanish_A4-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Spanish_A4-invoice.html b/sql-ledger/templates/Spanish_A4-invoice.html
index d274936d0..f55157455 100644
--- a/sql-ledger/templates/Spanish_A4-invoice.html
+++ b/sql-ledger/templates/Spanish_A4-invoice.html
@@ -30,7 +30,7 @@
<td>Fecha</td>
<td>Cód. Cliente</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%invnumber%></b></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td colspan="4">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="4">
diff --git a/sql-ledger/templates/Spanish_A4-invoice.tex b/sql-ledger/templates/Spanish_A4-invoice.tex
index 1d0619e97..24b55bf52 100644
--- a/sql-ledger/templates/Spanish_A4-invoice.tex
+++ b/sql-ledger/templates/Spanish_A4-invoice.tex
@@ -39,15 +39,15 @@
\textbf{F A C T U R A}
\vspace{1cm}
-<%shiptoname%>
+<%name%>
-<%shiptoaddr1%>
+<%address1%>
-<%shiptoaddr2%>
+<%address2%>
-<%shiptoaddr3%>
+<%city%> <%state%> <%zipcode%>
-<%shiptoaddr4%>
+<%country%>
\end{minipage}
}
@@ -59,7 +59,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
@@ -93,12 +93,12 @@
\begin{flushright}
\begin{tabularx}{10cm}{Xr@{}}
- \textbf{Base imponible} & \textbf{<%subtotal%>} \EUR \\
+ \textbf{Base imponible} & \textbf{<%subtotal%>} \\
<%foreach tax%>
- IVA (<%taxrate%>\%) sobre <%taxbase%> & <%tax%> \EUR\\
+ IVA (<%taxrate%>\%) sobre <%taxbase%> & <%tax%> \\
<%end tax%>
\hline
- \textbf{Total} & \textbf{<%invtotal%>} \EUR\\
+ \textbf{Total} & \textbf{<%invtotal%>} \\
\end{tabularx}
\end{flushright}
diff --git a/sql-ledger/templates/Spanish_A4-packing_list.html b/sql-ledger/templates/Spanish_A4-packing_list.html
index c34d1898a..82cba4f6e 100644
--- a/sql-ledger/templates/Spanish_A4-packing_list.html
+++ b/sql-ledger/templates/Spanish_A4-packing_list.html
@@ -31,7 +31,7 @@
<td>Fecha</td>
<td>Cód. Cliente</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%ordnumber%></b></td>
@@ -43,7 +43,7 @@
</tr>
<tr>
<td colspan="5">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="5">
diff --git a/sql-ledger/templates/Spanish_A4-packing_list.tex b/sql-ledger/templates/Spanish_A4-packing_list.tex
index 312c349ba..979e14a3b 100644
--- a/sql-ledger/templates/Spanish_A4-packing_list.tex
+++ b/sql-ledger/templates/Spanish_A4-packing_list.tex
@@ -41,13 +41,13 @@
<%shiptoname%>
-<%shiptoaddr1%>
+<%shiptoaddress1%>
-<%shiptoaddr2%>
+<%shiptoaddress2%>
-<%shiptoaddr3%>
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
-<%shiptoaddr4%>
+<%shiptocountry%>
\end{minipage}
}
@@ -59,7 +59,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
@@ -93,12 +93,12 @@
\begin{flushright}
\begin{tabularx}{10cm}{Xr@{}}
- \textbf{Base imponible} & \textbf{<%subtotal%>} \EUR \\
+ \textbf{Base imponible} & \textbf{<%subtotal%>} \\
<%foreach tax%>
- IVA (<%taxrate%>\%) sobre <%taxbase%> & <%tax%> \EUR\\
+ IVA (<%taxrate%>\%) sobre <%taxbase%> & <%tax%> \\
<%end tax%>
\hline
- \textbf{Total} & \textbf{<%invtotal%>} \EUR\\
+ \textbf{Total} & \textbf{<%invtotal%>} \\
\end{tabularx}
\end{flushright}
diff --git a/sql-ledger/templates/Spanish_A4-pick_list.html b/sql-ledger/templates/Spanish_A4-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Spanish_A4-pick_list.tex b/sql-ledger/templates/Spanish_A4-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_A4-pos_invoice.txt b/sql-ledger/templates/Spanish_A4-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Spanish_A4-purchase_order.html b/sql-ledger/templates/Spanish_A4-purchase_order.html
index 693fe65f7..493fd375e 100644
--- a/sql-ledger/templates/Spanish_A4-purchase_order.html
+++ b/sql-ledger/templates/Spanish_A4-purchase_order.html
@@ -30,7 +30,7 @@
<td>Fecha</td>
<td>Cód. Proveedor</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%ordnumber%></b></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td colspan="4">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="4">
diff --git a/sql-ledger/templates/Spanish_A4-purchase_order.tex b/sql-ledger/templates/Spanish_A4-purchase_order.tex
index f8300aee0..df9ade184 100644
--- a/sql-ledger/templates/Spanish_A4-purchase_order.tex
+++ b/sql-ledger/templates/Spanish_A4-purchase_order.tex
@@ -40,13 +40,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\end{minipage}
}
@@ -58,7 +62,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
diff --git a/sql-ledger/templates/Spanish_A4-receipt.tex b/sql-ledger/templates/Spanish_A4-receipt.tex
index a1ef96935..4e7cfc628 100644
--- a/sql-ledger/templates/Spanish_A4-receipt.tex
+++ b/sql-ledger/templates/Spanish_A4-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Spanish_A4-request_quotation.html b/sql-ledger/templates/Spanish_A4-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_A4-request_quotation.tex b/sql-ledger/templates/Spanish_A4-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_A4-sales_order.html b/sql-ledger/templates/Spanish_A4-sales_order.html
index d54f37581..a3cdfc76d 100644
--- a/sql-ledger/templates/Spanish_A4-sales_order.html
+++ b/sql-ledger/templates/Spanish_A4-sales_order.html
@@ -30,7 +30,7 @@
<td>Fecha</td>
<td>Cód. Cliente</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%ordnumber%></b></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td colspan="4">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="4">
diff --git a/sql-ledger/templates/Spanish_A4-sales_order.tex b/sql-ledger/templates/Spanish_A4-sales_order.tex
index f8300aee0..2ce90074e 100644
--- a/sql-ledger/templates/Spanish_A4-sales_order.tex
+++ b/sql-ledger/templates/Spanish_A4-sales_order.tex
@@ -40,13 +40,13 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%country%>
\end{minipage}
}
@@ -58,7 +58,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
@@ -92,12 +92,12 @@
\begin{flushright}
\begin{tabularx}{10cm}{Xr@{}}
- \textbf{Base imponible} & \textbf{<%subtotal%>} \EUR \\
+ \textbf{Base imponible} & \textbf{<%subtotal%>} \\
<%foreach tax%>
- IVA (<%taxrate%>\%) sobre <%taxbase%> & <%tax%> \EUR\\
+ IVA (<%taxrate%>\%) sobre <%taxbase%> & <%tax%> \\
<%end tax%>
\hline
- \textbf{Total} & \textbf{<%ordtotal%>} \EUR\\
+ \textbf{Total} & \textbf{<%ordtotal%>} \\
\end{tabularx}
\end{flushright}
diff --git a/sql-ledger/templates/Spanish_A4-sales_quotation.html b/sql-ledger/templates/Spanish_A4-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_A4-sales_quotation.tex b/sql-ledger/templates/Spanish_A4-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Spanish_A4-statement.html b/sql-ledger/templates/Spanish_A4-statement.html
index 6fca322ee..a5efdf019 100644
--- a/sql-ledger/templates/Spanish_A4-statement.html
+++ b/sql-ledger/templates/Spanish_A4-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/Spanish_A4-statement.tex b/sql-ledger/templates/Spanish_A4-statement.tex
index 268bb1a33..e33c23c0e 100644
--- a/sql-ledger/templates/Spanish_A4-statement.tex
+++ b/sql-ledger/templates/Spanish_A4-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -117,7 +96,7 @@ Fax: <%customerfax%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Spanish_A4-work_order.html b/sql-ledger/templates/Spanish_A4-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_A4-work_order.tex b/sql-ledger/templates/Spanish_A4-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Spanish_A4-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+
diff --git a/sql-ledger/templates/Spanish_Letter-ap_transaction.html b/sql-ledger/templates/Spanish_Letter-ap_transaction.html
new file mode 100644
index 000000000..c7bae85c4
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-ap_transaction.html
@@ -0,0 +1,229 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A P - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Employee</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_Letter-ap_transaction.tex b/sql-ledger/templates/Spanish_Letter-ap_transaction.tex
new file mode 100644
index 000000000..8bfd9f79c
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-ap_transaction.tex
@@ -0,0 +1,125 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A P} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_Letter-ar_transaction.html b/sql-ledger/templates/Spanish_Letter-ar_transaction.html
new file mode 100644
index 000000000..dbd0a1cd5
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-ar_transaction.html
@@ -0,0 +1,237 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <hr noshade><br>
+ <h4>A R - T R A N S A C T I O N</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br><%contact%>
+ <br>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td align=right>
+ <table>
+ <tr>
+ <th align=left nowrap>Invoice #</th>
+ <td><%invnumber%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Date</th>
+ <td><%invdate%></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Due</th>
+ <td><%duedate%></td>
+ </tr>
+ <tr>
+ <th align=left>Order #</th>
+ <td><%ordnumber%>&nbsp;</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>Salesperson</th>
+ <td><%employee%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=50%>
+ <table>
+ <%foreach account%>
+ <tr valign=top>
+ <td><%accno%></td>
+ <td><%account%></td>
+ <td align=right><%amount%></td>
+ <td><%projectnumber%></td>
+ </tr>
+ <%end account%>
+
+ <tr>
+ <%if taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+ <%end taxincluded%>
+ </tr>
+
+ <%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td align=right><%tax%></td>
+ </tr>
+ <%end tax%>
+
+ <%if not taxincluded%>
+ <th colspan=2 align=right>Total</th>
+ <td align=right><%invtotal%></td>
+ <%end taxincluded%>
+
+ </table>
+ </td>
+ <td width=50%>
+ <%notes%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <td>&nbsp;</td>
+
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <%text_amount%> ***** <%decimal%>/100 <%currency%>
+ </td>
+ </tr>
+
+ <%if paid%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table>
+ <tr>
+ <th>Payments</th>
+ </tr>
+
+ <tr>
+ <td>
+ <hr noshade>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Memo</th>
+ <th align=left>Amount</th>
+ </tr>
+ <%end paid%>
+
+ <%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%paymentmemo%></td>
+ <td><%payment%></td>
+ </tr>
+ <%end payment%>
+
+ <%if paid%>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <%end paid%>
+
+ <tr height=10></tr>
+
+ <%foreach tax%>
+ <tr>
+ <td>&nbsp;</td>
+
+ <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+ <%end tax%>
+
+ <%if taxincluded%>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+ <%end taxincluded%>
+
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_Letter-ar_transaction.tex b/sql-ledger/templates/Spanish_Letter-ar_transaction.tex
new file mode 100644
index 000000000..654d2b95b
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-ar_transaction.tex
@@ -0,0 +1,131 @@
+\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+\centerline{\textbf{A R} \hspace{0.3cm} \textbf{T R A N S A C T I O N}}
+
+\vspace*{0.5cm}
+
+\parbox[t]{.5\textwidth}{
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+\begin{tabular}[t]{ll}
+ \textbf{Invoice \#} & <%invnumber%> \\
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Due} & <%duedate%> \\
+ \textbf{Order \#} & <%ordnumber%> \\
+ \textbf{Employee} & <%employee%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabularx}{.5\textwidth}[t]{@{}llrl@{}}
+<%foreach amount%>
+ <%accno%> & <%account%> & <%amount%> & <%projectnumber%> \\
+<%end amount%>
+
+ \multicolumn{2}{r}{\textbf{Subtotal}} & <%subtotal%> & \\
+<%foreach tax%>
+ \multicolumn{2}{r}{\textbf{<%taxdescription%> @ <%taxrate%> \%}} & <%tax%> & \\
+<%end tax%>
+
+ \multicolumn{2}{r}{\textbf{Total}} & <%invtotal%> & \\
+
+\end{tabularx}
+<%notes%>
+
+\vspace{0.3cm}
+
+<%text_amount%> ***** <%decimal%>/100 <%currency%>
+
+\vspace{0.3cm}
+
+<%if paid%>
+\begin{tabular}{@{}llllr@{}}
+ \multicolumn{5}{c}{\textbf{Payments}} \\
+ \hline
+ \textbf{Date} & & \textbf{Source} & \textbf{Memo} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%paymentmemo%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabular}
+<%end paid%>
+
+\vspace{0.5cm}
+
+<%foreach tax%>
+\textbf{\small{<%taxdescription%> Registration <%taxnumber%>}} \\
+<%end tax%>
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_Letter-bin_list.html b/sql-ledger/templates/Spanish_Letter-bin_list.html
new file mode 100644
index 000000000..c945421c8
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-bin_list.html
@@ -0,0 +1,189 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%>&nbsp;</td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Spanish_Letter-bin_list.tex b/sql-ledger/templates/Spanish_Letter-bin_list.tex
new file mode 100644
index 000000000..034fd7235
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-bin_list.tex
@@ -0,0 +1,147 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%if %address2%>
+<%address2%>
+<%end address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%if country%>
+<%country4%>
+<%end country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%if shiptoaddress2%>
+<%shiptoaddress2%>
+<%end shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%if shiptocountry%>
+<%shiptocountry%>
+<%end shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_Letter-check.tex b/sql-ledger/templates/Spanish_Letter-check.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Spanish_Letter-check.tex
+++ b/sql-ledger/templates/Spanish_Letter-check.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Spanish_Letter-invoice.html b/sql-ledger/templates/Spanish_Letter-invoice.html
index d274936d0..f55157455 100644
--- a/sql-ledger/templates/Spanish_Letter-invoice.html
+++ b/sql-ledger/templates/Spanish_Letter-invoice.html
@@ -30,7 +30,7 @@
<td>Fecha</td>
<td>Cód. Cliente</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%invnumber%></b></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td colspan="4">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="4">
diff --git a/sql-ledger/templates/Spanish_Letter-invoice.tex b/sql-ledger/templates/Spanish_Letter-invoice.tex
index 8fdd38abd..3051cb73b 100644
--- a/sql-ledger/templates/Spanish_Letter-invoice.tex
+++ b/sql-ledger/templates/Spanish_Letter-invoice.tex
@@ -41,15 +41,15 @@
\textbf{F A C T U R A}
\vspace{1cm}
-<%shiptoname%>
+<%name%>
-<%shiptoaddr1%>
+<%address1%>
-<%shiptoaddr2%>
+<%address2%>
-<%shiptoaddr3%>
+<%city%> <%state%> <%zipcode%>
-<%shiptoaddr4%>
+<%country%>
\end{minipage}
}
@@ -61,7 +61,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
diff --git a/sql-ledger/templates/Spanish_Letter-packing_list.html b/sql-ledger/templates/Spanish_Letter-packing_list.html
index c34d1898a..82cba4f6e 100644
--- a/sql-ledger/templates/Spanish_Letter-packing_list.html
+++ b/sql-ledger/templates/Spanish_Letter-packing_list.html
@@ -31,7 +31,7 @@
<td>Fecha</td>
<td>Cód. Cliente</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%ordnumber%></b></td>
@@ -43,7 +43,7 @@
</tr>
<tr>
<td colspan="5">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="5">
diff --git a/sql-ledger/templates/Spanish_Letter-packing_list.tex b/sql-ledger/templates/Spanish_Letter-packing_list.tex
index bf146cad4..f87b4e413 100644
--- a/sql-ledger/templates/Spanish_Letter-packing_list.tex
+++ b/sql-ledger/templates/Spanish_Letter-packing_list.tex
@@ -39,15 +39,15 @@
\textbf{A L B A R Á N}
\vspace{1cm}
-<%shiptoname%>
+<%name%>
-<%shiptoaddr1%>
+<%address1%>
-<%shiptoaddr2%>
+<%address2%>
-<%shiptoaddr3%>
+<%city%> <%state%> <%zipcode%>
-<%shiptoaddr4%>
+<%country%>
\end{minipage}
}
@@ -59,7 +59,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
diff --git a/sql-ledger/templates/Spanish_Letter-pick_list.html b/sql-ledger/templates/Spanish_Letter-pick_list.html
new file mode 100644
index 000000000..75485600f
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-pick_list.html
@@ -0,0 +1,153 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K &nbsp;&nbsp; L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%>&nbsp;</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=15% align=left>Invoice #</th>
+ <th width=15% align=left>Order #</th>
+ <th width=10% align=left>Date</th>
+ <th width=15% align=left nowrap>Contact</th>
+ <th width=15% align=left>Warehouse</th>
+ <th width=10% align=left>Shipping Point</th>
+ <th width=10% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%invnumber%>&nbsp;</td>
+ <td><%ordnumber%>&nbsp;</td>
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%transdate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%>&nbsp;</td>
+ <td><%warehouse%>&nbsp;</td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
diff --git a/sql-ledger/templates/Spanish_Letter-pick_list.tex b/sql-ledger/templates/Spanish_Letter-pick_list.tex
new file mode 100644
index 000000000..c737f6a15
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-pick_list.tex
@@ -0,0 +1,144 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
+ \textbf{Invoice \#} & \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ & \textbf{Warehouse} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%invnumber%> & <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%transdate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_Letter-pos_invoice.txt b/sql-ledger/templates/Spanish_Letter-pos_invoice.txt
new file mode 100644
index 000000000..9ec12f4d2
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-pos_invoice.txt
@@ -0,0 +1,51 @@
+<%company align=center width=40%>
+<%address align=center width=40%>
+
+ Till: <%till align=left width=3%> Phone#: <%tel%>
+Clerk: <%username%>
+Sales: <%employee%>
+
+<%invtime%><%invnumber align=right width=16%>
+
+ Qty Description Amount
+<%foreach number%>
+<%qty align=right width=5%> <%description align=left width=24 offset=6%> <%linetotal align=right width=9%>
+ <%number%> @ <%sellprice%>/<%unit%>
+<%end number%>
+
+Number of items: <%rowcount%>
+<%if taxincluded%>
+ ---------------
+ Amount Due: <%invtotal align=right width=9%>
+<%end taxincluded%>
+<%if not taxincluded%>
+ ------------
+ Subtotal: <%subtotal align=right width=9%>
+<%end taxincluded%>
+<%foreach tax%>
+<%taxdescription align=right width=23%> @ <%taxrate align=right width=2%>%: <%tax align=right width=9%>
+<%end tax%>
+ Amount Due: <%invtotal align=right width=9%>
+<%foreach payment%>
+<%paymentaccount align=right width=29%>: <%payment align=right width=9%> <%currency%>
+<%end payment%>
+<%if change%>
+ Change: <%change align=right width=9%>
+<%end change%>
+<%if total%>
+ Balance Due: <%total align=right width=9%>
+<%end total%>
+<%if discount%>
+
+<%discount%> % Discount applied
+<%end discount%>
+
+ Thank you for your valued business!
+
+<%if taxincluded%>
+Taxes are included in price.
+<%end taxincluded%>
+
+
+
+
diff --git a/sql-ledger/templates/Spanish_Letter-purchase_order.html b/sql-ledger/templates/Spanish_Letter-purchase_order.html
index 693fe65f7..493fd375e 100644
--- a/sql-ledger/templates/Spanish_Letter-purchase_order.html
+++ b/sql-ledger/templates/Spanish_Letter-purchase_order.html
@@ -30,7 +30,7 @@
<td>Fecha</td>
<td>Cód. Proveedor</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%ordnumber%></b></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td colspan="4">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="4">
diff --git a/sql-ledger/templates/Spanish_Letter-purchase_order.tex b/sql-ledger/templates/Spanish_Letter-purchase_order.tex
index 177f4b83b..dee8990e4 100644
--- a/sql-ledger/templates/Spanish_Letter-purchase_order.tex
+++ b/sql-ledger/templates/Spanish_Letter-purchase_order.tex
@@ -40,13 +40,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\end{minipage}
}
@@ -58,7 +62,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
diff --git a/sql-ledger/templates/Spanish_Letter-receipt.tex b/sql-ledger/templates/Spanish_Letter-receipt.tex
index 5b64e818e..6742b5b59 100644
--- a/sql-ledger/templates/Spanish_Letter-receipt.tex
+++ b/sql-ledger/templates/Spanish_Letter-receipt.tex
@@ -39,13 +39,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\vspace{2.8cm}
diff --git a/sql-ledger/templates/Spanish_Letter-request_quotation.html b/sql-ledger/templates/Spanish_Letter-request_quotation.html
new file mode 100644
index 000000000..a9a6f4f71
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-request_quotation.html
@@ -0,0 +1,202 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T &nbsp;&nbsp; F O R &nbsp;&nbsp; Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddr2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th>Qt'y</th>
+ <th>&nbsp;</th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%>&nbsp;</td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_Letter-request_quotation.tex b/sql-ledger/templates/Spanish_Letter-request_quotation.tex
new file mode 100644
index 000000000..4e9cfe04c
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-request_quotation.tex
@@ -0,0 +1,175 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}lXrlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}lXrllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%notes%>
+
+}
+
+\end{document}
+
diff --git a/sql-ledger/templates/Spanish_Letter-sales_order.html b/sql-ledger/templates/Spanish_Letter-sales_order.html
index d54f37581..a3cdfc76d 100644
--- a/sql-ledger/templates/Spanish_Letter-sales_order.html
+++ b/sql-ledger/templates/Spanish_Letter-sales_order.html
@@ -30,7 +30,7 @@
<td>Fecha</td>
<td>Cód. Cliente</td>
<td width="10%"> </td>
- <td><%addr1%></td>
+ <td><%address1%></td>
</tr>
<tr>
<td><b><%ordnumber%></b></td>
@@ -41,7 +41,7 @@
</tr>
<tr>
<td colspan="4">
- <td><%addr3%></td>
+ <td><%city%> <%state%> <%zipcode%></td>
</tr>
<tr>
<td colspan="4">
diff --git a/sql-ledger/templates/Spanish_Letter-sales_order.tex b/sql-ledger/templates/Spanish_Letter-sales_order.tex
index fd51cb6ef..eb242fc48 100644
--- a/sql-ledger/templates/Spanish_Letter-sales_order.tex
+++ b/sql-ledger/templates/Spanish_Letter-sales_order.tex
@@ -40,13 +40,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
\end{minipage}
}
@@ -58,7 +62,7 @@
%\markboth{\usebox{\hdr}}{\usebox{\hdr}}
%\thispagestyle{empty} %use this with letterhead paper
-<%pagebreak 90 27 48%>
+<%pagebreak 90 27 37%>
\end{tabular*}
\newpage
\usebox{\hdr}
diff --git a/sql-ledger/templates/Spanish_Letter-sales_quotation.html b/sql-ledger/templates/Spanish_Letter-sales_quotation.html
new file mode 100644
index 000000000..cc57a5c1e
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-sales_quotation.html
@@ -0,0 +1,225 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10>&nbsp;</td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3>&nbsp;</td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td>&nbsp;</td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc %</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discountrate%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4>&nbsp;</td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>&nbsp;
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td>&nbsp;</td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_Letter-sales_quotation.tex b/sql-ledger/templates/Spanish_Letter-sales_quotation.tex
new file mode 100644
index 000000000..acc487027
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-sales_quotation.tex
@@ -0,0 +1,157 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%notes%>
+
+}
+
+\vfill
+
+\end{document}
+
+
diff --git a/sql-ledger/templates/Spanish_Letter-statement.html b/sql-ledger/templates/Spanish_Letter-statement.html
index 6fca322ee..a5efdf019 100644
--- a/sql-ledger/templates/Spanish_Letter-statement.html
+++ b/sql-ledger/templates/Spanish_Letter-statement.html
@@ -36,10 +36,14 @@
<table width=100%>
<tr valign=top>
<td><%name%>
- <br><%addr1%>
- <br><%addr2%>
- <br><%addr3%>
- <br><%addr4%>
+ <br><%address1%>
+ <%if address2%>
+<br><%address2%>
+<%end address2%>
+ <br><%city%> <%state%> <%zipcode%>
+ <%if country%>
+<%country%>
+<%end country%>
<br>
<%if customerphone%>
<br>Tel: <%customerphone%>
diff --git a/sql-ledger/templates/Spanish_Letter-statement.tex b/sql-ledger/templates/Spanish_Letter-statement.tex
index 0b63f7523..fdc7339fc 100644
--- a/sql-ledger/templates/Spanish_Letter-statement.tex
+++ b/sql-ledger/templates/Spanish_Letter-statement.tex
@@ -44,29 +44,6 @@
\pagestyle{myheadings}
%\thispagestyle{empty} use this with letterhead paper
-<%pagebreak 90 27 48%>
-\end{tabular*}
-
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
-
-\newpage
-
-\markright{<%company%>\hfill <%statementdate%>}
-
-\vspace*{-12pt}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
- \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
- \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
- carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
-<%end pagebreak%>
-
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
\vspace*{1.5cm}
@@ -76,13 +53,17 @@
<%name%>
-<%addr1%>
+<%address1%>
-<%addr2%>
+<%if address2%>
+<%address2%>
+<%end address2%>
-<%addr3%>
+<%city%> <%state%> <%zipcode%>
-<%addr4%>
+<%if country%>
+<%country%>
+<%end country%>
}
\parbox[t]{7.5cm}{
@@ -100,9 +81,7 @@ Fax: <%customerfax%>
\vspace{1cm}
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
\vspace{2cm}
@@ -117,7 +96,7 @@ Fax: <%customerfax%>
\end{tabular*}
\rule{\textwidth}{1pt}
-\vspace{1cm}
+\vspace{0.5cm}
\hfill
\begin{tabularx}{7cm}{Xr@{}}
@@ -128,10 +107,5 @@ Fax: <%customerfax%>
Please make check payable to <%company%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
\end{document}
diff --git a/sql-ledger/templates/Spanish_Letter-work_order.html b/sql-ledger/templates/Spanish_Letter-work_order.html
new file mode 100644
index 000000000..0732fe277
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-work_order.html
@@ -0,0 +1,174 @@
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>W O R K &nbsp;&nbsp; O R D E R</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%address1%>
+ <%if address2%>
+ <br><%address2%>
+ <%end address2%>
+ <br><%city%> <%state%>
+ <br><%zipcode%>
+ <%if country%>
+ <br><%country%>
+ <%end country%>
+ <br>
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+ <%if customerphone%>
+ <br>Tel: <%customerphone%>
+ <%end customerphone%>
+ <%if customerfax%>
+ <br>Fax: <%customerfax%>
+ <%end customerfax%>
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptoaddress1%>
+ <%if shiptoaddress2%>
+ <br><%shiptoaddress2%>
+ <%end shiptoaddress2%>
+ <br><%shiptocity%> <%shiptostate%>
+ <br><%shiptozipcode%>
+ <%if shiptocountry%>
+ <br><%shiptocountry%>
+ <%end shiptocountry%>
+ <br>
+ <%if shiptocontact%>
+ <br><%shiptocontact%>
+ <%end shiptocontact%>
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ <%if shiptoemail%>
+ <br><%shiptoemail%>
+ <%end shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order Number</th>
+ <th width=17% align=left>Order Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left nowrap>Salesperson</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship Via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%></td>
+ <td><%orddate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%>&nbsp;</td>
+ <td><%shipvia%>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th>&nbsp;</th>
+ <th><font color=ffffff>Serial No.</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%>.</td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td><%serialnumber%></td>
+ </tr>
+ <%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+
+ <%if notes%>
+ <td><%notes%></td>
+ <%end notes%>
+ </tr>
+</table>
+
+</body>
+</html>
+
diff --git a/sql-ledger/templates/Spanish_Letter-work_order.tex b/sql-ledger/templates/Spanish_Letter-work_order.tex
new file mode 100644
index 000000000..cb6774d9f
--- /dev/null
+++ b/sql-ledger/templates/Spanish_Letter-work_order.tex
@@ -0,0 +1,177 @@
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-1.9cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{%
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5em]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%address1%>
+
+<%address2%>
+
+<%city%> <%state%> <%zipcode%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+\vspace{0.2cm}
+<%end contact%>
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptoaddress1%>
+
+<%shiptoaddress2%>
+
+<%shiptocity%> <%shiptostate%> <%shiptozipcode%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+\vspace{0.2cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{W O R K} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em]
+ \hline
+ <%ordnumber%> & <%orddate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXrll@{}}
+ \textbf{No.} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ & \textbf{Serial Number} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%serialnumber%> \\
+<%end number%>
+\end{tabularx}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\vspace{1cm}
+
+\rule{\textwidth}{0.5pt}
+
+\end{document}
+
+
+
+
+
+