This typically looks like this:
DROP SEQUENCE id ; CREATE SEQUENCE id START 10579; -- DROP SEQUENCE invoiceid ; CREATE SEQUENCE invoiceid START 11096; -- DROP SEQUENCE orderitemsid ; CREATE SEQUENCE orderitemsid START 178; -- DROP SEQUENCE jcitemsid ; CREATE SEQUENCE jcitemsid START 53;
Change it to:
CREATE SEQUENCE id; SELECT SETVAL('id', 10579); CREATE SEQUENCE invoiceid; SELECT SETVAL('invoiceid', 11096); CREATE SEQUENCE orderitemsid; SELECT SETVAL('orderitemsid', 178); CREATE SEQUENCE jcitemsid; SELECT SETVAL('jcitemsid', 53);
CREATE TABLE orderitems ( trans_id int, parts_id int, description text, qty float4, sellprice float8, discount float4, unit varchar(5), project_id int, reqdate date, ship float4, serialnumber text, id int default nextval('orderitemsid') ) WITH OIDS; CREATE TABLE inventory ( warehouse_id int, parts_id int, trans_id int, orderitems_id int, qty float4, shippingdate date, employee_id int ) WITH OIDS; CREATE TABLE assembly ( id int, parts_id int, qty float, bom bool, adj bool ) WITH OIDS;This change is only required for LedgerSMB versions 2.6.3 and below.
If you already built a dataset without this change you will get an error when you try to save a PO or assembly.
"ERROR: column "oid" does not exist"
Drop the tables and rebuild WITH OIDS.
Server Encoding Available Client Encodings
EUC_JP EUC_JP, SJIS
EUC_TW EUC_TW, BIG5
LATIN2 LATIN2, WIN1250
LATIN5 LATIN5, WIN, ALT
MULE_INTERNAL EUC_JP, SJIS, EUC_KR, EUC_CN, EUC_TW, BIG5, LATIN1 to LATIN5, WIN, ALT, WIN1250
Create the dataset from admin.pl, now the Japanese shows up in multibyte encoding
Now you can write in Hiragana, Katakana, Kanji and English
DBD::Pg::db do failed: ERROR: syntax error at or near "," at character 114 Error! INSERT INTO acc_trans (trans_id, chart_id, transdate,amount) VALUES (13314, , '03-22-2005',1.00 * 1) ERROR: syntax error at or near "," at character 114This error is caused by a transaction which does not have links to an AR/AP account.
modify /etc/selinux/conf and set SELINUX=permissive
use audit2allow and add the following to policy.conf, then run "make reload"
#line 83
allow httpd_sys_script_t port_type:{ tcp_socket udp_socket } { send_msg
recv_msg };
allow httpd_sys_script_t sysctl_kernel_t:dir search;
allow httpd_sys_script_t sysctl_t:dir search;
allow httpd_sys_script_t tmp_t:sock_file write;
allow httpd_sys_script_t httpd_sys_content_t:lnk_file read;
allow httpd_sys_script_t sysctl_kernel_t:file read;
allow httpd_sys_script_t unconfined_t:unix_stream_socket connectto;
AddDefaultCharset Onin your httpd.conf file.
setup.pl does not check for missing software packages and it is your responsibilite to make sure you have the required software installed either from source or from a package.
Requirements are clearly indicated in the README file and on the download page.
# SQL-Ledger Include /etc/httpd/sql-ledger-httpd.confCreate a file 'sql-ledger-httpd.conf' in /etc/httpd and copy the next part into the file.
AddHandler cgi-script .pl AddDefaultCharset On Alias /sql-ledger /var/www/sql-ledger/ <Directory /var/www/sql-ledger> Options ExecCGI Includes FollowSymlinks </Directory> <Directory /var/www/sql-ledger/users> Order Deny,Allow Deny from All </Directory>replace '/etc/httpd' and '/var/www' with the appropriate directories.
# chown -R apache:apache users
# for Apache 2 we escape strings twice if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/) && !$beenthere) { $str = $self->escape($str, 1) if $2 < 44; }
local all all trustThe file is in the 'data' directory of your postgresql installation. This is different with every distribution so look for it.
# find / -name 'pg_hba.conf'
Some people can't read and seem to think 'localhost' is just some fancy word for a local machine. 'localhost' is a host like any other host on a network. A 'local' entry in pg_hba.conf will allow socket connections ONLY and not allow a host connection. If you then try to connect to 'localhost' postgres will come back with an authentication error.
So, forget you ever heard there is such a thing as 'localhost' and leave the Host portion blank.
WARNING! DO NOT just put a 'host all all trust' in pg_hba.conf unless you know what you are doing.
LaTeX is difficult but it also offers a much superior environment to produce professionally looking forms in postscript and PDF format. Unfortunately with all that power there is also a steep learning curve.
$ w3m -F http://localhost/sql-ledger/login.pl?terminal=mozillaTo use without frames
$ w3m http://localhost/sql-ledger/login.pl?terminal=lynx
Alias /sql-ledger "c:/apache/sql-ledger/" <Directory "c:/apache/sql-ledger"> AllowOverride All AddHandler cgi-script .pl AddDefaultCharset On Options +ExecCGI Order Allow,Deny Allow from All </Directory> <Directory "c:/apache/sql-ledger/users"> Order Deny,Allow Deny from All </Directory>
AddHandler cgi-script .pl AddDefaultCharset On Alias /sql-ledger /var/www/sql-ledger/ <Directory /var/www/sql-ledger> Options +ExecCGI </Directory> <Directory /var/www/sql-ledger/users> Order Deny,Allow Deny from All </Directory>
%printer = ( 'Default' => 'lpr', 'Color' => 'lpr -PEpson' );Check in your /etc/printcap file for the names of available printers.
If you have LaTeX installed set
$latex = 1in ledger-smb.conf
To send the document to the printer check the "Postscript" or "PDF" format, enter the number of copies and click on the "Print" button.
The printer you enter in your preferences is the default printer. You can choose any other available printer. This makes it possible to print from anywhere on the network to any printer.
Note: html format is for screen preview. Use the "Print" option from your browser to print to a printer.
/etc/printcap entry on the server which runs lpd epson:Epson\ :sh:\ :lp=/dev/null:\ :sd=/var/spool/output/epson:\ :if=/usr/libexec/lpr/epson/prnfilter:\ # end of entry in /etc/printcap # prnfilter shell script #!/bin/sh # Filter for Epson Stylus PATH="$PATH:/usr/local/bin" #read first_line read tmp first_line=`echo $tmp | cut -b1-2 | sed -n '1p'` first_chr=`expr "$first_line" : '\(.\)'` first_two=`expr "$first_line" : '\(..\)'` rewindstdin if [ "$first_two" = "%!" ]; then # Postscript file gs @st640p.upp -dSAFER -dNOPAUSE -q -sOutputFile=/tmp/$$ - else # text file cat > /tmp/$$ echo -n "^L" >> /tmp/$$ smbclient '\\Raven\Epson' "" -c 'printmode text' fi smbclient '\\Raven\Epson' "" -P -c "print /tmp/$$" rm /tmp/$$ # EOF rewindstdin is a small program to rewind the filehandle for STDIN save the next part up to EOF to a file rewindstdin.c and compile #include <sys/types.h> #include <unistd.h> extern int errno; main() { if( lseek(0,0,0) == 0 ){ errno = 0; } return( errno ); } # EOF compile to an executable gcc -o /usr/local/bin/rewindstdin rewindstdin.c
check the permission for the users directory. The directory must be set writeable for the webserver. If your webserver runs ias user/group nobody.nogroup set the directory to
drwx--x--x 2 nobody nogroup 1024 May 26 16:49 users or drwxrwx--x 2 johndoe nogroup 1024 May 26 16:49 users
AddHandler cgi-script .plin your httpd.conf file.
include the terminal variable on the URL
http://localhost/sql-ledger/login.pl?terminal=lynxValid terminal variables are lynx, mozilla and js
users/ templates/ users/members # chown nobody:nogroup users templates users/members
If the tables are owned by 'joe' and you enter 'mary' as the dba you might run into this problem if mary doesn't have the rights to access tables owned by joe.
<Directory /usr/local/sql-ledger> Options ExecCGI Includes FollowSymlinks </Directory>
$language = "de";
This is a global change and applies to all logins, individual settings may be changed by setting the language in your Preferences.
Typical setups: /usr/local/vh/www <- DocumentRoot for virtual host /usr/local/vh/sql-ledger <- Alias for sql-ledger /usr/local/vh/users <- users directory out of reachThe location for the users directory can be specified in ledger-smb.conf
/usr/local/vh/www <- DocumentRoot for virtual host /usr/local/vh/www/sql-ledger <- Alias for sql-ledger /usr/local/vh/www/sql-ledger/users <- users configuration files and tmp space <Directory /usr/local/vh/www/sql-ledger/users> <- disable webserver access Order Deny,Allow for users directory Deny from All </Directory>