#!/usr/bin/perl
# Blog aggregation plugin.
package IkiWiki::Plugin::aggregate;
use warnings;
use strict;
use IkiWiki 2.00;
use HTML::Entities;
use HTML::Parser;
use HTML::Tagset;
use URI;
use open qw{:utf8 :std};
my %feeds;
my %guids;
sub import { #{{{
hook(type => "getopt", id => "aggregate", call => \&getopt);
hook(type => "checkconfig", id => "aggregate", call => \&checkconfig);
hook(type => "filter", id => "aggregate", call => \&filter);
hook(type => "preprocess", id => "aggregate", call => \&preprocess);
hook(type => "delete", id => "aggregate", call => \&delete);
hook(type => "savestate", id => "aggregate", call => \&savestate);
} # }}}
sub getopt () { #{{{
eval q{use Getopt::Long};
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("aggregate" => \$config{aggregate});
} #}}}
sub checkconfig () { #{{{
if ($config{aggregate} && ! ($config{post_commit} &&
IkiWiki::commit_hook_enabled())) {
if (! IkiWiki::lockwiki(0)) {
debug("wiki is locked by another process, not aggregating");
exit 1;
}
loadstate();
IkiWiki::loadindex();
aggregate();
expire();
savestate();
clearstate();
IkiWiki::unlockwiki();
}
} #}}}
sub filter (@) { #{{{
my %params=@_;
my $page=$params{page};
loadstate(); # if not already loaded
# Mark all feeds originating on this page as removable;
# preprocess will unmark those that still exist.
remove_feeds($page);
return $params{content};
} # }}}
sub preprocess (@) { #{{{
my %params=@_;
foreach my $required (qw{name url}) {
if (! exists $params{$required}) {
return "[[aggregate ".sprintf(gettext("missing %s parameter"), $required)."]]";
}
}
my $feed={};
my $name=$params{name};
if (exists $feeds{$name}) {
$feed=$feeds{$name};
}
else {
$feeds{$name}=$feed;
}
$feed->{name}=$name;
$feed->{sourcepage}=$params{page};
$feed->{url}=$params{url};
my $dir=exists $params{dir} ? $params{dir} : $params{page}."/".IkiWiki::titlepage($params{name});
$dir=~s/^\/+//;
($dir)=$dir=~/$config{wiki_file_regexp}/;
$feed->{dir}=$dir;
$feed->{feedurl}=defined $params{feedurl} ? $params{feedurl} : "";
$feed->{updateinterval}=defined $params{updateinterval} ? $params{updateinterval} * 60 : 15 * 60;
$feed->{expireage}=defined $params{expireage} ? $params{expireage} : 0;
$feed->{expirecount}=defined $params{expirecount} ? $params{expirecount} : 0;
delete $feed->{remove};
delete $feed->{expired};
$feed->{lastupdate}=0 unless defined $feed->{lastupdate};
$feed->{numposts}=0 unless defined $feed->{numposts};
$feed->{newposts}=0 unless defined $feed->{newposts};
$feed->{message}=gettext("new feed") unless defined $feed->{message};
$feed->{error}=0 unless defined $feed->{error};
$feed->{tags}=[];
while (@_) {
my $key=shift;
my $value=shift;
if ($key eq 'tag') {
push @{$feed->{tags}}, $value;
}
}
return "{url}."\">".$feed->{name}.": ".
($feed->{error} ? "" : "").$feed->{message}.
($feed->{error} ? "" : "").
" (".$feed->{numposts}." ".gettext("posts").
($feed->{newposts} ? "; ".$feed->{newposts}.
" ".gettext("new") : "").
")";
} # }}}
sub delete (@) { #{{{
my @files=@_;
# Remove feed data for removed pages.
foreach my $file (@files) {
my $page=pagename($file);
remove_feeds($page);
}
} #}}}
my $state_loaded=0;
sub loadstate () { #{{{
return if $state_loaded;
if (-e "$config{wikistatedir}/aggregate") {
open(IN, "$config{wikistatedir}/aggregate") ||
die "$config{wikistatedir}/aggregate: $!";
while () {
$_=IkiWiki::possibly_foolish_untaint($_);
chomp;
my $data={};
foreach my $i (split(/ /, $_)) {
my ($field, $val)=split(/=/, $i, 2);
if ($field eq "name" || $field eq "feed" ||
$field eq "guid" || $field eq "message") {
$data->{$field}=decode_entities($val, " \t\n");
}
elsif ($field eq "tag") {
push @{$data->{tags}}, $val;
}
else {
$data->{$field}=$val;
}
}
if (exists $data->{name}) {
$feeds{$data->{name}}=$data;
}
elsif (exists $data->{guid}) {
$guids{$data->{guid}}=$data;
}
}
close IN;
$state_loaded=1;
}
} #}}}
sub savestate () { #{{{
eval q{use HTML::Entities};
error($@) if $@;
my $newfile="$config{wikistatedir}/aggregate.new";
# TODO: This cleanup function could use improvement. Any newly
# aggregated files are left behind unrecorded, and should be deleted.
my $cleanup = sub { unlink($newfile) };
open (OUT, ">$newfile") || error("open $newfile: $!", $cleanup);
foreach my $data (values %feeds, values %guids) {
if ($data->{remove}) {
if ($data->{name}) {
foreach my $guid (values %guids) {
if ($guid->{feed} eq $data->{name}) {
$guid->{remove}=1;
}
}
}
else {
unlink pagefile($data->{page});
}
next;
}
elsif ($data->{expired} && exists $data->{page}) {
unlink pagefile($data->{page});
delete $data->{page};
delete $data->{md5};
}
my @line;
foreach my $field (keys %$data) {
if ($field eq "name" || $field eq "feed" ||
$field eq "guid" || $field eq "message") {
push @line, "$field=".encode_entities($data->{$field}, " \t\n");
}
elsif ($field eq "tags") {
push @line, "tag=$_" foreach @{$data->{tags}};
}
else {
push @line, "$field=".$data->{$field};
}
}
print OUT join(" ", @line)."\n" || error("write $newfile: $!", $cleanup);
}
close OUT || error("save $newfile: $!", $cleanup);
rename($newfile, "$config{wikistatedir}/aggregate") ||
error("rename $newfile: $!", $cleanup);
} #}}}
sub clearstate () { #{{{
%feeds=();
%guids=();
$state_loaded=0;
} #}}}
sub expire () { #{{{
foreach my $feed (values %feeds) {
next unless $feed->{expireage} || $feed->{expirecount};
my $count=0;
foreach my $item (sort { $IkiWiki::pagectime{$b->{page}} <=> $IkiWiki::pagectime{$a->{page}} }
grep { exists $_->{page} && $_->{feed} eq $feed->{name} && $IkiWiki::pagectime{$_->{page}} }
values %guids) {
if ($feed->{expireage}) {
my $days_old = (time - $IkiWiki::pagectime{$item->{page}}) / 60 / 60 / 24;
if ($days_old > $feed->{expireage}) {
debug(sprintf(gettext("expiring %s (%s days old)"),
$item->{page}, $days_old));
$item->{expired}=1;
}
}
elsif ($feed->{expirecount} &&
$count >= $feed->{expirecount}) {
debug(sprintf(gettext("expiring %s"), $item->{page}));
$item->{expired}=1;
}
else {
$count++;
}
}
}
} #}}}
sub aggregate () { #{{{
eval q{use XML::Feed};
error($@) if $@;
eval q{use URI::Fetch};
error($@) if $@;
eval q{use HTML::Entities};
error($@) if $@;
foreach my $feed (values %feeds) {
next unless $config{rebuild} ||
time - $feed->{lastupdate} >= $feed->{updateinterval};
$feed->{lastupdate}=time;
$feed->{newposts}=0;
$feed->{message}=sprintf(gettext("processed ok at %s"),
displaytime($feed->{lastupdate}));
$feed->{error}=0;
$IkiWiki::forcerebuild{$feed->{sourcepage}}=1;
debug(sprintf(gettext("checking feed %s ..."), $feed->{name}));
if (! length $feed->{feedurl}) {
my @urls=XML::Feed->find_feeds($feed->{url});
if (! @urls) {
$feed->{message}=sprintf(gettext("could not find feed at %s"), $feed->{url});
$feed->{error}=1;
debug($feed->{message});
next;
}
$feed->{feedurl}=pop @urls;
}
my $res=URI::Fetch->fetch($feed->{feedurl});
if (! $res) {
$feed->{message}=URI::Fetch->errstr;
$feed->{error}=1;
debug($feed->{message});
next;
}
if ($res->status == URI::Fetch::URI_GONE()) {
$feed->{message}=gettext("feed not found");
$feed->{error}=1;
debug($feed->{message});
next;
}
my $content=$res->content;
my $f=eval{XML::Feed->parse(\$content)};
if ($@) {
# One common cause of XML::Feed crashing is a feed
# that contains invalid UTF-8 sequences. Convert
# feed to ascii to try to work around.
$feed->{message}.=" ".sprintf(gettext("(invalid UTF-8 stripped from feed)"));
$content=Encode::decode_utf8($content);
$f=eval{XML::Feed->parse(\$content)};
}
if ($@) {
$feed->{message}=gettext("feed crashed XML::Feed!")." ($@)";
$feed->{error}=1;
debug($feed->{message});
next;
}
if (! $f) {
$feed->{message}=XML::Feed->errstr;
$feed->{error}=1;
debug($feed->{message});
next;
}
foreach my $entry ($f->entries) {
add_page(
feed => $feed,
title => defined $entry->title ? decode_entities($entry->title) : "untitled",
link => $entry->link,
content => defined $entry->content->body ? $entry->content->body : "",
guid => defined $entry->id ? $entry->id : time."_".$feed->name,
ctime => $entry->issued ? ($entry->issued->epoch || time) : time,
);
}
}
} #}}}
sub add_page (@) { #{{{
my %params=@_;
my $feed=$params{feed};
my $guid={};
my $mtime;
if (exists $guids{$params{guid}}) {
# updating an existing post
$guid=$guids{$params{guid}};
return if $guid->{expired};
}
else {
# new post
$guid->{guid}=$params{guid};
$guids{$params{guid}}=$guid;
$mtime=$params{ctime};
$feed->{numposts}++;
$feed->{newposts}++;
# assign it an unused page
my $page=IkiWiki::titlepage($params{title});
# escape slashes and periods in title so it doesn't specify
# directory name or trigger ".." disallowing code.
$page=~s!([/.])!"__".ord($1)."__"!eg;
$page=$feed->{dir}."/".$page;
($page)=$page=~/$config{wiki_file_regexp}/;
if (! defined $page || ! length $page) {
$page=$feed->{dir}."/item";
}
my $c="";
while (exists $IkiWiki::pagecase{lc $page.$c} ||
-e pagefile($page.$c)) {
$c++
}
# Make sure that the file name isn't too long.
# NB: This doesn't check for path length limits.
my $max=POSIX::pathconf($config{srcdir}, &POSIX::_PC_NAME_MAX);
if (defined $max && length(htmlfn($page)) >= $max) {
$c="";
$page=$feed->{dir}."/item";
while (exists $IkiWiki::pagecase{lc $page.$c} ||
-e pagefile($page.$c)) {
$c++
}
}
$guid->{page}=$page;
debug(sprintf(gettext("creating new page %s"), $page));
}
$guid->{feed}=$feed->{name};
# To write or not to write? Need to avoid writing unchanged pages
# to avoid unneccessary rebuilding. The mtime from rss cannot be
# trusted; let's use a digest.
eval q{use Digest::MD5 'md5_hex'};
error($@) if $@;
require Encode;
my $digest=md5_hex(Encode::encode_utf8($params{content}));
return unless ! exists $guid->{md5} || $guid->{md5} ne $digest || $config{rebuild};
$guid->{md5}=$digest;
# Create the page.
my $template=template("aggregatepost.tmpl", blind_cache => 1);
$template->param(title => $params{title})
if defined $params{title} && length($params{title});
$template->param(content => htmlescape(htmlabs($params{content}, $feed->{feedurl})));
$template->param(name => $feed->{name});
$template->param(url => $feed->{url});
$template->param(permalink => urlabs($params{link}, $feed->{feedurl}))
if defined $params{link};
if (ref $feed->{tags}) {
$template->param(tags => [map { tag => $_ }, @{$feed->{tags}}]);
}
writefile(htmlfn($guid->{page}), $config{srcdir},
$template->output);
# Set the mtime, this lets the build process get the right creation
# time on record for the new page.
utime $mtime, $mtime, pagefile($guid->{page}) if defined $mtime;
} #}}}
sub htmlescape ($) { #{{{
# escape accidental wikilinks and preprocessor stuff
my $html=shift;
$html=~s/(?new_abs($url, $urlbase)->as_string;
} #}}}
sub htmlabs ($$) { #{{{
# Convert links in html from relative to absolute.
# Note that this is a heuristic, which is not specified by the rss
# spec and may not be right for all feeds. Also, see Debian
# bug #381359.
my $html=shift;
my $urlbase=shift;
my $ret="";
my $p = HTML::Parser->new(api_version => 3);
$p->handler(default => sub { $ret.=join("", @_) }, "text");
$p->handler(start => sub {
my ($tagname, $pos, $text) = @_;
if (ref $HTML::Tagset::linkElements{$tagname}) {
while (4 <= @$pos) {
# use attribute sets from right to left
# to avoid invalidating the offsets
# when replacing the values
my($k_offset, $k_len, $v_offset, $v_len) =
splice(@$pos, -4);
my $attrname = lc(substr($text, $k_offset, $k_len));
next unless grep { $_ eq $attrname } @{$HTML::Tagset::linkElements{$tagname}};
next unless $v_offset; # 0 v_offset means no value
my $v = substr($text, $v_offset, $v_len);
$v =~ s/^([\'\"])(.*)\1$/$2/;
my $new_v=urlabs($v, $urlbase);
$new_v =~ s/\"/"/g; # since we quote with ""
substr($text, $v_offset, $v_len) = qq("$new_v");
}
}
$ret.=$text;
}, "tagname, tokenpos, text");
$p->parse($html);
$p->eof;
return $ret;
} #}}}
sub remove_feeds () { #{{{
my $page=shift;
my %removed;
foreach my $id (keys %feeds) {
if ($feeds{$id}->{sourcepage} eq $page) {
$feeds{$id}->{remove}=1;
$removed{$id}=1;
}
}
} #}}}
sub pagefile ($) { #{{{
my $page=shift;
return "$config{srcdir}/".htmlfn($page);
} #}}}
sub htmlfn ($) { #{{{
return shift().".".$config{htmlext};
} #}}}
1
i>
endobj
81 0 obj
<< /S /GoTo /D (subsection.3.3) >>
endobj
84 0 obj
(Adding/Modifying Accounts)
endobj
85 0 obj
<< /S /GoTo /D (subsection.3.4) >>
endobj
88 0 obj
(Listing Account Balances and Transactions)
endobj
89 0 obj
<< /S /GoTo /D (section.4) >>
endobj
92 0 obj
(Administration)
endobj
93 0 obj
<< /S /GoTo /D (subsection.4.1) >>
endobj
96 0 obj
(Taxes, Defaults, and Preferences)
endobj
97 0 obj
<< /S /GoTo /D (subsubsection.4.1.1) >>
endobj
100 0 obj
(Adding A Sales Tax Account)
endobj
101 0 obj
<< /S /GoTo /D (subsubsection.4.1.2) >>
endobj
104 0 obj
(Setting a Sales Tax Amount)
endobj
105 0 obj
<< /S /GoTo /D (subsubsection.4.1.3) >>
endobj
108 0 obj
(Default Account Setup)
endobj
109 0 obj
<< /S /GoTo /D (subsubsection.4.1.4) >>
endobj
112 0 obj
(Currency Setup)
endobj
113 0 obj
<< /S /GoTo /D (subsubsection.4.1.5) >>
endobj
116 0 obj
(Sequence Settings)
endobj
117 0 obj
<< /S /GoTo /D (subsection.4.2) >>
endobj
120 0 obj
(Audit Control)
endobj
121 0 obj
<< /S /GoTo /D (subsubsection.4.2.1) >>
endobj
124 0 obj
(Explaining transaction reversal)
endobj
125 0 obj
<< /S /GoTo /D (subsubsection.4.2.2) >>
endobj
128 0 obj
(Close books option)
endobj
129 0 obj
<< /S /GoTo /D (subsubsection.4.2.3) >>
endobj
132 0 obj
(Audit Trails)
endobj
133 0 obj
<< /S /GoTo /D (subsection.4.3) >>
endobj
136 0 obj
(Departments)
endobj
137 0 obj
<< /S /GoTo /D (subsubsection.4.3.1) >>
endobj
140 0 obj
(Cost v Profit Centers.)
endobj
141 0 obj
<< /S /GoTo /D (subsection.4.4) >>
endobj
144 0 obj
(Warehouses)
endobj
145 0 obj
<< /S /GoTo /D (subsection.4.5) >>
endobj
148 0 obj
(Languages)
endobj
149 0 obj
<< /S /GoTo /D (subsection.4.6) >>
endobj
152 0 obj
(Types of Businesses)
endobj
153 0 obj
<< /S /GoTo /D (subsection.4.7) >>
endobj
156 0 obj
(Misc.)
endobj
157 0 obj
<< /S /GoTo /D (subsubsection.4.7.1) >>
endobj
160 0 obj
(GIFI)
endobj
161 0 obj
<< /S /GoTo /D (subsubsection.4.7.2) >>
endobj
164 0 obj
(SIC)
endobj
165 0 obj
<< /S /GoTo /D (subsubsection.4.7.3) >>
endobj
168 0 obj
(Overview of Template Editing)
endobj
169 0 obj
<< /S /GoTo /D (subsubsection.4.7.4) >>
endobj
172 0 obj
(Year-end)
endobj
173 0 obj
<< /S /GoTo /D (subsection.4.8) >>
endobj
176 0 obj
(Options in the ledger-smb.conf)
endobj
177 0 obj
<< /S /GoTo /D (section.5) >>
endobj
180 0 obj
(Goods and Services)
endobj
181 0 obj
<< /S /GoTo /D (subsection.5.1) >>
endobj
184 0 obj
(Basic Terms)
endobj
185 0 obj
<< /S /GoTo /D (subsection.5.2) >>
endobj
188 0 obj
(The Price Matrix)
endobj
189 0 obj
<< /S /GoTo /D (subsection.5.3) >>
endobj
192 0 obj
(Pricegroups)
endobj
193 0 obj
<< /S /GoTo /D (subsection.5.4) >>
endobj
196 0 obj
(Groups)
endobj
197 0 obj
<< /S /GoTo /D (subsection.5.5) >>
endobj
200 0 obj
(Labor/Overhead)
endobj
201 0 obj
<< /S /GoTo /D (subsection.5.6) >>
endobj
204 0 obj
(Services)
endobj
205 0 obj
<< /S /GoTo /D (subsubsection.5.6.1) >>
endobj
208 0 obj
(Shipping and Handling as a Service)
endobj
209 0 obj
<< /S /GoTo /D (subsection.5.7) >>
endobj
212 0 obj
(Parts)
endobj
213 0 obj
<< /S /GoTo /D (subsection.5.8) >>
endobj
216 0 obj
(Assemblies and Manufacturing)
endobj
217 0 obj
<< /S /GoTo /D (subsubsection.5.8.1) >>
endobj
220 0 obj
(Stocking Assemblies)
endobj
221 0 obj
<< /S /GoTo /D (subsection.5.9) >>
endobj
224 0 obj
(Reporting)
endobj
225 0 obj
<< /S /GoTo /D (subsubsection.5.9.1) >>
endobj
228 0 obj
(All Items and Parts Reports)
endobj
229 0 obj
<< /S /GoTo /D (subsubsection.5.9.2) >>
endobj
232 0 obj
(Requirements)
endobj
233 0 obj
<< /S /GoTo /D (subsubsection.5.9.3) >>
endobj
236 0 obj
(Services and Labor)
endobj
237 0 obj
<< /S /GoTo /D (subsubsection.5.9.4) >>
endobj
240 0 obj
(Assemblies)
endobj
241 0 obj
<< /S /GoTo /D (subsubsection.5.9.5) >>
endobj
244 0 obj
(Groups and Pricegroups)
endobj
245 0 obj
<< /S /GoTo /D (subsection.5.10) >>
endobj
248 0 obj
(Translations)
endobj
249 0 obj
<< /S /GoTo /D (subsection.5.11) >>
endobj
252 0 obj
(How Cost of Goods Sold is tracked)
endobj
253 0 obj
<< /S /GoTo /D (section.6) >>
endobj
256 0 obj
(AP)
endobj
257 0 obj
<< /S /GoTo /D (subsection.6.1) >>
endobj
260 0 obj
(Basic AP Concepts)
endobj
261 0 obj
<< /S /GoTo /D (subsection.6.2) >>
endobj
264 0 obj
(Vendors)
endobj
265 0 obj
<< /S /GoTo /D (subsection.6.3) >>
endobj
268 0 obj
(AP Transactions)
endobj
269 0 obj
<< /S /GoTo /D (subsection.6.4) >>
endobj
272 0 obj
(AP Invoices)
endobj
273 0 obj
<< /S /GoTo /D (subsubsection.6.4.1) >>
endobj
276 0 obj
(Correcting an AP Invoice)
endobj
277 0 obj
<< /S /GoTo /D (subsection.6.5) >>
endobj
280 0 obj
(Cash payment And Check Printing)
endobj
281 0 obj
<< /S /GoTo /D (subsubsection.6.5.1) >>
endobj
284 0 obj
(Rapid Payment Entry Screen)
endobj
285 0 obj
<< /S /GoTo /D (subsection.6.6) >>
endobj
288 0 obj
(Transaction/Invoice Reporting)
endobj
289 0 obj
<< /S /GoTo /D (subsubsection.6.6.1) >>
endobj
292 0 obj
(Transactions Report)
endobj
293 0 obj
<< /S /GoTo /D (subsubsection.6.6.2) >>
endobj
296 0 obj
(Outstanding Report)
endobj
297 0 obj
<< /S /GoTo /D (subsubsection.6.6.3) >>
endobj
300 0 obj
(AP Aging Report)
endobj
301 0 obj
<< /S /GoTo /D (subsubsection.6.6.4) >>
endobj
304 0 obj
(Tax Paid and Non-taxable Report)
endobj
305 0 obj
<< /S /GoTo /D (subsection.6.7) >>
endobj
308 0 obj
(Vendor Reporting)
endobj
309 0 obj
<< /S /GoTo /D (subsubsection.6.7.1) >>
endobj
312 0 obj
(Vendor Search)
endobj
313 0 obj
<< /S /GoTo /D (subsubsection.6.7.2) >>
endobj
316 0 obj
(Vendor History)
endobj
317 0 obj
<< /S /GoTo /D (section.7) >>
endobj
320 0 obj
(AR)
endobj
321 0 obj
<< /S /GoTo /D (subsection.7.1) >>
endobj
324 0 obj
(Customers)
endobj
325 0 obj
<< /S /GoTo /D (subsubsection.7.1.1) >>
endobj
328 0 obj
(Customer Price Matrix)
endobj
329 0 obj
<< /S /GoTo /D (subsection.7.2) >>
endobj
332 0 obj
(AR Transactions)
endobj
333 0 obj
<< /S /GoTo /D (subsection.7.3) >>
endobj
336 0 obj
(AR Invoices)
endobj
337 0 obj
<< /S /GoTo /D (subsection.7.4) >>
endobj
340 0 obj
(Cash Receipt)
endobj
341 0 obj
<< /S /GoTo /D (subsubsection.7.4.1) >>
endobj
344 0 obj
(Cash Receipts for multiple customers)
endobj
345 0 obj
<< /S /GoTo /D (subsection.7.5) >>
endobj
348 0 obj
(AR Transaction Reporting)
endobj
349 0 obj
<< /S /GoTo /D (subsubsection.7.5.1) >>
endobj
352 0 obj
(AR Transactions Report)
endobj
353 0 obj
<< /S /GoTo /D (subsubsection.7.5.2) >>
endobj
356 0 obj
(AR Aging Report)
endobj
357 0 obj
<< /S /GoTo /D (subsection.7.6) >>
endobj
360 0 obj
(Customer Reporting)
endobj
361 0 obj
<< /S /GoTo /D (section.8) >>
endobj
364 0 obj
(Projects)
endobj
365 0 obj
<< /S /GoTo /D (subsection.8.1) >>
endobj
368 0 obj
(Project Basics)
endobj
369 0 obj
<< /S /GoTo /D (subsection.8.2) >>
endobj
372 0 obj
(Timecards)
endobj
373 0 obj
<< /S /GoTo /D (subsection.8.3) >>
endobj
376 0 obj
(Projects and Invoices)
endobj
377 0 obj
<< /S /GoTo /D (subsection.8.4) >>
endobj
380 0 obj
(Reporting)
endobj
381 0 obj
<< /S /GoTo /D (subsubsection.8.4.1) >>
endobj
384 0 obj
(Timecard Reporting)
endobj
385 0 obj
<< /S /GoTo /D (subsubsection.8.4.2) >>
endobj
388 0 obj
(Project Transaction Reporting)
endobj
389 0 obj
<< /S /GoTo /D (subsubsection.8.4.3) >>
endobj
392 0 obj
(List of Projects)
endobj
393 0 obj
<< /S /GoTo /D (subsection.8.5) >>
endobj
396 0 obj
(Possibilities for Using Projects)
endobj
397 0 obj
<< /S /GoTo /D (section.9) >>
endobj
400 0 obj
(Quotations and Order Management)
endobj
401 0 obj
<< /S /GoTo /D (subsection.9.1) >>
endobj
404 0 obj
(Sales Orders)
endobj
405 0 obj
<< /S /GoTo /D (subsection.9.2) >>
endobj
408 0 obj
(Quotations)
endobj
409 0 obj
<< /S /GoTo /D (subsection.9.3) >>
endobj
412 0 obj
(Shipping)
endobj
413 0 obj
<< /S /GoTo /D (subsection.9.4) >>
endobj
416 0 obj
(AR Work Flow)
endobj
417 0 obj
<< /S /GoTo /D (subsubsection.9.4.1) >>
endobj
420 0 obj
(Service Example)
endobj
421 0 obj
<< /S /GoTo /D (subsubsection.9.4.2) >>
endobj
424 0 obj
(Single Warehouse Example)
endobj
425 0 obj
<< /S /GoTo /D (subsubsection.9.4.3) >>
endobj
428 0 obj
(Multiple Warehouse Example)
endobj
429 0 obj
<< /S /GoTo /D (subsection.9.5) >>
endobj
432 0 obj
(Requests for Quotation \(RFQ\))
endobj
433 0 obj
<< /S /GoTo /D (subsection.9.6) >>
endobj
436 0 obj
(Purchase Orders)
endobj
437 0 obj
<< /S /GoTo /D (subsection.9.7) >>
endobj
440 0 obj
(Receiving)
endobj
441 0 obj
<< /S /GoTo /D (subsection.9.8) >>
endobj
444 0 obj
(AP Work Flow)
endobj
445 0 obj
<< /S /GoTo /D (subsubsection.9.8.1) >>
endobj
448 0 obj
(Bookkeeper entering the received items, order completed in full)
endobj
449 0 obj
<< /S /GoTo /D (subsubsection.9.8.2) >>
endobj
452 0 obj
(Bookkeeper entering received items, order completed in part)
endobj
453 0 obj
<< /S /GoTo /D (subsubsection.9.8.3) >>
endobj
456 0 obj
(Receiving staff entering items)
endobj
457 0 obj
<< /S /GoTo /D (subsection.9.9) >>
endobj
460 0 obj
(Generation and Consolidation)
endobj
461 0 obj
<< /S /GoTo /D (subsubsection.9.9.1) >>
endobj
464 0 obj
(Generation)
endobj
465 0 obj
<< /S /GoTo /D (subsubsection.9.9.2) >>
endobj
468 0 obj
(Consolidation)
endobj
469 0 obj
<< /S /GoTo /D (subsection.9.10) >>
endobj
472 0 obj
(Reporting)
endobj
473 0 obj
<< /S /GoTo /D (subsection.9.11) >>
endobj
476 0 obj
(Shipping Module: Transferring Inventory between Warehouses)
endobj
477 0 obj
<< /S /GoTo /D (section.10) >>
endobj
480 0 obj
(HR)
endobj
481 0 obj
<< /S /GoTo /D (section.11) >>
endobj
484 0 obj
(POS)
endobj
485 0 obj
<< /S /GoTo /D (subsection.11.1) >>
endobj
488 0 obj
(Sales Screen)
endobj
489 0 obj
<< /S /GoTo /D (subsection.11.2) >>
endobj
492 0 obj
(Possibilities for Data Entry)
endobj
493 0 obj
<< /S /GoTo /D (subsection.11.3) >>
endobj
496 0 obj
(Hardware Support)
endobj
497 0 obj
<< /S /GoTo /D (subsection.11.4) >>
endobj
500 0 obj
(Reports)
endobj
501 0 obj
<< /S /GoTo /D (subsubsection.11.4.1) >>
endobj
504 0 obj
(Open Invoices)
endobj
505 0 obj
<< /S /GoTo /D (subsubsection.11.4.2) >>
endobj
508 0 obj
(Receipts)
endobj
509 0 obj
<< /S /GoTo /D (section.12) >>
endobj
512 0 obj
(General Ledger)
endobj
513 0 obj
<< /S /GoTo /D (subsection.12.1) >>
endobj
516 0 obj
(GL Basics)
endobj
517 0 obj
<< /S /GoTo /D (subsubsection.12.1.1) >>
endobj
520 0 obj
(Paper-based accounting systems and the GL)
endobj
521 0 obj
<< /S /GoTo /D (subsubsection.12.1.2) >>
endobj
524 0 obj
(Double Entry Examples on Paper)
endobj
525 0 obj
<< /S /GoTo /D (subsubsection.12.1.3) >>
endobj
528 0 obj
(The GL in Ledger-SMB)
endobj
529 0 obj
<< /S /GoTo /D (subsection.12.2) >>
endobj
532 0 obj
(Cash Transfer)
endobj
533 0 obj
<< /S /GoTo /D (subsection.12.3) >>
endobj
536 0 obj
(GL Transactions)
endobj
537 0 obj
<< /S /GoTo /D (subsection.12.4) >>
endobj
540 0 obj
(Payroll as a GL transaction)
endobj
541 0 obj
<< /S /GoTo /D (subsection.12.5) >>
endobj
544 0 obj
(Reconciliation)
endobj
545 0 obj
<< /S /GoTo /D (subsection.12.6) >>
endobj
548 0 obj
(Reports)
endobj
549 0 obj
<< /S /GoTo /D (subsubsection.12.6.1) >>
endobj
552 0 obj
(GL as access to almost everything else)
endobj
553 0 obj
<< /S /GoTo /D (section.13) >>
endobj
556 0 obj
(Recurring Transactions)
endobj
557 0 obj
<< /S /GoTo /D (section.14) >>
endobj
560 0 obj
(Financial Statements and Reports)
endobj
561 0 obj
<< /S /GoTo /D (subsection.14.1) >>
endobj
564 0 obj
(Cash v. Accrual Basis)
endobj
565 0 obj
<< /S /GoTo /D (subsection.14.2) >>
endobj
568 0 obj
(Viewing the Chart of Accounts and Transactions)
endobj
569 0 obj
<< /S /GoTo /D (subsection.14.3) >>
endobj
572 0 obj
(Trial Balance)
endobj
573 0 obj
<< /S /GoTo /D (subsubsection.14.3.1) >>
endobj
576 0 obj
(The Paper-based function of a Trial Balance)
endobj
577 0 obj
<< /S /GoTo /D (subsubsection.14.3.2) >>
endobj
580 0 obj
(Running the Trial Balance Report)
endobj
581 0 obj
<< /S /GoTo /D (subsubsection.14.3.3) >>
endobj
584 0 obj
(What if the Trial Balance doesn't Balance?)
endobj
585 0 obj
<< /S /GoTo /D (subsubsection.14.3.4) >>
endobj
588 0 obj
(Trial Balance as a Summary of Account Activity)
endobj
589 0 obj
<< /S /GoTo /D (subsubsection.14.3.5) >>
endobj
592 0 obj
(Trial Balance as a Budget Planning Tool)
endobj
593 0 obj
<< /S /GoTo /D (subsection.14.4) >>
endobj
596 0 obj
(Income Statement)
endobj
597 0 obj
<< /S /GoTo /D (subsubsection.14.4.1) >>
endobj
600 0 obj
(Uses of an Income Statement)
endobj
601 0 obj
<< /S /GoTo /D (subsection.14.5) >>
endobj
604 0 obj
(Balance Sheet)
endobj
605 0 obj
<< /S /GoTo /D (subsection.14.6) >>
endobj
608 0 obj
(What if the Balance Sheet doesn't balance?)
endobj
609 0 obj
<< /S /GoTo /D (subsection.14.7) >>
endobj
612 0 obj
(No Statement of Owner Equity?)
endobj
613 0 obj
<< /S /GoTo /D (section.15) >>
endobj
616 0 obj
(The Template System)
endobj
617 0 obj
<< /S /GoTo /D (subsection.15.1) >>
endobj
620 0 obj
(Text Templates)
endobj
621 0 obj
<< /S /GoTo /D (subsection.15.2) >>
endobj
624 0 obj
(HTML Templates)
endobj
625 0 obj
<< /S /GoTo /D (subsection.15.3) >>
endobj
628 0 obj
(LaTeX Templates)
endobj
629 0 obj
<< /S /GoTo /D (subsubsection.15.3.1) >>
endobj
632 0 obj
(What is LaTeX ?)
endobj
633 0 obj
<< /S /GoTo /D (subsubsection.15.3.2) >>
endobj
636 0 obj
(Using L.25emYX to Edit LaTeX Templates)
endobj
637 0 obj
<< /S /GoTo /D (subsection.15.4) >>
endobj
640 0 obj
(Customizing Logos)
endobj
641 0 obj
<< /S /GoTo /D (subsection.15.5) >>
endobj
644 0 obj
(How are They Stored in the Filesystem?)
endobj
645 0 obj
<< /S /GoTo /D (subsection.15.6) >>
endobj
648 0 obj
(Upgrade Issues)
endobj
649 0 obj
<< /S /GoTo /D (part.2) >>
endobj
652 0 obj
(II Technical Overview)
endobj
653 0 obj
<< /S /GoTo /D (section.16) >>
endobj
656 0 obj
(Basic Architecture)
endobj
657 0 obj
<< /S /GoTo /D (subsection.16.1) >>
endobj
660 0 obj
(The Software Stack)
endobj
661 0 obj
<< /S /GoTo /D (subsection.16.2) >>
endobj
664 0 obj
(Capacity Planning)
endobj
665 0 obj
<< /S /GoTo /D (subsubsection.16.2.1) >>
endobj
668 0 obj
(Scalability Strategies)
endobj
669 0 obj
<< /S /GoTo /D (subsubsection.16.2.2) >>
endobj
672 0 obj
(Database Maintenance)
endobj
673 0 obj
<< /S /GoTo /D (subsubsection.16.2.3) >>
endobj
676 0 obj
(Known issues)
endobj
677 0 obj
<< /S /GoTo /D (section.17) >>
endobj
680 0 obj
(Customization Possibilities)
endobj
681 0 obj
<< /S /GoTo /D (subsection.17.1) >>
endobj
684 0 obj
(Brief Guide to the Source Code)
endobj
685 0 obj
<< /S /GoTo /D (subsection.17.2) >>
endobj
688 0 obj
(Data Entry Screens)
endobj
689 0 obj
<< /S /GoTo /D (subsubsection.17.2.1) >>
endobj
692 0 obj
(Examples)
endobj
693 0 obj
<< /S /GoTo /D (subsection.17.3) >>
endobj
696 0 obj
(Extensions)
endobj
697 0 obj
<< /S /GoTo /D (subsubsection.17.3.1) >>
endobj
700 0 obj
(Examples)
endobj
701 0 obj
<< /S /GoTo /D (subsection.17.4) >>
endobj
704 0 obj
(Templates)
endobj
705 0 obj
<< /S /GoTo /D (subsubsection.17.4.1) >>
endobj
708 0 obj
(Examples)
endobj
709 0 obj
<< /S /GoTo /D (subsection.17.5) >>
endobj
712 0 obj
(Reports)
endobj
713 0 obj
<< /S /GoTo /D (subsubsection.17.5.1) >>
endobj
716 0 obj
(Examples)
endobj
717 0 obj
<< /S /GoTo /D (section.18) >>
endobj
720 0 obj
(Integration Possibilities)
endobj
721 0 obj
<< /S /GoTo /D (subsection.18.1) >>
endobj
724 0 obj
(Reporting Tools)
endobj
725 0 obj
<< /S /GoTo /D (subsubsection.18.1.1) >>
endobj
728 0 obj
(Examples)
endobj
729 0 obj
<< /S /GoTo /D (subsection.18.2) >>
endobj
732 0 obj
(Line of Business Tools on PostgreSQL)
endobj
733 0 obj
<< /S /GoTo /D (subsubsection.18.2.1) >>
endobj
736 0 obj
(Known Issues)
endobj
737 0 obj
<< /S /GoTo /D (subsubsection.18.2.2) >>
endobj
740 0 obj
(Strategies)
endobj
741 0 obj
<< /S /GoTo /D (subsubsection.18.2.3) >>
endobj
744 0 obj
(Examples)
endobj
745 0 obj
<< /S /GoTo /D (subsection.18.3) >>
endobj
748 0 obj
(Line of Business Tools on other RDBMS's)
endobj
749 0 obj
<< /S /GoTo /D (subsubsection.18.3.1) >>
endobj
752 0 obj
(Strategies)
endobj
753 0 obj
<< /S /GoTo /D (subsubsection.18.3.2) >>
endobj
756 0 obj
(Integration Products and Open Source Projects)
endobj
757 0 obj
<< /S /GoTo /D (section.19) >>
endobj
760 0 obj
(Customization Guide)
endobj
761 0 obj
<< /S /GoTo /D (subsection.19.1) >>
endobj
764 0 obj
(General Information)
endobj
765 0 obj
<< /S /GoTo /D (subsection.19.2) >>
endobj
768 0 obj
(Customizing Templates)
endobj
769 0 obj
<< /S /GoTo /D (subsubsection.19.2.1) >>
endobj
772 0 obj
(Page Breaks in LaTeX)
endobj
773 0 obj
<< /S /GoTo /D (subsubsection.19.2.2) >>
endobj
776 0 obj
(Conditionals)
endobj
777 0 obj
<< /S /GoTo /D (subsubsection.19.2.3) >>
endobj
780 0 obj
(Loops)
endobj
781 0 obj
<< /S /GoTo /D (subsubsection.19.2.4) >>
endobj
784 0 obj
(File Inclusion)
endobj
785 0 obj
<< /S /GoTo /D (subsubsection.19.2.5) >>
endobj
788 0 obj
(Cross-referencing and multiple passes of LaTeX)
endobj
789 0 obj
<< /S /GoTo /D (subsubsection.19.2.6) >>
endobj
792 0 obj
(Variable Substitution)
endobj
793 0 obj
<< /S /GoTo /D (subsection.19.3) >>
endobj
796 0 obj
(Customizing Forms)
endobj
797 0 obj
<< /S /GoTo /D (subsection.19.4) >>
endobj
800 0 obj
(Customizing Modules)
endobj
801 0 obj
<< /S /GoTo /D (subsubsection.19.4.1) >>
endobj
804 0 obj
(Database Access)
endobj
805 0 obj
<< /S /GoTo /D (subsection.19.5) >>
endobj
808 0 obj
(Examples)
endobj
809 0 obj
<< /S /GoTo /D (subsubsection.19.5.1) >>
endobj
812 0 obj
(Adding a New Report for Sales Data)
endobj
813 0 obj
<< /S /GoTo /D (subsubsection.19.5.2) >>
endobj
816 0 obj
(Truncating Number of Invoices on a Check Stub)
endobj
817 0 obj
<< /S /GoTo /D (subsubsection.19.5.3) >>
endobj
820 0 obj
(Adding the a Check ID flag for Alcohol Purchases)
endobj
821 0 obj
<< /S /GoTo /D (part.3) >>
endobj
824 0 obj
(III Appendix)
endobj
825 0 obj
<< /S /GoTo /D (section.A) >>
endobj
828 0 obj
(Where to Go for More Information)
endobj
829 0 obj
<< /S /GoTo /D (section.B) >>
endobj
832 0 obj
(Quick Tips)
endobj
833 0 obj
<< /S /GoTo /D (subsection.B.1) >>
endobj
836 0 obj
(Understanding Shipping Addresses and Carriers)
endobj
837 0 obj
<< /S /GoTo /D (subsection.B.2) >>
endobj
840 0 obj
(Handling bad debts)
endobj
841 0 obj
<< /S /GoTo /D (section.C) >>
endobj
844 0 obj
(Step by Steps for Vertical Markets)
endobj
845 0 obj
<< /S /GoTo /D (subsection.C.1) >>
endobj
848 0 obj
(Common Installation Errors)
endobj
849 0 obj
<< /S /GoTo /D (subsection.C.2) >>
endobj
852 0 obj
(Retail With Light Manufacturing)
endobj
853 0 obj
<< /S /GoTo /D (section.D) >>
endobj
856 0 obj
(Glossary)
endobj
857 0 obj
<< /S /GoTo /D (section.E) >>
endobj
860 0 obj
(GNU Free Documentation License)
endobj
861 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
864 0 obj
(1. APPLICABILITY AND DEFINITIONS)
endobj
865 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
867 0 obj
(2. VERBATIM COPYING)
endobj
868 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
870 0 obj
(3. COPYING IN QUANTITY)
endobj
871 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
873 0 obj
(4. MODIFICATIONS)
endobj
874 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
876 0 obj
(5. COMBINING DOCUMENTS)
endobj
877 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
879 0 obj
(6. COLLECTIONS OF DOCUMENTS)
endobj
880 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
882 0 obj
(7. AGGREGATION WITH INDEPENDENT WORKS)
endobj
883 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
885 0 obj
(8. TRANSLATION)
endobj
886 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
888 0 obj
(9. TERMINATION)
endobj
889 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
891 0 obj
(10. FUTURE REVISIONS OF THIS LICENSE)
endobj
892 0 obj
<< /S /GoTo /D (section*.3) >>
endobj
894 0 obj
(ADDENDUM: How to use this License for your documents)
endobj
895 0 obj
<< /S /GoTo /D [896 0 R /Fit ] >>
endobj
898 0 obj <<
/Length 2691
/Filter /FlateDecode
>>
stream
x\[s۸~ϯ<Bp1}KMv3}]\J Ai_k t·!iR`#E)fTJE.>/pN9FE1W)BYД#Zb.NpmW7/^a
Q8WJTb-w]T.H9|u1WC_
`+56$JCӲ3ps__YKmg]tVWkcaL5pgHi:;--0DlPeOD#-4<DR$4тVIRv6}۹RBØuEF(RRC 7q7tViC`!0C:>Իu7ۍ]i=hs
,ٲٷ:fVC2Co@v]6wR{j<[nuifſtѵnt_9U۵͜z,;6}]Kݾ|8k ]+VUkg_vMԨ`G{2/A8kV:m?sri~R횪1S/|e}m7z$Ͱa5?eX3͗ֆj;h٥u