.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Vend::Accounting::SQL_Ledger 3pm" .TH Vend::Accounting::SQL_Ledger 3pm "2016-08-31" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SS "parts table" .IX Subsection "parts table" \&\s-1CREATE TABLE \s0\*(L"parts\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"partnumber\*(R" text, \*(L"description\*(R" text, \*(L"bin\*(R" text, \*(L"unit\*(R" character \fIvarying\fR\|(5), \*(L"listprice\*(R" double precision, \*(L"sellprice\*(R" double precision, \*(L"lastcost\*(R" double precision, \*(L"priceupdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"weight\*(R" real, \*(L"onhand\*(R" real \s-1DEFAULT 0, \s0\*(L"notes\*(R" text, \*(L"makemodel\*(R" boolean \s-1DEFAULT \s0'f', \*(L"assembly\*(R" boolean \s-1DEFAULT \s0'f', \*(L"alternate\*(R" boolean \s-1DEFAULT \s0'f', \*(L"rop\*(R" real, \*(L"inventory_accno_id\*(R" integer, \*(L"income_accno_id\*(R" integer, \*(L"expense_accno_id\*(R" integer, \*(L"obsolete\*(R" boolean \s-1DEFAULT \s0'f' ); .SS "oe table" .IX Subsection "oe table" \&\s-1CREATE TABLE \s0\*(L"oe\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"ordnumber\*(R" text, \*(L"transdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"vendor_id\*(R" integer, \*(L"customer_id\*(R" integer, \*(L"amount\*(R" double precision, \*(L"netamount\*(R" double precision, \*(L"reqdate\*(R" date, \*(L"taxincluded\*(R" boolean, \*(L"shippingpoint\*(R" text, \*(L"notes\*(R" text, \*(L"curr\*(R" \fIcharacter\fR\|(3) ); .SH "NAME" Vend::Accounting::SQL\-Ledger \- SQL\-Ledger Accounting Interface for Interchange .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is an attempt to create a set of callable routines that will allow the easy integration of the SQL-Ledger Accounting package with Interchange. .PP It handles the mapping of the Interchange variable names to the appropriate SQL-Ledger ones as well as parsing the html returned by the SQL-Ledger \*(L"\s-1API\*(R".\s0 .PP Background: SQL-Ledger Accounting \*(L"www.sql\-ledger.org\*(R" is a multiuser, double entry, accounting system written in Perl and is licensed under the \s-1GNU\s0 General Public License. .PP The SQL-Ledger \s-1API:\s0 SQL-Ledger functions can be accessed from the command line by passing all the variables in one long string to the perl script. The variable=value pairs must be separated by an ampersand. See \*(L"www.sql\-ledger.org/misc/api.html\*(R" for more details on the command line interface. .PP \&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .PP This module also happens to be the author's first perl module and probably his second or third perl program in addition to \*(L"Hello World\*(R". :) .PP So please go easy on me. \-Daniel .SH "Schema" .IX Header "Schema" \&\s-1CREATE SEQUENCE \s0\*(L"id\*(R" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; .PP \&\s-1CREATE TABLE \s0\*(L"makemodel\*(R" ( \*(L"id\*(R" integer, \*(L"parts_id\*(R" integer, \*(L"name\*(R" text ); \&\s-1CREATE TABLE \s0\*(L"gl\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"source\*(R" text, \*(L"description\*(R" text, \*(L"transdate\*(R" date \s-1DEFAULT\s0 date('now'::text) ); .PP \&\s-1CREATE TABLE \s0\*(L"chart\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"accno\*(R" integer, \*(L"description\*(R" text, \*(L"charttype\*(R" \fIcharacter\fR\|(1) \s-1DEFAULT \s0'A', \*(L"gifi\*(R" integer, \*(L"category\*(R" \fIcharacter\fR\|(1), \*(L"link\*(R" text ); .PP \&\s-1CREATE TABLE \s0\*(L"defaults\*(R" ( \*(L"inventory_accno_id\*(R" integer, \*(L"income_accno_id\*(R" integer, \*(L"expense_accno_id\*(R" integer, \*(L"fxgain_accno_id\*(R" integer, \*(L"fxloss_accno_id\*(R" integer, \*(L"invnumber\*(R" text, \*(L"ordnumber\*(R" text, \*(L"yearend\*(R" character \fIvarying\fR\|(5), \*(L"curr\*(R" text, \*(L"weightunit\*(R" character \fIvarying\fR\|(5), \*(L"businessnumber\*(R" text, \*(L"version\*(R" character \fIvarying\fR\|(8) ); .PP \&\s-1CREATE TABLE \s0\*(L"acc_trans\*(R" ( \*(L"trans_id\*(R" integer, \*(L"chart_id\*(R" integer, \*(L"amount\*(R" double precision, \*(L"transdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"source\*(R" text, \*(L"cleared\*(R" boolean \s-1DEFAULT \s0'f', \*(L"fx_transaction\*(R" boolean \s-1DEFAULT \s0'f' ); .PP \&\s-1CREATE TABLE \s0\*(L"invoice\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"trans_id\*(R" integer, \*(L"parts_id\*(R" integer, \*(L"description\*(R" text, \*(L"qty\*(R" real, \*(L"allocated\*(R" real, \*(L"sellprice\*(R" double precision, \*(L"fxsellprice\*(R" double precision, \*(L"discount\*(R" real, \*(L"assemblyitem\*(R" boolean \s-1DEFAULT \s0'f' ); .PP \&\s-1CREATE TABLE \s0\*(L"vendor\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"name\*(R" character varying(35), \*(L"addr1\*(R" character varying(35), \*(L"addr2\*(R" character varying(35), \*(L"addr3\*(R" character varying(35), \*(L"addr4\*(R" character varying(35), \*(L"contact\*(R" character varying(35), \*(L"phone\*(R" character varying(20), \*(L"fax\*(R" character varying(20), \*(L"email\*(R" text, \*(L"notes\*(R" text, \*(L"terms\*(R" smallint \s-1DEFAULT 0, \s0\*(L"taxincluded\*(R" boolean ); .PP \&\s-1CREATE TABLE \s0\*(L"customer\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"name\*(R" character varying(35), \*(L"addr1\*(R" character varying(35), \*(L"addr2\*(R" character varying(35), \*(L"addr3\*(R" character varying(35), \*(L"addr4\*(R" character varying(35), \*(L"contact\*(R" character varying(35), \*(L"phone\*(R" character varying(20), \*(L"fax\*(R" character varying(20), \*(L"email\*(R" text, \*(L"notes\*(R" text, \*(L"discount\*(R" real, \*(L"taxincluded\*(R" boolean, \*(L"creditlimit\*(R" double precision \s-1DEFAULT 0, \s0\*(L"terms\*(R" smallint \s-1DEFAULT 0, \s0\*(L"shiptoname\*(R" character varying(35), \*(L"shiptoaddr1\*(R" character varying(35), \*(L"shiptoaddr2\*(R" character varying(35), \*(L"shiptoaddr3\*(R" character varying(35), \*(L"shiptoaddr4\*(R" character varying(35), \*(L"shiptocontact\*(R" character varying(20), \*(L"shiptophone\*(R" character varying(20), \*(L"shiptofax\*(R" character varying(20), \*(L"shiptoemail\*(R" text ); .PP \&\s-1CREATE TABLE \s0\*(L"parts\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"partnumber\*(R" text, \*(L"description\*(R" text, \*(L"bin\*(R" text, \*(L"unit\*(R" character \fIvarying\fR\|(5), \*(L"listprice\*(R" double precision, \*(L"sellprice\*(R" double precision, \*(L"lastcost\*(R" double precision, \*(L"priceupdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"weight\*(R" real, \*(L"onhand\*(R" real \s-1DEFAULT 0, \s0\*(L"notes\*(R" text, \*(L"makemodel\*(R" boolean \s-1DEFAULT \s0'f', \*(L"assembly\*(R" boolean \s-1DEFAULT \s0'f', \*(L"alternate\*(R" boolean \s-1DEFAULT \s0'f', \*(L"rop\*(R" real, \*(L"inventory_accno_id\*(R" integer, \*(L"income_accno_id\*(R" integer, \*(L"expense_accno_id\*(R" integer, \*(L"obsolete\*(R" boolean \s-1DEFAULT \s0'f' ); .PP \&\s-1CREATE TABLE \s0\*(L"assembly\*(R" ( \*(L"id\*(R" integer, \*(L"parts_id\*(R" integer, \*(L"qty\*(R" double precision ); .PP \&\s-1CREATE TABLE \s0\*(L"ar\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"invnumber\*(R" text, \*(L"ordnumber\*(R" text, \*(L"transdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"customer_id\*(R" integer, \*(L"taxincluded\*(R" boolean, \*(L"amount\*(R" double precision, \*(L"netamount\*(R" double precision, \*(L"paid\*(R" double precision, \*(L"datepaid\*(R" date, \*(L"duedate\*(R" date, \*(L"invoice\*(R" boolean \s-1DEFAULT \s0'f', \*(L"shippingpoint\*(R" text, \*(L"terms\*(R" smallint \s-1DEFAULT 0, \s0\*(L"notes\*(R" text, \*(L"curr\*(R" \fIcharacter\fR\|(3) ); .PP \&\s-1CREATE TABLE \s0\*(L"ap\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"invnumber\*(R" text, \*(L"transdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"vendor_id\*(R" integer, \*(L"taxincluded\*(R" boolean, \*(L"amount\*(R" double precision, \*(L"netamount\*(R" double precision, \*(L"paid\*(R" double precision, \*(L"datepaid\*(R" date, \*(L"duedate\*(R" date, \*(L"invoice\*(R" boolean \s-1DEFAULT \s0'f', \*(L"ordnumber\*(R" text, \*(L"curr\*(R" \fIcharacter\fR\|(3) ); .PP \&\s-1CREATE TABLE \s0\*(L"partstax\*(R" ( \*(L"parts_id\*(R" integer, \*(L"chart_id\*(R" integer ); .PP \&\s-1CREATE TABLE \s0\*(L"tax\*(R" ( \*(L"chart_id\*(R" integer, \*(L"rate\*(R" double precision, \*(L"taxnumber\*(R" text ); .PP \&\s-1CREATE TABLE \s0\*(L"customertax\*(R" ( \*(L"customer_id\*(R" integer, \*(L"chart_id\*(R" integer ); .PP \&\s-1CREATE TABLE \s0\*(L"vendortax\*(R" ( \*(L"vendor_id\*(R" integer, \*(L"chart_id\*(R" integer ); .PP \&\s-1CREATE TABLE \s0\*(L"oe\*(R" ( \*(L"id\*(R" integer \s-1DEFAULT\s0 nextval('id'::text), \*(L"ordnumber\*(R" text, \*(L"transdate\*(R" date \s-1DEFAULT\s0 date('now'::text), \*(L"vendor_id\*(R" integer, \*(L"customer_id\*(R" integer, \*(L"amount\*(R" double precision, \*(L"netamount\*(R" double precision, \*(L"reqdate\*(R" date, \*(L"taxincluded\*(R" boolean, \*(L"shippingpoint\*(R" text, \*(L"notes\*(R" text, \*(L"curr\*(R" \fIcharacter\fR\|(3) ); .PP \&\s-1CREATE TABLE \s0\*(L"orderitems\*(R" ( \*(L"trans_id\*(R" integer, \*(L"parts_id\*(R" integer, \*(L"description\*(R" text, \*(L"qty\*(R" real, \*(L"sellprice\*(R" double precision, \*(L"discount\*(R" real ); .PP \&\s-1CREATE TABLE \s0\*(L"exchangerate\*(R" ( \*(L"curr\*(R" \fIcharacter\fR\|(3), \*(L"transdate\*(R" date, \*(L"buy\*(R" double precision, \*(L"sell\*(R" double precision );