[set page_title]Quickbooks Chart of Accounts Export[/set] [set table_perm]=x[/set] [set help_name]quickbooks.items[/set] [set icon_name]icon_config.gif[/set] @_UI_STD_HEAD_@ [if cgi do_export]

    	[export-quicken-coa file="products/coa.iif"]

[/if] [calc] return if ! $CGI->{mv_data_table}; $Values->{mv_data_table} = $CGI->{mv_data_table}; return; [/calc]

The REFNUM will be set to an incrementing integer in PRODUCT_DIR/quickbooks.coa.refnum.

Field mapping

Fixed string to prepend to account NAME:

Quickbook account type (ACCNTTYPE):
(if not derived from a database field)

[perl tables="[either]__UI_QBITEM_TABLES__[or]products inventory[/either]"] my @tables; @tables = split /[\0\s,]+/, ('__UI_QBITEM_TABLES__' || 'products inventory'); @tables = grep /\S/, @tables; my $default_map = $Variable->{UI_QBITEM_MAP} || <<EOF; products:sku REFNUM inventory:account NAME products:category DESC EOF %fmap = grep /\S/, split /\s+/, $default_map; my $out = ''; my $tab; foreach $tab (@tables) { my $db = $Db{$tab}; next if ! $db; $out .= <<EOF; <TABLE>

$tab
EOF for($db->columns()) { $out .= <<EOF;
$_ |
EOF } $out .= "

"; } return $out; [/perl]
@_UI_STD_FOOTER_@