stockor 0.1.9 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +254 -72
- data/Guardfile +1 -1
- data/README.md +24 -3
- data/app.json +28 -0
- data/client/skr/Extension.coffee +18 -0
- data/client/skr/components/BankAccountFinder.cjsx +34 -0
- data/client/skr/components/Currency.cjsx +19 -0
- data/client/skr/components/CustomerFinder.cjsx +37 -0
- data/client/skr/components/CustomerLink.cjsx +13 -0
- data/client/skr/components/CustomerProjectFinder.cjsx +49 -0
- data/client/skr/components/GlAccountChooser.cjsx +38 -0
- data/client/skr/components/InvoiceFinder.cjsx +37 -0
- data/client/skr/components/InvoiceLink.cjsx +13 -0
- data/client/skr/components/LocationChooser.cjsx +37 -0
- data/client/skr/components/PaymentCategoryFinder.cjsx +34 -0
- data/client/skr/components/PrintFormChooser.cjsx +29 -0
- data/client/skr/components/SalesOrderFinder.cjsx +38 -0
- data/client/skr/components/ScreenControls.cjsx +20 -0
- data/client/skr/components/SkuFinder.cjsx +30 -0
- data/client/skr/components/SkuLines.cjsx +76 -0
- data/client/skr/components/SystemSettings.cjsx +26 -0
- data/client/skr/components/TermsChooser.cjsx +40 -0
- data/client/skr/components/ToolbarButton.cjsx +7 -0
- data/client/skr/components/TotalsLine.cjsx +21 -0
- data/client/skr/components/TriStateIcon.cjsx +12 -0
- data/client/skr/components/UOMChooser.cjsx +24 -0
- data/client/skr/components/UserPreferences.cjsx +30 -0
- data/client/skr/components/VendorFinder.cjsx +40 -0
- data/client/skr/components/address/Address.cjsx +10 -10
- data/client/skr/components/styles.scss +16 -0
- data/client/skr/index.js +3 -1
- data/client/skr/models/Address.coffee +9 -1
- data/client/skr/models/BankAccount.coffee +17 -0
- data/client/skr/models/Base.coffee +6 -0
- data/client/skr/models/Customer.coffee +17 -10
- data/client/skr/models/CustomerProject.coffee +29 -0
- data/client/skr/models/GlAccount.coffee +22 -10
- data/client/skr/models/GlManualEntry.coffee +4 -2
- data/client/skr/models/GlPeriod.coffee +4 -6
- data/client/skr/models/GlPosting.coffee +7 -7
- data/client/skr/models/GlTransaction.coffee +3 -3
- data/client/skr/models/IaLine.coffee +9 -9
- data/client/skr/models/IaReason.coffee +4 -4
- data/client/skr/models/InvLine.coffee +30 -11
- data/client/skr/models/InventoryAdjustment.coffee +8 -6
- data/client/skr/models/Invoice.coffee +89 -18
- data/client/skr/models/Location.coffee +27 -6
- data/client/skr/models/Payment.coffee +36 -0
- data/client/skr/models/PaymentCategory.coffee +12 -0
- data/client/skr/models/PaymentTerm.coffee +17 -4
- data/client/skr/models/PickTicket.coffee +7 -5
- data/client/skr/models/PoLine.coffee +15 -15
- data/client/skr/models/PoReceipt.coffee +8 -6
- data/client/skr/models/PorLine.coffee +11 -11
- data/client/skr/models/PricingProvider.coffee +6 -0
- data/client/skr/models/PtLine.coffee +13 -13
- data/client/skr/models/PurchaseOrder.coffee +11 -9
- data/client/skr/models/SalesOrder.coffee +59 -22
- data/client/skr/models/Sku.coffee +17 -15
- data/client/skr/models/SkuLoc.coffee +14 -9
- data/client/skr/models/SkuTran.coffee +10 -10
- data/client/skr/models/SkuVendor.coffee +9 -9
- data/client/skr/models/SoLine.coffee +27 -20
- data/client/skr/models/TimeEntry.coffee +75 -0
- data/client/skr/models/Uom.coffee +27 -6
- data/client/skr/models/Vendor.coffee +14 -12
- data/client/skr/models/VoLine.coffee +11 -11
- data/client/skr/models/Voucher.coffee +7 -5
- data/client/skr/models/mixins/HasVisibleId.coffee +7 -0
- data/client/skr/models/mixins/PrintSupport.coffee +6 -0
- data/client/skr/models/mixins/SkuLine.coffee +61 -0
- data/client/skr/screens/Commands.coffee +29 -0
- data/client/skr/screens/bank-maint/BankMaint.cjsx +43 -0
- data/client/skr/screens/bank-maint/index.js +5 -0
- data/client/skr/screens/chart-of-accounts/ChartOfAccounts.cjsx +40 -0
- data/client/skr/screens/chart-of-accounts/index.js +1 -0
- data/client/skr/screens/chart-of-accounts/index.scss +12 -0
- data/client/skr/screens/customer-maint/CustomerMaint.cjsx +35 -36
- data/client/skr/screens/customer-projects/CustomerProjects.cjsx +70 -0
- data/client/skr/screens/customer-projects/index.js +5 -0
- data/client/skr/screens/customer-projects/index.scss +25 -0
- data/client/skr/screens/fresh-books-import/ApiInfo.cjsx +35 -0
- data/client/skr/screens/fresh-books-import/ChooseRecords.cjsx +116 -0
- data/client/skr/screens/fresh-books-import/FreshBooksImport.cjsx +31 -0
- data/client/skr/screens/fresh-books-import/Import.coffee +52 -0
- data/client/skr/screens/fresh-books-import/ViewRecords.cjsx +96 -0
- data/client/skr/screens/fresh-books-import/index.js +1 -0
- data/client/skr/screens/fresh-books-import/index.scss +39 -0
- data/client/skr/screens/gl-accounts/GlAccounts.cjsx +31 -0
- data/client/skr/screens/gl-accounts/index.js +5 -0
- data/client/skr/screens/gl-transactions/GlTransactions.cjsx +46 -0
- data/client/skr/screens/gl-transactions/index.js +1 -0
- data/client/skr/screens/gl-transactions/index.scss +12 -0
- data/client/skr/screens/invoice/Invoice.cjsx +92 -0
- data/client/skr/screens/invoice/Payment.cjsx +28 -0
- data/client/skr/screens/invoice/index.js +5 -0
- data/client/skr/screens/locations/Locations.cjsx +31 -0
- data/client/skr/screens/locations/index.js +5 -0
- data/client/skr/screens/payment-category/PaymentCategory.cjsx +28 -0
- data/client/skr/screens/payment-category/index.js +5 -0
- data/client/skr/screens/payment-category/index.scss +9 -0
- data/client/skr/screens/payment-terms/PaymentTerms.cjsx +28 -0
- data/client/skr/screens/payment-terms/index.js +5 -0
- data/client/skr/screens/payment-terms/index.scss +9 -0
- data/client/skr/screens/payments/Payments.cjsx +59 -0
- data/client/skr/screens/payments/index.js +5 -0
- data/client/skr/screens/sales-order/SalesOrder.cjsx +68 -0
- data/client/skr/screens/sales-order/index.js +1 -5
- data/client/skr/screens/sku-maint/SkuMaint.cjsx +53 -0
- data/client/skr/screens/sku-maint/SkuUomList.cjsx +209 -0
- data/client/skr/screens/sku-maint/index.js +2 -5
- data/client/skr/screens/sku-maint/index.scss +37 -6
- data/client/skr/screens/time-invoicing/TimeInvoicing.cjsx +156 -0
- data/client/skr/screens/time-invoicing/index.js +5 -0
- data/client/skr/screens/time-invoicing/index.scss +7 -0
- data/client/skr/screens/time-tracking/EditEntry.cjsx +54 -0
- data/client/skr/screens/time-tracking/Entries.coffee +132 -0
- data/client/skr/screens/time-tracking/Header.cjsx +71 -0
- data/client/skr/screens/time-tracking/Popover.cjsx +70 -0
- data/client/skr/screens/time-tracking/PopoverMiniControls.cjsx +25 -0
- data/client/skr/screens/time-tracking/TimeTracking.cjsx +63 -0
- data/client/skr/screens/time-tracking/WeekSummary.cjsx +16 -0
- data/client/skr/screens/time-tracking/index.js +1 -0
- data/client/skr/screens/time-tracking/index.scss +126 -0
- data/client/skr/screens/vendor-maint/VendorMaint.cjsx +45 -0
- data/client/skr/screens/vendor-maint/index.js +1 -5
- data/client/skr/styles.scss +1 -13
- data/config/puma.rb +4 -0
- data/config/routes.rb +21 -9
- data/config/screens.rb +147 -32
- data/db/migrate/20140202194700_create_skr_gl_transaction_details.rb +35 -0
- data/db/migrate/20140220031800_create_skr_locations.rb +2 -0
- data/db/migrate/20140220190836_create_skr_vendors.rb +1 -0
- data/db/migrate/20140220203029_create_skr_customers.rb +3 -2
- data/db/migrate/20140224034759_create_skr_skus.rb +2 -3
- data/db/migrate/20140322223912_create_skr_sales_orders.rb +4 -3
- data/db/migrate/20140322223920_create_skr_so_lines.rb +4 -5
- data/db/migrate/20140323001446_create_so_details_view.rb +7 -5
- data/db/migrate/20140327202209_create_skr_pt_lines.rb +2 -2
- data/db/migrate/20140327214000_create_customer_project.rb +16 -0
- data/db/migrate/20140327223002_create_time_entries.rb +17 -0
- data/db/migrate/20140327224000_create_skr_invoices.rb +5 -1
- data/db/migrate/20140327224002_create_skr_inv_lines.rb +3 -1
- data/db/migrate/20140422024010_create_skr_inv_details_view.rb +1 -1
- data/db/migrate/20151121211323_create_customer_project_details_views.rb +31 -0
- data/db/migrate/20160216142845_create_gl_account_balances_view.rb +20 -0
- data/db/migrate/20160229002044_create_bank_accounts.rb +18 -0
- data/db/migrate/20160229041711_create_payments.rb +33 -0
- data/db/migrate/20160307022705_create_create_combined_uom_views.rb +18 -0
- data/db/schema.sql +639 -140
- data/db/seed/chart_of_accounts.yml +8 -6
- data/db/seed/payment_categories.yml +12 -0
- data/db/seed/skus.yml +32 -0
- data/db/seed.rb +21 -0
- data/lib/skr/access_roles.rb +19 -6
- data/lib/skr/concerns/has_sku_loc_lines.rb +0 -16
- data/lib/skr/concerns/inv_extensions.rb +24 -0
- data/lib/skr/concerns/is_sku_loc_line.rb +3 -4
- data/lib/skr/concerns/so_extensions.rb +8 -0
- data/lib/skr/concerns/visible_id_identifier.rb +1 -1
- data/lib/skr/db/migration_helpers.rb +2 -4
- data/lib/skr/extension.rb +11 -4
- data/lib/skr/handlers/fresh_books_import.rb +20 -0
- data/lib/skr/handlers/invoice_from_time_entries.rb +49 -0
- data/lib/skr/jobs/fresh_books/base.rb +54 -0
- data/lib/skr/jobs/fresh_books/import.rb +151 -0
- data/lib/skr/jobs/fresh_books/retrieve.rb +62 -0
- data/lib/skr/model.rb +5 -0
- data/lib/skr/models/address.rb +1 -1
- data/lib/skr/models/bank_account.rb +13 -0
- data/lib/skr/models/business_entity.rb +3 -0
- data/lib/skr/models/customer.rb +1 -1
- data/lib/skr/models/customer_project.rb +22 -0
- data/lib/skr/models/gl_account.rb +13 -3
- data/lib/skr/models/gl_period.rb +6 -0
- data/lib/skr/models/gl_posting.rb +7 -4
- data/lib/skr/models/gl_transaction.rb +19 -33
- data/lib/skr/models/ia_line.rb +1 -1
- data/lib/skr/models/inv_line.rb +33 -15
- data/lib/skr/models/invoice.rb +47 -20
- data/lib/skr/models/location.rb +7 -1
- data/lib/skr/models/payment.rb +49 -0
- data/lib/skr/models/payment_category.rb +11 -0
- data/lib/skr/models/payment_term.rb +1 -1
- data/lib/skr/models/por_line.rb +1 -1
- data/lib/skr/models/pt_line.rb +1 -1
- data/lib/skr/models/sales_order.rb +9 -9
- data/lib/skr/models/sku_loc.rb +1 -1
- data/lib/skr/models/sku_tran.rb +6 -11
- data/lib/skr/models/so_line.rb +22 -12
- data/lib/skr/models/time_entry.rb +36 -0
- data/lib/skr/models/uom.rb +11 -10
- data/lib/skr/models/user_proxy.rb +1 -1
- data/lib/skr/number.rb +25 -0
- data/lib/skr/print/form.rb +46 -0
- data/lib/skr/print/template.rb +48 -0
- data/lib/skr/print.rb +11 -0
- data/lib/skr/string.rb +11 -0
- data/lib/skr/version.rb +1 -1
- data/lib/skr.rb +9 -0
- data/spec/fixtures/skr/address.yml +164 -4
- data/spec/fixtures/skr/bank_account.yml +8 -0
- data/spec/fixtures/skr/customer.yml +30 -4
- data/spec/fixtures/skr/customer_project.yml +20 -0
- data/spec/fixtures/skr/gl_account.yml +19 -1
- data/spec/fixtures/skr/gl_period.yml +3 -0
- data/spec/fixtures/skr/gl_posting.yml +22 -1
- data/spec/fixtures/skr/gl_transaction.yml +4 -1
- data/spec/fixtures/skr/inv_line.yml +35 -0
- data/spec/fixtures/skr/invoice.yml +13 -2
- data/spec/fixtures/skr/location.yml +5 -0
- data/spec/fixtures/skr/payment.yml +10 -0
- data/spec/fixtures/skr/payment_category.yml +8 -0
- data/spec/fixtures/skr/payment_term.yml +37 -3
- data/spec/fixtures/skr/sales_order.yml +12 -1
- data/spec/fixtures/skr/sku.yml +78 -1
- data/spec/fixtures/skr/sku_loc.yml +42 -1
- data/spec/fixtures/skr/sku_tran.yml +24 -1
- data/spec/fixtures/skr/so_line.yml +32 -0
- data/spec/fixtures/skr/time_entry.yml +82 -0
- data/spec/fixtures/skr/uom.yml +52 -1
- data/spec/fixtures/skr/vendor.yml +28 -1
- data/spec/fixtures/stockor.png +0 -0
- data/spec/server/bank_account_spec.rb +10 -0
- data/spec/server/customer_project_spec.rb +10 -0
- data/spec/server/handlers/invoice_from_time_entries_spec.rb +49 -0
- data/spec/server/jobs/fresh_books/import_spec.rb +69 -0
- data/spec/server/jobs/fresh_books/retrieve_spec.rb +37 -0
- data/spec/server/models/address_spec.rb +4 -3
- data/spec/server/models/gl_transaction_spec.rb +3 -3
- data/spec/server/models/inv_line_spec.rb +83 -3
- data/spec/server/models/invoice_spec.rb +32 -3
- data/spec/server/models/payment_spec.rb +40 -0
- data/spec/server/models/sales_order_spec.rb +1 -1
- data/spec/server/models/so_line_spec.rb +3 -3
- data/spec/server/models/spec_helper_spec.rb +1 -1
- data/spec/server/payment_spec.rb +10 -0
- data/spec/server/print/form_spec.rb +47 -0
- data/spec/server/print/template_spec.rb +36 -0
- data/spec/server/spec_helper.rb +14 -1
- data/spec/server/time_entry_spec.rb +10 -0
- data/spec/skr/components/SkuLinesSpec.coffee +61 -0
- data/spec/skr/models/BankAccountSpec.coffee +5 -0
- data/spec/skr/models/CustomerProjectSpec.coffee +5 -0
- data/spec/skr/models/CustomerSpec.coffee +2 -2
- data/spec/skr/models/PaymentSpec.coffee +5 -0
- data/spec/skr/models/SalesOrderSpec.coffee +21 -5
- data/spec/skr/models/SoLineSpec.coffee +7 -2
- data/spec/skr/models/TimeEntrySpec.coffee +5 -0
- data/spec/skr/screens/bank-maint/BankMaintSpec.coffee +5 -0
- data/spec/skr/screens/customer-projects/CustomerProjectsSpec.coffee +5 -0
- data/spec/skr/screens/fresh-books-import/FreshBooksImportSpec.coffee +1 -0
- data/spec/skr/screens/gl-accounts/GlAccountsSpec.coffee +5 -0
- data/spec/skr/screens/invoice/InvoiceSpec.coffee +5 -0
- data/spec/skr/screens/locations/LocationsSpec.coffee +5 -0
- data/spec/skr/screens/payment-category/PaymentCategorySpec.coffee +5 -0
- data/spec/skr/screens/payment-terms/PaymentTermsSpec.coffee +5 -0
- data/spec/skr/screens/payments/PaymentsSpec.coffee +5 -0
- data/spec/skr/screens/time-invoicing/TimeInvoicingSpec.coffee +5 -0
- data/spec/skr/screens/time-tracking/TimeTrackingSpec.coffee +14 -0
- data/spec/vcr/freshbooks.yml +698 -0
- data/stockor.gemspec +5 -1
- data/templates/print/fonts/GnuMICR.otf +0 -0
- data/templates/print/layout.tex.erb +39 -0
- data/templates/print/packages/booktabs.sty +182 -0
- data/templates/print/packages/fancybox.sty +966 -0
- data/templates/print/packages/fancyhdr.sty +485 -0
- data/templates/print/packages/graphbox.sty +129 -0
- data/templates/print/packages/lastpage.sty +283 -0
- data/templates/print/packages/lastpage209.sty +70 -0
- data/templates/print/packages/marginnote.sty +412 -0
- data/templates/print/packages/multirow.sty +159 -0
- data/templates/print/packages/rotating.sty +282 -0
- data/templates/print/packages/tabu.sty +2557 -0
- data/templates/print/packages/textpos.sty +361 -0
- data/templates/print/packages/varwidth.sty +318 -0
- data/templates/print/partials/address.tex.erb +6 -0
- data/templates/print/partials/bill_to_ship_to.tex.erb +13 -0
- data/templates/print/partials/header.tex.erb +13 -0
- data/templates/print/partials/invoice_paid_state.tex.erb +2 -0
- data/templates/print/partials/old/inv_lines_grouping.tex.erb +8 -0
- data/templates/print/partials/old/labor_lines_footer.tex.erb +18 -0
- data/templates/print/partials/skus_table.tex.erb +32 -0
- data/templates/print/partials/skus_table_col_hdr.tex.erb +8 -0
- data/templates/print/partials/skus_table_footer.tex.erb +5 -0
- data/templates/print/partials/skus_table_group_footer.tex.erb +4 -0
- data/templates/print/partials/skus_table_invoice_footer.tex.erb +25 -0
- data/templates/print/partials/skus_table_invoice_info_line.tex.erb +16 -0
- data/templates/print/partials/skus_table_labor_col_hdr.tex.erb +8 -0
- data/templates/print/partials/skus_table_labor_group_footer.tex.erb +7 -0
- data/templates/print/partials/skus_table_labor_line.tex.erb +11 -0
- data/templates/print/partials/skus_table_line.tex.erb +6 -0
- data/templates/print/partials/skus_table_other_charge_lines.tex.erb +7 -0
- data/templates/print/partials/so_info_line.tex.erb +14 -0
- data/templates/print/types/invoice/default.tex.erb +13 -0
- data/templates/print/types/invoice/labor.tex.erb +33 -0
- data/templates/print/types/payment/default.tex.erb +64 -0
- data/templates/print/types/sales-order/default.tex.erb +8 -0
- metadata +252 -15
- data/client/skr/components/address/address.html +0 -20
- data/client/skr/models/mixins/CodeField.coffee +0 -5
- data/client/skr/screens/customer-maint/index.scss +0 -11
- data/client/skr/screens/customer-maint/layout.html +0 -32
- data/client/skr/screens/sales-order/SalesOrder.coffee +0 -30
- data/client/skr/screens/sales-order/index.scss +0 -8
- data/client/skr/screens/sales-order/layout.html +0 -30
- data/client/skr/screens/sku-maint/SkuMaint.coffee +0 -18
- data/client/skr/screens/sku-maint/layout.html +0 -16
- data/client/skr/screens/vendor-maint/VendorMaint.coffee +0 -28
- data/client/skr/screens/vendor-maint/index.scss +0 -8
- data/client/skr/screens/vendor-maint/layout.html +0 -32
data/stockor.gemspec
CHANGED
@@ -24,11 +24,15 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.required_ruby_version = '>= 2.1'
|
25
25
|
|
26
26
|
spec.add_dependency 'aasm', '~>4.1'
|
27
|
-
|
27
|
+
spec.add_dependency 'erb_latex', '0.3'
|
28
28
|
spec.add_dependency 'lanes'
|
29
|
+
spec.add_dependency 'numbers_in_words', '~> 0.4.0'
|
30
|
+
spec.add_dependency 'ruby-freshbooks'
|
29
31
|
|
30
32
|
spec.add_development_dependency "bundler", "~> 1.5"
|
31
33
|
spec.add_development_dependency "rake"
|
34
|
+
spec.add_development_dependency "vcr", "~> 3.0"
|
35
|
+
spec.add_development_dependency "webmock", "~> 1.22"
|
32
36
|
spec.add_development_dependency "guard"
|
33
37
|
spec.add_development_dependency "growl"
|
34
38
|
spec.add_development_dependency "pry-byebug"
|
Binary file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
\documentclass[letterpaper]{article}
|
2
|
+
\usepackage{tabu}
|
3
|
+
\usepackage{tabularx}
|
4
|
+
\usepackage{calc}
|
5
|
+
\usepackage{multirow}
|
6
|
+
\usepackage{booktabs}
|
7
|
+
\usepackage{longtable}
|
8
|
+
\usepackage{graphbox}
|
9
|
+
\usepackage{fancybox}
|
10
|
+
\usepackage{marginnote}
|
11
|
+
\usepackage{xltxtra}
|
12
|
+
\hfuzz=5pt
|
13
|
+
\usepackage{array}
|
14
|
+
<% if @position == :absolute -%>
|
15
|
+
\usepackage[absolute]{textpos}
|
16
|
+
<% else -%>
|
17
|
+
\usepackage{textpos}
|
18
|
+
<% end -%>
|
19
|
+
\usepackage{rotating}
|
20
|
+
\usepackage[usenames,dvipsnames]{color}
|
21
|
+
\usepackage{hyperref}
|
22
|
+
\hypersetup{
|
23
|
+
pdfinfo={
|
24
|
+
Creator={Stockor.com}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
\showboxdepth=\maxdimen
|
28
|
+
\showboxbreadth=\maxdimen
|
29
|
+
\usepackage{fancyhdr,lastpage}
|
30
|
+
% showframe to debug geometry
|
31
|
+
\usepackage[includehead,includefoot, left=2cm, top=1cm, headheight=2.5cm,headsep=8pt, right=2cm, foot=18pt, bottom=1cm]{geometry}
|
32
|
+
\newcolumntype{C}{>{\centering\arraybackslash}p{2cm}}
|
33
|
+
\pagestyle{fancy}
|
34
|
+
\fancyhf{}
|
35
|
+
\renewcommand{\headrulewidth}{0pt}
|
36
|
+
\setlength{\parindent}{0pt}
|
37
|
+
% begin body
|
38
|
+
<%= yield %>
|
39
|
+
% end body
|
@@ -0,0 +1,182 @@
|
|
1
|
+
%%
|
2
|
+
%% This is file `booktabs.sty',
|
3
|
+
%% generated with the docstrip utility.
|
4
|
+
%%
|
5
|
+
%% The original source files were:
|
6
|
+
%%
|
7
|
+
%% booktabs.dtx (with options: `package')
|
8
|
+
%%
|
9
|
+
%% -----------------------------------------------------------------
|
10
|
+
%% Author: Simon Fear
|
11
|
+
%% Maintainer: Danie Els (dnjels@sun.ac.za)
|
12
|
+
%%
|
13
|
+
%% This file is part of the booktabs package for publication
|
14
|
+
%% quality tables for LaTeX
|
15
|
+
%%
|
16
|
+
%% Copyright (C) 1995--2005 Simon Fear
|
17
|
+
%%
|
18
|
+
%% This program is free software; you can redistribute it and/or
|
19
|
+
%% modify it under the terms of the GNU General Public License as
|
20
|
+
%% published by the Free Software Foundation; either version 2 of
|
21
|
+
%% the License, or (at your option) any later version.
|
22
|
+
%%
|
23
|
+
%% This program is distributed in the hope that it will be useful,
|
24
|
+
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25
|
+
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26
|
+
%% GNU General Public License for more details.
|
27
|
+
%%
|
28
|
+
%% You should have received a copy of the GNU General Public
|
29
|
+
%% License along with this program; if not, write to the Free
|
30
|
+
%% Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
31
|
+
%% MA 02111-1307 USA
|
32
|
+
%% -----------------------------------------------------------------
|
33
|
+
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
|
34
|
+
\ProvidesPackage{booktabs}
|
35
|
+
[2005/04/14 v1.61803 publication quality tables]
|
36
|
+
\newdimen\heavyrulewidth
|
37
|
+
\newdimen\lightrulewidth
|
38
|
+
\newdimen\cmidrulewidth
|
39
|
+
\newdimen\belowrulesep
|
40
|
+
\newdimen\belowbottomsep
|
41
|
+
\newdimen\aboverulesep
|
42
|
+
\newdimen\abovetopsep
|
43
|
+
\newdimen\cmidrulesep
|
44
|
+
\newdimen\cmidrulekern
|
45
|
+
\newdimen\defaultaddspace
|
46
|
+
\heavyrulewidth=.08em
|
47
|
+
\lightrulewidth=.05em
|
48
|
+
\cmidrulewidth=.03em
|
49
|
+
\belowrulesep=.65ex
|
50
|
+
\belowbottomsep=0pt
|
51
|
+
\aboverulesep=.4ex
|
52
|
+
\abovetopsep=0pt
|
53
|
+
\cmidrulesep=\doublerulesep
|
54
|
+
\cmidrulekern=.5em
|
55
|
+
\defaultaddspace=.5em
|
56
|
+
\newcount\@cmidla
|
57
|
+
\newcount\@cmidlb
|
58
|
+
\newdimen\@aboverulesep
|
59
|
+
\newdimen\@belowrulesep
|
60
|
+
\newcount\@thisruleclass
|
61
|
+
\newcount\@lastruleclass
|
62
|
+
\@lastruleclass=0
|
63
|
+
\newdimen\@thisrulewidth
|
64
|
+
\def\futurenonspacelet#1{\def\@BTcs{#1}%
|
65
|
+
\afterassignment\@BTfnslone\let\nexttoken= }
|
66
|
+
\def\@BTfnslone{\expandafter\futurelet\@BTcs\@BTfnsltwo}
|
67
|
+
\def\@BTfnsltwo{\expandafter\ifx\@BTcs\@sptoken\let\next=\@BTfnslthree
|
68
|
+
\else\let\next=\nexttoken\fi \next}
|
69
|
+
\def\@BTfnslthree{\afterassignment\@BTfnslone\let\next= }
|
70
|
+
\def\toprule{\noalign{\ifnum0=`}\fi
|
71
|
+
\@aboverulesep=\abovetopsep
|
72
|
+
\global\@belowrulesep=\belowrulesep %global cos for use in the next noalign
|
73
|
+
\global\@thisruleclass=\@ne
|
74
|
+
\@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}}
|
75
|
+
\def\midrule{\noalign{\ifnum0=`}\fi
|
76
|
+
\@aboverulesep=\aboverulesep
|
77
|
+
\global\@belowrulesep=\belowrulesep
|
78
|
+
\global\@thisruleclass=\@ne
|
79
|
+
\@ifnextchar[{\@BTrule}{\@BTrule[\lightrulewidth]}}
|
80
|
+
\def\bottomrule{\noalign{\ifnum0=`}\fi
|
81
|
+
\@aboverulesep=\aboverulesep
|
82
|
+
\global\@belowrulesep=\belowbottomsep
|
83
|
+
\global\@thisruleclass=\@ne
|
84
|
+
\@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}}
|
85
|
+
\def\specialrule#1#2#3{\noalign{\ifnum0=`}\fi
|
86
|
+
\@aboverulesep=#2\global\@belowrulesep=#3\global\@thisruleclass=\tw@
|
87
|
+
\@BTrule[#1]}
|
88
|
+
\def\addlinespace{\noalign{\ifnum0=`}\fi
|
89
|
+
\@ifnextchar[{\@addspace}{\@addspace[\defaultaddspace]}}
|
90
|
+
\def\@addspace[#1]{\global\@belowrulesep=#1\global\@thisruleclass=\tw@
|
91
|
+
\futurelet\@tempa\@BTendrule}
|
92
|
+
\def\@BTrule[#1]{%
|
93
|
+
\global\@thisrulewidth=#1\relax
|
94
|
+
\ifnum\@thisruleclass=\tw@\vskip\@aboverulesep\else
|
95
|
+
\ifnum\@lastruleclass=\z@\vskip\@aboverulesep\else
|
96
|
+
\ifnum\@lastruleclass=\@ne\vskip\doublerulesep\fi\fi\fi
|
97
|
+
\ifx\longtable\undefined
|
98
|
+
\let\@BTswitch\@BTnormal
|
99
|
+
\else\ifx\hline\LT@hline
|
100
|
+
\let\@BTswitch\@BLTrule
|
101
|
+
\else
|
102
|
+
\let\@BTswitch\@BTnormal
|
103
|
+
\fi\fi
|
104
|
+
\@BTswitch}
|
105
|
+
\AtBeginDocument{%
|
106
|
+
\providecommand*\CT@arc@{}}%% colortbl support
|
107
|
+
\def\@BTnormal{%
|
108
|
+
{\CT@arc@\hrule\@height\@thisrulewidth}%
|
109
|
+
\futurenonspacelet\@tempa\@BTendrule}
|
110
|
+
\def\@BLTrule{\@ifnextchar({\@@BLTrule}{\@@BLTrule()}}
|
111
|
+
\def\@@BLTrule(#1){\@setrulekerning{#1}%
|
112
|
+
\global\@cmidlb\LT@cols
|
113
|
+
\ifnum0=`{\fi}%
|
114
|
+
\@cmidruleb
|
115
|
+
\noalign{\ifnum0=`}\fi
|
116
|
+
\futurenonspacelet\@tempa\@BTendrule}
|
117
|
+
\def\@BTendrule{\ifx\@tempa\toprule\global\@lastruleclass=\@thisruleclass
|
118
|
+
\else\ifx\@tempa\midrule\global\@lastruleclass=\@thisruleclass
|
119
|
+
\else\ifx\@tempa\bottomrule\global\@lastruleclass=\@thisruleclass
|
120
|
+
\else\ifx\@tempa\cmidrule\global\@lastruleclass=\@thisruleclass
|
121
|
+
\else\ifx\@tempa\specialrule\global\@lastruleclass=\@thisruleclass
|
122
|
+
\else\ifx\@tempa\addlinespace\global\@lastruleclass=\@thisruleclass
|
123
|
+
\else\global\@lastruleclass=\z@\fi\fi\fi\fi\fi\fi
|
124
|
+
\ifnum\@lastruleclass=\@ne\relax\else\vskip\@belowrulesep\fi
|
125
|
+
\ifnum0=`{\fi}}
|
126
|
+
\def\@setrulekerning#1{%
|
127
|
+
\global\let\cmrkern@l\z@
|
128
|
+
\global\let\cmrkern@r\z@
|
129
|
+
\@tfor\@tempa :=#1\do
|
130
|
+
{\def\@tempb{r}%
|
131
|
+
\ifx\@tempa\@tempb
|
132
|
+
\global\let\cmrkern@r\cmidrulekern
|
133
|
+
\def\cmrsideswitch{\cmrkern@r}%
|
134
|
+
\else
|
135
|
+
\def\@tempb{l}%
|
136
|
+
\ifx\@tempa\@tempb
|
137
|
+
\global\let\cmrkern@l\cmidrulekern
|
138
|
+
\def\cmrsideswitch{\cmrkern@l}%
|
139
|
+
\else
|
140
|
+
\global\expandafter\let\cmrsideswitch\@tempa
|
141
|
+
\fi
|
142
|
+
\fi}}
|
143
|
+
\def\cmidrule{\noalign{\ifnum0=`}\fi
|
144
|
+
\@ifnextchar[{\@cmidrule}{\@cmidrule[\cmidrulewidth]}}
|
145
|
+
\def\@cmidrule[#1]{\@ifnextchar({\@@cmidrule[#1]}{\@@cmidrule[#1]()}}
|
146
|
+
\def\@@cmidrule[#1](#2)#3{\@@@cmidrule[#3]{#1}{#2}}
|
147
|
+
\def\@@@cmidrule[#1-#2]#3#4{\global\@cmidla#1\relax
|
148
|
+
\global\advance\@cmidla\m@ne
|
149
|
+
\ifnum\@cmidla>0\global\let\@gtempa\@cmidrulea\else
|
150
|
+
\global\let\@gtempa\@cmidruleb\fi
|
151
|
+
\global\@cmidlb#2\relax
|
152
|
+
\global\advance\@cmidlb-\@cmidla
|
153
|
+
\global\@thisrulewidth=#3
|
154
|
+
\@setrulekerning{#4}
|
155
|
+
\ifnum\@lastruleclass=\z@\vskip \aboverulesep\fi
|
156
|
+
\ifnum0=`{\fi}\@gtempa
|
157
|
+
\noalign{\ifnum0=`}\fi\futurenonspacelet\@tempa\@xcmidrule}
|
158
|
+
\def\@xcmidrule{%
|
159
|
+
\ifx\@tempa\cmidrule
|
160
|
+
\vskip-\@thisrulewidth
|
161
|
+
\global\@lastruleclass=\@ne
|
162
|
+
\else \ifx\@tempa\morecmidrules
|
163
|
+
\vskip \cmidrulesep
|
164
|
+
\global\@lastruleclass=\@ne\else
|
165
|
+
\vskip \belowrulesep
|
166
|
+
\global\@lastruleclass=\z@
|
167
|
+
\fi\fi
|
168
|
+
\ifnum0=`{\fi}}
|
169
|
+
\def\@cmidrulea{%
|
170
|
+
\multispan\@cmidla&\multispan\@cmidlb
|
171
|
+
\unskip\hskip\cmrkern@l%
|
172
|
+
{\CT@arc@\leaders\hrule \@height\@thisrulewidth\hfill}%
|
173
|
+
\hskip\cmrkern@r\cr}%
|
174
|
+
\def\@cmidruleb{%
|
175
|
+
\multispan\@cmidlb
|
176
|
+
\unskip\hskip \cmrkern@l%
|
177
|
+
{\CT@arc@\leaders\hrule \@height\@thisrulewidth\hfill}%
|
178
|
+
\hskip\cmrkern@r\cr}%
|
179
|
+
\def\morecmidrules{\noalign{\relax}}
|
180
|
+
\endinput
|
181
|
+
%%
|
182
|
+
%% End of file `booktabs.sty'.
|