Line 13:
Line 13:
DAT="19"
DAT="19"
PSQL="psql -d dolibarr -U dolibarr -t -c"
PSQL="psql -d dolibarr -U dolibarr -t -c"
−
c3000="select sum(credit) from llx_accounting_bookkeeping where code_journal = \
+
SALES="select sum(credit) from llx_accounting_bookkeeping where code_journal = \
'short_code_for_sell_journal' and numero_compte = 'sales_account_number' and doc_date <= '12/31/$DAT' and doc_date >= '\
'short_code_for_sell_journal' and numero_compte = 'sales_account_number' and doc_date <= '12/31/$DAT' and doc_date >= '\
01/01/$DAT'"
01/01/$DAT'"
Line 19:
Line 19:
echo
echo
echo -n "Total sales before taxes:"
echo -n "Total sales before taxes:"
−
$PSQL "$c3000"
+
$PSQL "$SALES"
</pre>
</pre>