From cvs w lms.org.pl Thu Dec 1 08:25:32 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 08:25:32 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/sgml/pl (userif.sgml) Message-ID: <20111201072532.85D95302A041@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 08:25:32 Author: alec Path: /cvsroot/lms/doc/sgml/pl Modified: userif.sgml - Descibed %bankaccount variable Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/sgml/pl/userif.sgml.diff?&r1=1.93&r2=1.94 Index: lms/doc/sgml/pl/userif.sgml diff -u lms/doc/sgml/pl/userif.sgml:1.93 lms/doc/sgml/pl/userif.sgml:1.94 --- lms/doc/sgml/pl/userif.sgml:1.93 Thu Mar 10 12:36:38 2011 +++ lms/doc/sgml/pl/userif.sgml Thu Dec 1 08:25:32 2011 @@ -1,4 +1,4 @@ - + Interfejs Użytkownika (LMS-UI) LMS'owy Interfejs Użytkownika to panel administracyjny do tworzenia @@ -983,6 +983,7 @@ %cid - ID klienta %pin - PIN klienta %last_10_in_a_table - lista ostatnich 10 operacji na koncie klienta + %bankaccount - numer konta bankowego From cvs w lms.org.pl Thu Dec 1 08:25:32 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 08:25:32 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/sgml (userif.sgml) Message-ID: <20111201072532.66163302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 08:25:32 Author: alec Path: /cvsroot/lms/doc/sgml Modified: userif.sgml - Descibed %bankaccount variable Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/sgml/userif.sgml.diff?&r1=1.135&r2=1.136 Index: lms/doc/sgml/userif.sgml diff -u lms/doc/sgml/userif.sgml:1.135 lms/doc/sgml/userif.sgml:1.136 --- lms/doc/sgml/userif.sgml:1.135 Fri Apr 23 15:37:01 2010 +++ lms/doc/sgml/userif.sgml Thu Dec 1 08:25:31 2011 @@ -1,4 +1,4 @@ - + User Interface (LMS-UI) LMS User Interface is basically administration panel available via Web @@ -839,6 +839,7 @@ %cid - customer ID %pin - customer PIN %last_10_in_a_table - last 10 operations on customer account + %bankaccount - bank account number From cvs w lms.org.pl Thu Dec 1 08:34:00 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 08:34:00 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc (ChangeLog) Message-ID: <20111201073400.60B83302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 08:34:00 Author: alec Path: /cvsroot/lms/doc Modified: ChangeLog - BTS#0000892: Fixed bug where phpui/style wasn't used on login page Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/ChangeLog.diff?&r1=1.1621&r2=1.1622 Index: lms/doc/ChangeLog diff -u lms/doc/ChangeLog:1.1621 lms/doc/ChangeLog:1.1622 --- lms/doc/ChangeLog:1.1621 Tue Nov 29 01:27:12 2011 +++ lms/doc/ChangeLog Thu Dec 1 08:34:00 2011 @@ -1,4 +1,4 @@ -$Id: ChangeLog,v 1.1621 2011/11/29 00:27:12 chilek Exp $ +$Id: ChangeLog,v 1.1622 2011/12/01 07:34:00 alec Exp $ version ? (????-??-??): @@ -73,6 +73,7 @@ - we can send sms to any phone number from outside database [chilan] - can send any sms to selected users [chilan] - added %if substitution symbol for interface name [chilan] + - BTS#0000892: Fixed bug where phpui/style wasn't used on login page [alec] version 1.11.13 Dira (2011-04-07) From cvs w lms.org.pl Thu Dec 1 08:34:00 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 08:34:00 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (login.html) Message-ID: <20111201073400.816D2302A041@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 08:34:00 Author: alec Path: /cvsroot/lms/templates Modified: login.html - BTS#0000892: Fixed bug where phpui/style wasn't used on login page Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/login.html.diff?&r1=1.58&r2=1.59 Index: lms/templates/login.html diff -u lms/templates/login.html:1.58 lms/templates/login.html:1.59 --- lms/templates/login.html:1.58 Tue Jan 18 09:12:32 2011 +++ lms/templates/login.html Thu Dec 1 08:34:00 2011 @@ -1,11 +1,11 @@ - + - + ::: {t}Welcome to LMS{/t} {$layout.lmsv} ::: From cvs w lms.org.pl Thu Dec 1 09:33:54 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 09:33:54 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc (README, README.pl) Message-ID: <20111201083354.1A7A1302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 09:33:54 Author: alec Path: /cvsroot/lms/doc Modified: README README.pl - Added lms-teryt documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/README.diff?&r1=1.236&r2=1.237 http://cvs.lms.org.pl/viewvc/Development/lms/doc/README.pl.diff?&r1=1.68&r2=1.69 Index: lms/doc/README diff -u lms/doc/README:1.236 lms/doc/README:1.237 --- lms/doc/README:1.236 Fri Apr 15 19:47:27 2011 +++ lms/doc/README Thu Dec 1 09:33:53 2011 @@ -317,7 +317,7 @@ 2.2.2. PHP Interpreter - Interpreter version should be 4.2.x or higher. PHP can be downloaded + Interpreter version should be 5.2.x or higher. PHP can be downloaded from www.php.net. At least following PHP modules needs to be installed (look for "extension" in php.ini or in output of phpinfo function): * pcre, posix, @@ -339,10 +339,9 @@ 2.2.4. Smarty Library - LMS-UI requires Smarty library (http://www.smarty.net) in version 2.6.0 - or higher (don't use 2.6.4 version). Newer versions of Smarty requires - that you have not enabled "magic_quotes_runtime" (set to Off) option in - PHP configuration. + LMS-UI requires Smarty library (http://www.smarty.net) in version 3.0 + or higher. Newer versions of Smarty requires that you have not enabled + "magic_quotes_runtime" (set to Off) option in PHP configuration. __________________________________________________________________ 2.2.5. Perl @@ -1867,6 +1866,7 @@ %cid - customer ID %pin - customer PIN %last_10_in_a_table - last 10 operations on customer account + %bankaccount - bank account number __________________________________________________________________ 3.10.3. Configuration Index: lms/doc/README.pl diff -u lms/doc/README.pl:1.68 lms/doc/README.pl:1.69 --- lms/doc/README.pl:1.68 Fri Apr 15 19:47:27 2011 +++ lms/doc/README.pl Thu Dec 1 09:33:53 2011 @@ -340,10 +340,9 @@ 2.2.2. Interpreter PHP - Interpreter powinien być w wersji 4.2.x lub nowszej (unikać wersji - 4.2.2). PHP można ściągnąć ze strony www.php.net. W szczególności - wymagane są następujące moduły (sprawdź "extension" w php.ini lub - wyjście funkcji phpinfo()): + Interpreter powinien być w wersji 5.2.x lub nowszej. PHP można ściągnąć + ze strony www.php.net. W szczególności wymagane są następujące moduły + (sprawdź "extension" w php.ini lub wyjście funkcji phpinfo()): * pcre, posix, * zlib (dla kompresowanych backupów), * gd i/lub ming (tylko dla mapy sieci), @@ -362,8 +361,7 @@ 2.2.4. Biblioteka Smarty LMS-UI do pracy wymaga jeszcze biblioteki Smarty - (http://www.smarty.net) w wersji 2.6.0 lub wyższej (unikać wersji - 2.6.4). + (http://www.smarty.net) w wersji 3.0 lub wyższej. __________________________________________________________________ 2.2.5. Perl @@ -2209,6 +2207,7 @@ %cid - ID klienta %pin - PIN klienta %last_10_in_a_table - lista ostatnich 10 operacji na koncie klienta + %bankaccount - numer konta bankowego __________________________________________________________________ 3.10.3. Konfiguracja @@ -2907,6 +2906,7 @@ lms-fping Badanie aktywności komputerów. lms-reminder Przypominanie o zaplanowanych zadaniach z Terminarza lms-rtparser Backend do Helpdesk'a. + lms-teryt Import bazy TERYT __________________________________________________________________ 4.3. Opis i konfiguracja @@ -3866,6 +3866,73 @@ Przykład: include_customerinfo = 0 __________________________________________________________________ +4.3.19. lms-teryt + + Skrypt służący do importu i aktualizacji danych bazy TERYT. Zawiera + również możliwość pobrania plików bazy z Internetu, a także procedurę + przypisywania identyfikatorów TERYT do istniejących komputerów, które + mają zdefiniowany adres ale nie mają przypisanego TERYTu. + + Skrypt zawiera następujące opcje uruchomieniowe, które można łączyć: + * -f, --fetch + Włącza procedurę pobierania (i rozpakowania) plików bazy TERYT z + Internetu. Wymagane jest umożliwienie połączenia HTTP z serwerem + określonych w opcji 'url' oraz zainstalowanie programu unzip. + * -l, --list= + Zawęża działanie opcji importu/aktualizacji do określonych + województw. Podobnie jak w opcji konfiguracyjnej 'state_list' + podajemy tutaj numeryczne identyfikatory oddzielone przecinkami. Ze + względu na duży rozmiar całej bazy, wskazane jest ograniczenie się + tylko do wybranych województw. Identyfikatory można znaleźć w pliku + TERC.xml. + + 2 - dolnośląskie + 4 - kujawsko-pomorskie + 6 - lubelskie + 8 - lubuskie + 10 - łódzkie + 12 - małopolskie + 14 - mazowieckie + 16 - opolskie + 18 - podkarpackie + 20 - podlaskie + 22 - pomorskie + 24 - śląskie + 26 - świętokrzyskie + 28 - warmiśko-mazurskie + 30 - wielkopolskie + 32 - zachodniopomorskie + * -u, --update + Import danych do bazy LMSa. Jeśli baza była już wcześniej + importowana, nastąpi aktualizacja bazy. + * -m, --merge + Przypisanie identyfikatorów TERYT dla komputerów/urządzeń, które + nie zostały jaszcze przypisane, ale posiadają wpisany adres + lokalizacji. Algorytm jest dość prosty i nie ma pewności, że + wszystkie adresy zostaną rozpoznane. + + Konfigurację tego skryptu zawiera sekcja [teryt] w pliku lms.ini: + * url + Adres strony pobierania plików bazy TERYT. Domyślnie zawiera + poniższy link. + Przykład: url = + http://www.stat.gov.pl/broker/access/prefile/listPreFiles.jspa + * dir + Katalog w którym, są przechowywane rozpakowane pliki (xml) bazy + TERYT. W tym katalogu zostaną też zapisane pobrane pliki. + Domyślnie: katalog uruchomienia skryptu. + Przykład: dir = /var/lib/teryt + * unzip_binary + Lokalizacja programu unzip. Domyślnie: /usr/bin/unzip. + Przykład: unzip_binary = /sbin/unzip + * state_list + Lista identyfikatorów województw, oddzielonych przecinkami, które + będą brane pod uwagę podczas importu. W celu minimalizacji rozmiaru + bazy danych i czasu działania skryptu najlepiej ograniczyć się do + wybranych województw. + Przykład: state_list = 2 + __________________________________________________________________ + Rozdział 5. Generator plików konfiguracyjnych (lms-mgc) LMS-MGC to "magiczny" generator plików konfiguracyjnych. Przy odrobinie From cvs w lms.org.pl Thu Dec 1 09:33:54 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 09:33:54 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/html/en (54 files) Message-ID: <20111201083355.095C9302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 09:33:54 Author: alec Path: /cvsroot/lms/doc/html/en Modified: authors.html contrib-customer2.html contrib-sqlpanel.html contrib-squid.html contrib.html daemon-modules.html daemon.html devel-db.html devel-genfake.html devel-ini.html devel-limits.html devel-rights.html devel.html faq.html index.html install-config.html install-db.html install-documents.html install-install.html install-locale.html install-requirements.html install-rights.html install-upgrade.html install.html intro.html legalnotice.html menu-administration.html menu-configuration.html menu-customers.html menu-documents.html menu-finances.html menu-helpdesk.html menu-hosting.html menu-messages.html menu-netdevices.html menu-networks.html menu-nodes.html menu-reload.html menu-stats.html menu-timetable.html mgc-config.html mgc-example.html mgc.html moreinfo.html scripts-config.html scripts-list.html scripts.html tscript.html user.html userpanel-config.html userpanel-install.html userpanel-modules.html userpanel-style.html userpanel.html - Added lms-teryt documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/authors.html.diff?&r1=1.18&r2=1.19 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/contrib-customer2.html.diff?&r1=1.9&r2=1.10 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/contrib-sqlpanel.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/contrib-squid.html.diff?&r1=1.11&r2=1.12 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/contrib.html.diff?&r1=1.9&r2=1.10 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/daemon-modules.html.diff?&r1=1.52&r2=1.53 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/daemon.html.diff?&r1=1.23&r2=1.24 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/devel-db.html.diff?&r1=1.69&r2=1.70 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/devel-genfake.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/devel-ini.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/devel-limits.html.diff?&r1=1.14&r2=1.15 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/devel-rights.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/devel.html.diff?&r1=1.35&r2=1.36 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/faq.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/index.html.diff?&r1=1.42&r2=1.43 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-config.html.diff?&r1=1.27&r2=1.28 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-db.html.diff?&r1=1.23&r2=1.24 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-documents.html.diff?&r1=1.25&r2=1.26 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-install.html.diff?&r1=1.14&r2=1.15 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-locale.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-requirements.html.diff?&r1=1.26&r2=1.27 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-rights.html.diff?&r1=1.21&r2=1.22 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install-upgrade.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/install.html.diff?&r1=1.21&r2=1.22 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/intro.html.diff?&r1=1.11&r2=1.12 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/legalnotice.html.diff?&r1=1.8&r2=1.9 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-administration.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-configuration.html.diff?&r1=1.28&r2=1.29 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-customers.html.diff?&r1=1.11&r2=1.12 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-documents.html.diff?&r1=1.6&r2=1.7 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-finances.html.diff?&r1=1.25&r2=1.26 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-helpdesk.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-hosting.html.diff?&r1=1.7&r2=1.8 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-messages.html.diff?&r1=1.3&r2=1.4 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-netdevices.html.diff?&r1=1.12&r2=1.13 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-networks.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-nodes.html.diff?&r1=1.11&r2=1.12 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-reload.html.diff?&r1=1.11&r2=1.12 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-stats.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/menu-timetable.html.diff?&r1=1.8&r2=1.9 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/mgc-config.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/mgc-example.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/mgc.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/moreinfo.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/scripts-config.html.diff?&r1=1.28&r2=1.29 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/scripts-list.html.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/scripts.html.diff?&r1=1.9&r2=1.10 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/tscript.html.diff?&r1=1.23&r2=1.24 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/user.html.diff?&r1=1.27&r2=1.28 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/userpanel-config.html.diff?&r1=1.2&r2=1.3 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/userpanel-install.html.diff?&r1=1.2&r2=1.3 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/userpanel-modules.html.diff?&r1=1.2&r2=1.3 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/userpanel-style.html.diff?&r1=1.2&r2=1.3 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/en/userpanel.html.diff?&r1=1.2&r2=1.3 Index: lms/doc/html/en/authors.html diff -u lms/doc/html/en/authors.html:1.18 lms/doc/html/en/authors.html:1.19 --- lms/doc/html/en/authors.html:1.18 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/authors.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ - + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/contrib-sqlpanel.html diff -u lms/doc/html/en/contrib-sqlpanel.html:1.10 lms/doc/html/en/contrib-sqlpanel.html:1.11 --- lms/doc/html/en/contrib-sqlpanel.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/contrib-sqlpanel.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/contrib-squid.html diff -u lms/doc/html/en/contrib-squid.html:1.11 lms/doc/html/en/contrib-squid.html:1.12 --- lms/doc/html/en/contrib-squid.html:1.11 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/contrib-squid.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/contrib.html diff -u lms/doc/html/en/contrib.html:1.9 lms/doc/html/en/contrib.html:1.10 --- lms/doc/html/en/contrib.html:1.9 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/contrib.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/daemon-modules.html diff -u lms/doc/html/en/daemon-modules.html:1.52 lms/doc/html/en/daemon-modules.html:1.53 --- lms/doc/html/en/daemon-modules.html:1.52 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/daemon-modules.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/daemon.html diff -u lms/doc/html/en/daemon.html:1.23 lms/doc/html/en/daemon.html:1.24 --- lms/doc/html/en/daemon.html:1.23 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/daemon.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/devel-db.html diff -u lms/doc/html/en/devel-db.html:1.69 lms/doc/html/en/devel-db.html:1.70 --- lms/doc/html/en/devel-db.html:1.69 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/devel-db.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/devel-genfake.html diff -u lms/doc/html/en/devel-genfake.html:1.10 lms/doc/html/en/devel-genfake.html:1.11 --- lms/doc/html/en/devel-genfake.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/devel-genfake.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/devel-ini.html diff -u lms/doc/html/en/devel-ini.html:1.10 lms/doc/html/en/devel-ini.html:1.11 --- lms/doc/html/en/devel-ini.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/devel-ini.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/devel-limits.html diff -u lms/doc/html/en/devel-limits.html:1.14 lms/doc/html/en/devel-limits.html:1.15 --- lms/doc/html/en/devel-limits.html:1.14 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/devel-limits.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/devel-rights.html diff -u lms/doc/html/en/devel-rights.html:1.10 lms/doc/html/en/devel-rights.html:1.11 --- lms/doc/html/en/devel-rights.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/devel-rights.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/devel.html diff -u lms/doc/html/en/devel.html:1.35 lms/doc/html/en/devel.html:1.36 --- lms/doc/html/en/devel.html:1.35 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/devel.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/faq.html diff -u lms/doc/html/en/faq.html:1.16 lms/doc/html/en/faq.html:1.17 --- lms/doc/html/en/faq.html:1.16 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/faq.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/index.html diff -u lms/doc/html/en/index.html:1.42 lms/doc/html/en/index.html:1.43 --- lms/doc/html/en/index.html:1.42 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/index.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-config.html diff -u lms/doc/html/en/install-config.html:1.27 lms/doc/html/en/install-config.html:1.28 --- lms/doc/html/en/install-config.html:1.27 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-config.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-db.html diff -u lms/doc/html/en/install-db.html:1.23 lms/doc/html/en/install-db.html:1.24 --- lms/doc/html/en/install-db.html:1.23 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-db.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-documents.html diff -u lms/doc/html/en/install-documents.html:1.25 lms/doc/html/en/install-documents.html:1.26 --- lms/doc/html/en/install-documents.html:1.25 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-documents.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-install.html diff -u lms/doc/html/en/install-install.html:1.14 lms/doc/html/en/install-install.html:1.15 --- lms/doc/html/en/install-install.html:1.14 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-install.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-locale.html diff -u lms/doc/html/en/install-locale.html:1.10 lms/doc/html/en/install-locale.html:1.11 --- lms/doc/html/en/install-locale.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-locale.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-requirements.html diff -u lms/doc/html/en/install-requirements.html:1.26 lms/doc/html/en/install-requirements.html:1.27 --- lms/doc/html/en/install-requirements.html:1.26 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-requirements.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-rights.html diff -u lms/doc/html/en/install-rights.html:1.21 lms/doc/html/en/install-rights.html:1.22 --- lms/doc/html/en/install-rights.html:1.21 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-rights.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install-upgrade.html diff -u lms/doc/html/en/install-upgrade.html:1.15 lms/doc/html/en/install-upgrade.html:1.16 --- lms/doc/html/en/install-upgrade.html:1.15 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install-upgrade.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/install.html diff -u lms/doc/html/en/install.html:1.21 lms/doc/html/en/install.html:1.22 --- lms/doc/html/en/install.html:1.21 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/install.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/intro.html diff -u lms/doc/html/en/intro.html:1.11 lms/doc/html/en/intro.html:1.12 --- lms/doc/html/en/intro.html:1.11 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/intro.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/legalnotice.html diff -u lms/doc/html/en/legalnotice.html:1.8 lms/doc/html/en/legalnotice.html:1.9 --- lms/doc/html/en/legalnotice.html:1.8 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/legalnotice.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-administration.html diff -u lms/doc/html/en/menu-administration.html:1.13 lms/doc/html/en/menu-administration.html:1.14 --- lms/doc/html/en/menu-administration.html:1.13 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-administration.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-configuration.html diff -u lms/doc/html/en/menu-configuration.html:1.28 lms/doc/html/en/menu-configuration.html:1.29 --- lms/doc/html/en/menu-configuration.html:1.28 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-configuration.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-customers.html diff -u lms/doc/html/en/menu-customers.html:1.11 lms/doc/html/en/menu-customers.html:1.12 --- lms/doc/html/en/menu-customers.html:1.11 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-customers.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-documents.html diff -u lms/doc/html/en/menu-documents.html:1.6 lms/doc/html/en/menu-documents.html:1.7 --- lms/doc/html/en/menu-documents.html:1.6 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-documents.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-finances.html diff -u lms/doc/html/en/menu-finances.html:1.25 lms/doc/html/en/menu-finances.html:1.26 --- lms/doc/html/en/menu-finances.html:1.25 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-finances.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-helpdesk.html diff -u lms/doc/html/en/menu-helpdesk.html:1.16 lms/doc/html/en/menu-helpdesk.html:1.17 --- lms/doc/html/en/menu-helpdesk.html:1.16 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-helpdesk.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-hosting.html diff -u lms/doc/html/en/menu-hosting.html:1.7 lms/doc/html/en/menu-hosting.html:1.8 --- lms/doc/html/en/menu-hosting.html:1.7 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-hosting.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-messages.html diff -u lms/doc/html/en/menu-messages.html:1.3 lms/doc/html/en/menu-messages.html:1.4 --- lms/doc/html/en/menu-messages.html:1.3 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-messages.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE @@ -148,6 +148,13 @@ >%last_10_in_a_table</SAMP > - last 10 operations on customer account</TD ></TR +><TR +><TD +><SAMP +CLASS="PROMPT" +>%bankaccount</SAMP +> - bank account number</TD +></TR ></TBODY ></TABLE > Index: lms/doc/html/en/menu-netdevices.html diff -u lms/doc/html/en/menu-netdevices.html:1.12 lms/doc/html/en/menu-netdevices.html:1.13 --- lms/doc/html/en/menu-netdevices.html:1.12 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-netdevices.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-networks.html diff -u lms/doc/html/en/menu-networks.html:1.10 lms/doc/html/en/menu-networks.html:1.11 --- lms/doc/html/en/menu-networks.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-networks.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-nodes.html diff -u lms/doc/html/en/menu-nodes.html:1.11 lms/doc/html/en/menu-nodes.html:1.12 --- lms/doc/html/en/menu-nodes.html:1.11 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-nodes.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-reload.html diff -u lms/doc/html/en/menu-reload.html:1.11 lms/doc/html/en/menu-reload.html:1.12 --- lms/doc/html/en/menu-reload.html:1.11 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-reload.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-stats.html diff -u lms/doc/html/en/menu-stats.html:1.13 lms/doc/html/en/menu-stats.html:1.14 --- lms/doc/html/en/menu-stats.html:1.13 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-stats.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/menu-timetable.html diff -u lms/doc/html/en/menu-timetable.html:1.8 lms/doc/html/en/menu-timetable.html:1.9 --- lms/doc/html/en/menu-timetable.html:1.8 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/menu-timetable.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/mgc-config.html diff -u lms/doc/html/en/mgc-config.html:1.17 lms/doc/html/en/mgc-config.html:1.18 --- lms/doc/html/en/mgc-config.html:1.17 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/mgc-config.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/mgc-example.html diff -u lms/doc/html/en/mgc-example.html:1.10 lms/doc/html/en/mgc-example.html:1.11 --- lms/doc/html/en/mgc-example.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/mgc-example.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/mgc.html diff -u lms/doc/html/en/mgc.html:1.10 lms/doc/html/en/mgc.html:1.11 --- lms/doc/html/en/mgc.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/mgc.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/moreinfo.html diff -u lms/doc/html/en/moreinfo.html:1.15 lms/doc/html/en/moreinfo.html:1.16 --- lms/doc/html/en/moreinfo.html:1.15 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/moreinfo.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/scripts-config.html diff -u lms/doc/html/en/scripts-config.html:1.28 lms/doc/html/en/scripts-config.html:1.29 --- lms/doc/html/en/scripts-config.html:1.28 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/scripts-config.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/scripts-list.html diff -u lms/doc/html/en/scripts-list.html:1.10 lms/doc/html/en/scripts-list.html:1.11 --- lms/doc/html/en/scripts-list.html:1.10 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/scripts-list.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/scripts.html diff -u lms/doc/html/en/scripts.html:1.9 lms/doc/html/en/scripts.html:1.10 --- lms/doc/html/en/scripts.html:1.9 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/scripts.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/tscript.html diff -u lms/doc/html/en/tscript.html:1.23 lms/doc/html/en/tscript.html:1.24 --- lms/doc/html/en/tscript.html:1.23 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/tscript.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/user.html diff -u lms/doc/html/en/user.html:1.27 lms/doc/html/en/user.html:1.28 --- lms/doc/html/en/user.html:1.27 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/user.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/userpanel-config.html diff -u lms/doc/html/en/userpanel-config.html:1.2 lms/doc/html/en/userpanel-config.html:1.3 --- lms/doc/html/en/userpanel-config.html:1.2 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/userpanel-config.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/userpanel-install.html diff -u lms/doc/html/en/userpanel-install.html:1.2 lms/doc/html/en/userpanel-install.html:1.3 --- lms/doc/html/en/userpanel-install.html:1.2 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/userpanel-install.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/userpanel-modules.html diff -u lms/doc/html/en/userpanel-modules.html:1.2 lms/doc/html/en/userpanel-modules.html:1.3 --- lms/doc/html/en/userpanel-modules.html:1.2 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/userpanel-modules.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/userpanel-style.html diff -u lms/doc/html/en/userpanel-style.html:1.2 lms/doc/html/en/userpanel-style.html:1.3 --- lms/doc/html/en/userpanel-style.html:1.2 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/userpanel-style.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/en/userpanel.html diff -u lms/doc/html/en/userpanel.html:1.2 lms/doc/html/en/userpanel.html:1.3 --- lms/doc/html/en/userpanel.html:1.2 Sat Oct 15 17:58:20 2011 +++ lms/doc/html/en/userpanel.html Thu Dec 1 09:33:54 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE From cvs w lms.org.pl Thu Dec 1 09:33:55 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 09:33:55 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/html/pl (55 files) Message-ID: <20111201083356.3681A302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 09:33:55 Author: alec Path: /cvsroot/lms/doc/html/pl Modified: authors.html contrib-antyvir.html contrib-customer2.html contrib-sqlpanel.html contrib-squid.html contrib.html daemon-modules.html daemon.html devel-db.html devel-genfake.html devel-ini.html devel-limits.html devel-rights.html devel.html faq.html index.html install-config.html install-db.html install-documents.html install-install.html install-locale.html install-requirements.html install-rights.html install-upgrade.html install.html intro.html legalnotice.html menu-administration.html menu-configuration.html menu-customers.html menu-documents.html menu-finances.html menu-helpdesk.html menu-hosting.html menu-messages.html menu-netdevices.html menu-networks.html menu-nodes.html menu-reload.html menu-stats.html menu-timetable.html mgc-config.html mgc-example.html mgc.html moreinfo.html scripts-config.html scripts-list.html scripts.html tscript.html user.html userpanel-config.html userpanel-install.html userpanel-modules.html userpanel-style.html userpanel.html - Added lms-teryt documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/authors.html.diff?&r1=1.23&r2=1.24 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/contrib-antyvir.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/contrib-customer2.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/contrib-sqlpanel.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/contrib-squid.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/contrib.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/daemon-modules.html.diff?&r1=1.76&r2=1.77 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/daemon.html.diff?&r1=1.30&r2=1.31 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel-db.html.diff?&r1=1.76&r2=1.77 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel-genfake.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel-ini.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel-limits.html.diff?&r1=1.20&r2=1.21 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel-rights.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel.html.diff?&r1=1.44&r2=1.45 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/faq.html.diff?&r1=1.22&r2=1.23 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/index.html.diff?&r1=1.43&r2=1.44 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-config.html.diff?&r1=1.32&r2=1.33 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-db.html.diff?&r1=1.32&r2=1.33 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-documents.html.diff?&r1=1.30&r2=1.31 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-install.html.diff?&r1=1.20&r2=1.21 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-locale.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-requirements.html.diff?&r1=1.30&r2=1.31 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-rights.html.diff?&r1=1.25&r2=1.26 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-upgrade.html.diff?&r1=1.22&r2=1.23 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install.html.diff?&r1=1.27&r2=1.28 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/intro.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/legalnotice.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-administration.html.diff?&r1=1.19&r2=1.20 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-configuration.html.diff?&r1=1.33&r2=1.34 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-customers.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-documents.html.diff?&r1=1.9&r2=1.10 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-finances.html.diff?&r1=1.29&r2=1.30 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-helpdesk.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-hosting.html.diff?&r1=1.9&r2=1.10 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-messages.html.diff?&r1=1.6&r2=1.7 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-netdevices.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-networks.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-nodes.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-reload.html.diff?&r1=1.18&r2=1.19 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-stats.html.diff?&r1=1.19&r2=1.20 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-timetable.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/mgc-config.html.diff?&r1=1.24&r2=1.25 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/mgc-example.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/mgc.html.diff?&r1=1.13&r2=1.14 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/moreinfo.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/scripts-config.html.diff?&r1=1.42&r2=1.43 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/scripts-list.html.diff?&r1=1.16&r2=1.17 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/scripts.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/tscript.html.diff?&r1=1.25&r2=1.26 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/user.html.diff?&r1=1.35&r2=1.36 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/userpanel-config.html.diff?&r1=1.4&r2=1.5 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/userpanel-install.html.diff?&r1=1.4&r2=1.5 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/userpanel-modules.html.diff?&r1=1.4&r2=1.5 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/userpanel-style.html.diff?&r1=1.4&r2=1.5 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/userpanel.html.diff?&r1=1.4&r2=1.5 Index: lms/doc/html/pl/authors.html diff -u lms/doc/html/pl/authors.html:1.23 lms/doc/html/pl/authors.html:1.24 --- lms/doc/html/pl/authors.html:1.23 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/authors.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/contrib-antyvir.html diff -u lms/doc/html/pl/contrib-antyvir.html:1.13 lms/doc/html/pl/contrib-antyvir.html:1.14 --- lms/doc/html/pl/contrib-antyvir.html:1.13 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/contrib-antyvir.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/contrib-customer2.html diff -u lms/doc/html/pl/contrib-customer2.html:1.15 lms/doc/html/pl/contrib-customer2.html:1.16 --- lms/doc/html/pl/contrib-customer2.html:1.15 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/contrib-customer2.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/contrib-sqlpanel.html diff -u lms/doc/html/pl/contrib-sqlpanel.html:1.16 lms/doc/html/pl/contrib-sqlpanel.html:1.17 --- lms/doc/html/pl/contrib-sqlpanel.html:1.16 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/contrib-sqlpanel.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/contrib-squid.html diff -u lms/doc/html/pl/contrib-squid.html:1.15 lms/doc/html/pl/contrib-squid.html:1.16 --- lms/doc/html/pl/contrib-squid.html:1.15 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/contrib-squid.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/contrib.html diff -u lms/doc/html/pl/contrib.html:1.15 lms/doc/html/pl/contrib.html:1.16 --- lms/doc/html/pl/contrib.html:1.15 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/contrib.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/daemon-modules.html diff -u lms/doc/html/pl/daemon-modules.html:1.76 lms/doc/html/pl/daemon-modules.html:1.77 --- lms/doc/html/pl/daemon-modules.html:1.76 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/daemon-modules.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/daemon.html diff -u lms/doc/html/pl/daemon.html:1.30 lms/doc/html/pl/daemon.html:1.31 --- lms/doc/html/pl/daemon.html:1.30 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/daemon.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/devel-db.html diff -u lms/doc/html/pl/devel-db.html:1.76 lms/doc/html/pl/devel-db.html:1.77 --- lms/doc/html/pl/devel-db.html:1.76 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/devel-db.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/devel-genfake.html diff -u lms/doc/html/pl/devel-genfake.html:1.17 lms/doc/html/pl/devel-genfake.html:1.18 --- lms/doc/html/pl/devel-genfake.html:1.17 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/devel-genfake.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/devel-ini.html diff -u lms/doc/html/pl/devel-ini.html:1.17 lms/doc/html/pl/devel-ini.html:1.18 --- lms/doc/html/pl/devel-ini.html:1.17 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/devel-ini.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/devel-limits.html diff -u lms/doc/html/pl/devel-limits.html:1.20 lms/doc/html/pl/devel-limits.html:1.21 --- lms/doc/html/pl/devel-limits.html:1.20 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/devel-limits.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/devel-rights.html diff -u lms/doc/html/pl/devel-rights.html:1.15 lms/doc/html/pl/devel-rights.html:1.16 --- lms/doc/html/pl/devel-rights.html:1.15 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/devel-rights.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/devel.html diff -u lms/doc/html/pl/devel.html:1.44 lms/doc/html/pl/devel.html:1.45 --- lms/doc/html/pl/devel.html:1.44 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/devel.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/faq.html diff -u lms/doc/html/pl/faq.html:1.22 lms/doc/html/pl/faq.html:1.23 --- lms/doc/html/pl/faq.html:1.22 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/faq.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/index.html diff -u lms/doc/html/pl/index.html:1.43 lms/doc/html/pl/index.html:1.44 --- lms/doc/html/pl/index.html:1.43 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/index.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-config.html diff -u lms/doc/html/pl/install-config.html:1.32 lms/doc/html/pl/install-config.html:1.33 --- lms/doc/html/pl/install-config.html:1.32 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/install-config.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-db.html diff -u lms/doc/html/pl/install-db.html:1.32 lms/doc/html/pl/install-db.html:1.33 --- lms/doc/html/pl/install-db.html:1.32 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/install-db.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-documents.html diff -u lms/doc/html/pl/install-documents.html:1.30 lms/doc/html/pl/install-documents.html:1.31 --- lms/doc/html/pl/install-documents.html:1.30 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/install-documents.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-install.html diff -u lms/doc/html/pl/install-install.html:1.20 lms/doc/html/pl/install-install.html:1.21 --- lms/doc/html/pl/install-install.html:1.20 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/install-install.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-locale.html diff -u lms/doc/html/pl/install-locale.html:1.13 lms/doc/html/pl/install-locale.html:1.14 --- lms/doc/html/pl/install-locale.html:1.13 Sat Oct 15 17:58:21 2011 +++ lms/doc/html/pl/install-locale.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-requirements.html diff -u lms/doc/html/pl/install-requirements.html:1.30 lms/doc/html/pl/install-requirements.html:1.31 --- lms/doc/html/pl/install-requirements.html:1.30 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/install-requirements.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-rights.html diff -u lms/doc/html/pl/install-rights.html:1.25 lms/doc/html/pl/install-rights.html:1.26 --- lms/doc/html/pl/install-rights.html:1.25 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/install-rights.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install-upgrade.html diff -u lms/doc/html/pl/install-upgrade.html:1.22 lms/doc/html/pl/install-upgrade.html:1.23 --- lms/doc/html/pl/install-upgrade.html:1.22 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/install-upgrade.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/install.html diff -u lms/doc/html/pl/install.html:1.27 lms/doc/html/pl/install.html:1.28 --- lms/doc/html/pl/install.html:1.27 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/install.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/intro.html diff -u lms/doc/html/pl/intro.html:1.16 lms/doc/html/pl/intro.html:1.17 --- lms/doc/html/pl/intro.html:1.16 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/intro.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/legalnotice.html diff -u lms/doc/html/pl/legalnotice.html:1.13 lms/doc/html/pl/legalnotice.html:1.14 --- lms/doc/html/pl/legalnotice.html:1.13 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/legalnotice.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-administration.html diff -u lms/doc/html/pl/menu-administration.html:1.19 lms/doc/html/pl/menu-administration.html:1.20 --- lms/doc/html/pl/menu-administration.html:1.19 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-administration.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-configuration.html diff -u lms/doc/html/pl/menu-configuration.html:1.33 lms/doc/html/pl/menu-configuration.html:1.34 --- lms/doc/html/pl/menu-configuration.html:1.33 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-configuration.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-customers.html diff -u lms/doc/html/pl/menu-customers.html:1.15 lms/doc/html/pl/menu-customers.html:1.16 --- lms/doc/html/pl/menu-customers.html:1.15 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-customers.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-documents.html diff -u lms/doc/html/pl/menu-documents.html:1.9 lms/doc/html/pl/menu-documents.html:1.10 --- lms/doc/html/pl/menu-documents.html:1.9 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-documents.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-finances.html diff -u lms/doc/html/pl/menu-finances.html:1.29 lms/doc/html/pl/menu-finances.html:1.30 --- lms/doc/html/pl/menu-finances.html:1.29 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-finances.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-helpdesk.html diff -u lms/doc/html/pl/menu-helpdesk.html:1.17 lms/doc/html/pl/menu-helpdesk.html:1.18 --- lms/doc/html/pl/menu-helpdesk.html:1.17 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-helpdesk.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-hosting.html diff -u lms/doc/html/pl/menu-hosting.html:1.9 lms/doc/html/pl/menu-hosting.html:1.10 --- lms/doc/html/pl/menu-hosting.html:1.9 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-hosting.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-messages.html diff -u lms/doc/html/pl/menu-messages.html:1.6 lms/doc/html/pl/menu-messages.html:1.7 --- lms/doc/html/pl/menu-messages.html:1.6 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-messages.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE @@ -149,6 +149,13 @@ >%last_10_in_a_table</SAMP > - lista ostatnich 10 operacji na koncie klienta</TD ></TR +><TR +><TD +><SAMP +CLASS="PROMPT" +>%bankaccount</SAMP +> - numer konta bankowego</TD +></TR ></TBODY ></TABLE > Index: lms/doc/html/pl/menu-netdevices.html diff -u lms/doc/html/pl/menu-netdevices.html:1.17 lms/doc/html/pl/menu-netdevices.html:1.18 --- lms/doc/html/pl/menu-netdevices.html:1.17 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-netdevices.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-networks.html diff -u lms/doc/html/pl/menu-networks.html:1.15 lms/doc/html/pl/menu-networks.html:1.16 --- lms/doc/html/pl/menu-networks.html:1.15 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-networks.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-nodes.html diff -u lms/doc/html/pl/menu-nodes.html:1.16 lms/doc/html/pl/menu-nodes.html:1.17 --- lms/doc/html/pl/menu-nodes.html:1.16 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-nodes.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-reload.html diff -u lms/doc/html/pl/menu-reload.html:1.18 lms/doc/html/pl/menu-reload.html:1.19 --- lms/doc/html/pl/menu-reload.html:1.18 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-reload.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-stats.html diff -u lms/doc/html/pl/menu-stats.html:1.19 lms/doc/html/pl/menu-stats.html:1.20 --- lms/doc/html/pl/menu-stats.html:1.19 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-stats.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/menu-timetable.html diff -u lms/doc/html/pl/menu-timetable.html:1.15 lms/doc/html/pl/menu-timetable.html:1.16 --- lms/doc/html/pl/menu-timetable.html:1.15 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/menu-timetable.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/mgc-config.html diff -u lms/doc/html/pl/mgc-config.html:1.24 lms/doc/html/pl/mgc-config.html:1.25 --- lms/doc/html/pl/mgc-config.html:1.24 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/mgc-config.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/mgc-example.html diff -u lms/doc/html/pl/mgc-example.html:1.13 lms/doc/html/pl/mgc-example.html:1.14 --- lms/doc/html/pl/mgc-example.html:1.13 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/mgc-example.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/mgc.html diff -u lms/doc/html/pl/mgc.html:1.13 lms/doc/html/pl/mgc.html:1.14 --- lms/doc/html/pl/mgc.html:1.13 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/mgc.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/moreinfo.html diff -u lms/doc/html/pl/moreinfo.html:1.16 lms/doc/html/pl/moreinfo.html:1.17 --- lms/doc/html/pl/moreinfo.html:1.16 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/moreinfo.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/scripts-config.html diff -u lms/doc/html/pl/scripts-config.html:1.42 lms/doc/html/pl/scripts-config.html:1.43 --- lms/doc/html/pl/scripts-config.html:1.42 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/scripts-config.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE @@ -2616,6 +2616,201 @@ ></LI ></UL ></DIV +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="LMS-TERYT" +>4.3.19. lms-teryt</A +></H2 +><P +>Skrypt służący do importu i aktualizacji danych bazy TERYT. Zawiera również możliwość + pobrania plików bazy z Internetu, a także procedurę przypisywania identyfikatorów + TERYT do istniejących komputerów, które mają zdefiniowany adres ale nie mają przypisanego TERYTu. + </P +><P +>Skrypt zawiera następujące opcje uruchomieniowe, które można łączyć:</P +><UL +><LI +><P +><SAMP +CLASS="PROMPT" +>-f, --fetch</SAMP +></P +><P +>Włącza procedurę pobierania (i rozpakowania) plików bazy TERYT z Internetu. + Wymagane jest umożliwienie połączenia HTTP z serwerem określonych w opcji 'url' + oraz zainstalowanie programu unzip.</P +></LI +><LI +><P +><SAMP +CLASS="PROMPT" +>-l, --list=<lista></SAMP +></P +><P +>Zawęża działanie opcji importu/aktualizacji do określonych województw. + Podobnie jak w opcji konfiguracyjnej 'state_list' podajemy tutaj numeryczne identyfikatory + oddzielone przecinkami. Ze względu na duży rozmiar całej bazy, wskazane jest ograniczenie się + tylko do wybranych województw. Identyfikatory można znaleźć w pliku TERC.xml. + <TABLE +BORDER="0" +><TBODY +><TR +><TD +>2 - dolnośląskie</TD +></TR +><TR +><TD +>4 - kujawsko-pomorskie</TD +></TR +><TR +><TD +>6 - lubelskie</TD +></TR +><TR +><TD +>8 - lubuskie</TD +></TR +><TR +><TD +>10 - łódzkie</TD +></TR +><TR +><TD +>12 - małopolskie</TD +></TR +><TR +><TD +>14 - mazowieckie</TD +></TR +><TR +><TD +>16 - opolskie</TD +></TR +><TR +><TD +>18 - podkarpackie</TD +></TR +><TR +><TD +>20 - podlaskie</TD +></TR +><TR +><TD +>22 - pomorskie</TD +></TR +><TR +><TD +>24 - śląskie</TD +></TR +><TR +><TD +>26 - świętokrzyskie</TD +></TR +><TR +><TD +>28 - warmiśko-mazurskie</TD +></TR +><TR +><TD +>30 - wielkopolskie</TD +></TR +><TR +><TD +>32 - zachodniopomorskie</TD +></TR +></TBODY +></TABLE +> + </P +></LI +><LI +><P +><SAMP +CLASS="PROMPT" +>-u, --update</SAMP +></P +><P +>Import danych do bazy LMSa. Jeśli baza była już wcześniej importowana, + nastąpi aktualizacja bazy.</P +></LI +><LI +><P +><SAMP +CLASS="PROMPT" +>-m, --merge</SAMP +></P +><P +>Przypisanie identyfikatorów TERYT dla komputerów/urządzeń, które + nie zostały jaszcze przypisane, ale posiadają wpisany adres lokalizacji. + Algorytm jest dość prosty i nie ma pewności, że wszystkie adresy + zostaną rozpoznane.</P +></LI +></UL +><P +>Konfigurację tego skryptu zawiera sekcja <SPAN +CLASS="emphasis" +><I +CLASS="EMPHASIS" +>[teryt]</I +></SPAN +> + w pliku <TT +CLASS="FILENAME" +>lms.ini</TT +>: </P +><UL +><LI +><P +>url</P +><P +>Adres strony pobierania plików bazy TERYT. Domyślnie zawiera poniższy link.</P +><P +>Przykład: <SAMP +CLASS="PROMPT" +>url = http://www.stat.gov.pl/broker/access/prefile/listPreFiles.jspa</SAMP +></P +></LI +><LI +><P +>dir</P +><P +>Katalog w którym, są przechowywane rozpakowane pliki (xml) bazy TERYT. + W tym katalogu zostaną też zapisane pobrane pliki. Domyślnie: katalog uruchomienia skryptu.</P +><P +>Przykład: <SAMP +CLASS="PROMPT" +>dir = /var/lib/teryt</SAMP +></P +></LI +><LI +><P +>unzip_binary</P +><P +>Lokalizacja programu unzip. Domyślnie: /usr/bin/unzip.</P +><P +>Przykład: <SAMP +CLASS="PROMPT" +>unzip_binary = /sbin/unzip</SAMP +></P +></LI +><LI +><P +>state_list</P +><P +>Lista identyfikatorów województw, oddzielonych przecinkami, które + będą brane pod uwagę podczas importu. W celu minimalizacji rozmiaru bazy danych i czasu + działania skryptu najlepiej ograniczyć się do wybranych województw.</P +><P +>Przykład: <SAMP +CLASS="PROMPT" +>state_list = 2</SAMP +></P +></LI +></UL +></DIV ></DIV ><DIV CLASS="NAVFOOTER" Index: lms/doc/html/pl/scripts-list.html diff -u lms/doc/html/pl/scripts-list.html:1.16 lms/doc/html/pl/scripts-list.html:1.17 --- lms/doc/html/pl/scripts-list.html:1.16 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/scripts-list.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE @@ -290,6 +290,15 @@ ><TD >Backend do Helpdesk'a.</TD ></TR +><TR +><TD +><A +HREF="scripts-config.html#LMS-TERYT" +>lms-teryt</A +></TD +><TD +>Import bazy TERYT</TD +></TR ></TBODY ></TABLE ></DIV Index: lms/doc/html/pl/scripts.html diff -u lms/doc/html/pl/scripts.html:1.17 lms/doc/html/pl/scripts.html:1.18 --- lms/doc/html/pl/scripts.html:1.17 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/scripts.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE @@ -188,6 +188,11 @@ HREF="scripts-config.html#LMS-RTPARSER" >lms-rtparser</A ></DT +><DT +>4.3.19. <A +HREF="scripts-config.html#LMS-TERYT" +>lms-teryt</A +></DT ></DL ></DD ></DL Index: lms/doc/html/pl/tscript.html diff -u lms/doc/html/pl/tscript.html:1.25 lms/doc/html/pl/tscript.html:1.26 --- lms/doc/html/pl/tscript.html:1.25 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/tscript.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/user.html diff -u lms/doc/html/pl/user.html:1.35 lms/doc/html/pl/user.html:1.36 --- lms/doc/html/pl/user.html:1.35 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/user.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/userpanel-config.html diff -u lms/doc/html/pl/userpanel-config.html:1.4 lms/doc/html/pl/userpanel-config.html:1.5 --- lms/doc/html/pl/userpanel-config.html:1.4 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/userpanel-config.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/userpanel-install.html diff -u lms/doc/html/pl/userpanel-install.html:1.4 lms/doc/html/pl/userpanel-install.html:1.5 --- lms/doc/html/pl/userpanel-install.html:1.4 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/userpanel-install.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/userpanel-modules.html diff -u lms/doc/html/pl/userpanel-modules.html:1.4 lms/doc/html/pl/userpanel-modules.html:1.5 --- lms/doc/html/pl/userpanel-modules.html:1.4 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/userpanel-modules.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/userpanel-style.html diff -u lms/doc/html/pl/userpanel-style.html:1.4 lms/doc/html/pl/userpanel-style.html:1.5 --- lms/doc/html/pl/userpanel-style.html:1.4 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/userpanel-style.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE Index: lms/doc/html/pl/userpanel.html diff -u lms/doc/html/pl/userpanel.html:1.4 lms/doc/html/pl/userpanel.html:1.5 --- lms/doc/html/pl/userpanel.html:1.4 Sat Oct 15 17:58:22 2011 +++ lms/doc/html/pl/userpanel.html Thu Dec 1 09:33:55 2011 @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE From cvs w lms.org.pl Thu Dec 1 09:33:56 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 09:33:56 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/sgml/pl (scripts.sgml) Message-ID: <20111201083356.59D60302A041@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 09:33:56 Author: alec Path: /cvsroot/lms/doc/sgml/pl Modified: scripts.sgml - Added lms-teryt documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/sgml/pl/scripts.sgml.diff?&r1=1.47&r2=1.48 Index: lms/doc/sgml/pl/scripts.sgml diff -u lms/doc/sgml/pl/scripts.sgml:1.47 lms/doc/sgml/pl/scripts.sgml:1.48 --- lms/doc/sgml/pl/scripts.sgml:1.47 Fri Apr 1 13:46:53 2011 +++ lms/doc/sgml/pl/scripts.sgml Thu Dec 1 09:33:56 2011 @@ -1,4 +1,4 @@ -<!-- $Id: scripts.sgml,v 1.47 2011/04/01 11:46:53 alec Exp $ --> +<!-- $Id: scripts.sgml,v 1.48 2011/12/01 08:33:56 alec Exp $ --> <chapter id="scripts"> <title>Skrypty @@ -123,6 +123,10 @@ Backend do Helpdesk'a. + + + Import bazy TERYT + @@ -1310,5 +1314,86 @@ + + lms-teryt + Skrypt służący do importu i aktualizacji danych bazy TERYT. Zawiera również możliwość + pobrania plików bazy z Internetu, a także procedurę przypisywania identyfikatorów + TERYT do istniejących komputerów, które mają zdefiniowany adres ale nie mają przypisanego TERYTu. + + Skrypt zawiera następujące opcje uruchomieniowe, które można łączyć: + + + -f, --fetch + Włącza procedurę pobierania (i rozpakowania) plików bazy TERYT z Internetu. + Wymagane jest umożliwienie połączenia HTTP z serwerem określonych w opcji 'url' + oraz zainstalowanie programu unzip. + + + -l, --list=<lista> + Zawęża działanie opcji importu/aktualizacji do określonych województw. + Podobnie jak w opcji konfiguracyjnej 'state_list' podajemy tutaj numeryczne identyfikatory + oddzielone przecinkami. Ze względu na duży rozmiar całej bazy, wskazane jest ograniczenie się + tylko do wybranych województw. Identyfikatory można znaleźć w pliku TERC.xml. + + 2 - dolnośląskie + 4 - kujawsko-pomorskie + 6 - lubelskie + 8 - lubuskie + 10 - łódzkie + 12 - małopolskie + 14 - mazowieckie + 16 - opolskie + 18 - podkarpackie + 20 - podlaskie + 22 - pomorskie + 24 - śląskie + 26 - świętokrzyskie + 28 - warmiśko-mazurskie + 30 - wielkopolskie + 32 - zachodniopomorskie + + + + + -u, --update + Import danych do bazy LMSa. Jeśli baza była już wcześniej importowana, + nastąpi aktualizacja bazy. + + + -m, --merge + Przypisanie identyfikatorów TERYT dla komputerów/urządzeń, które + nie zostały jaszcze przypisane, ale posiadają wpisany adres lokalizacji. + Algorytm jest dość prosty i nie ma pewności, że wszystkie adresy + zostaną rozpoznane. + + + Konfigurację tego skryptu zawiera sekcja [teryt] + w pliku lms.ini: + + + url + Adres strony pobierania plików bazy TERYT. Domyślnie zawiera poniższy link. + Przykład: url = http://www.stat.gov.pl/broker/access/prefile/listPreFiles.jspa + + + dir + Katalog w którym, są przechowywane rozpakowane pliki (xml) bazy TERYT. + W tym katalogu zostaną też zapisane pobrane pliki. Domyślnie: katalog uruchomienia skryptu. + Przykład: dir = /var/lib/teryt + + + unzip_binary + Lokalizacja programu unzip. Domyślnie: /usr/bin/unzip. + Przykład: unzip_binary = /sbin/unzip + + + state_list + Lista identyfikatorów województw, oddzielonych przecinkami, które + będą brane pod uwagę podczas importu. W celu minimalizacji rozmiaru bazy danych i czasu + działania skryptu najlepiej ograniczyć się do wybranych województw. + Przykład: state_list = 2 + + + From cvs w lms.org.pl Thu Dec 1 18:10:45 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:45 +0100 (CET) Subject: [lms-commits] CVS update of lms/bin (lms-makewarnings, lms-payments) Message-ID: <20111201171045.4CA77302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:45 Author: chilek Path: /cvsroot/lms/bin Modified: lms-makewarnings lms-payments - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/bin/lms-makewarnings.diff?&r1=1.41&r2=1.42 http://cvs.lms.org.pl/viewvc/Development/lms/bin/lms-payments.diff?&r1=1.133&r2=1.134 Index: lms/bin/lms-makewarnings diff -u lms/bin/lms-makewarnings:1.41 lms/bin/lms-makewarnings:1.42 --- lms/bin/lms-makewarnings:1.41 Wed Feb 16 11:42:45 2011 +++ lms/bin/lms-makewarnings Thu Dec 1 18:10:45 2011 @@ -20,7 +20,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # -# $Id: lms-makewarnings,v 1.41 2011/02/16 10:42:45 alec Exp $ +# $Id: lms-makewarnings,v 1.42 2011/12/01 17:10:45 chilek Exp $ use strict; use DBI; @@ -39,7 +39,7 @@ if ($q =~ /0/) { print " You idiot. error in mask\n"; } - my $len = length($q) ; + my $len = length($q); return $len; } @@ -50,7 +50,7 @@ my @bytes = unpack "CCCC", pack "N", $net_mask; my $dec_rep = sprintf "%d.%d.%d.%d", @bytes; return $dec_rep; -} +} sub matchip($$$) { @@ -283,15 +283,15 @@ if($customergroupscount || !$inicustomergroups) { my $balance = $row->{'balance'}; - my $sdbq = $dbase->prepare("SELECT MAX(a.at) AS at, SUM((t.value * (100 - a.discount)) / 100) AS value - FROM assignments a, tariffs t - WHERE a.tariffid = t.id - AND a.customerid = $row->{'id'} - AND a.period = ".MONTH." - AND (a.datefrom <= $currtime OR a.datefrom = 0) - AND (a.dateto >= $currtime OR a.dateto = 0) - GROUP BY a.customerid - HAVING SUM(t.value * ((100 - a.discount) / 100)) > 0"); + my $sdbq = $dbase->prepare("SELECT MAX(a.at) AS at, SUM(((t.value * (100 - a.pdiscount)) / 100) - a.vdiscount) AS value + FROM assignments a, tariffs t + WHERE a.tariffid = t.id + AND a.customerid = $row->{'id'} + AND a.period = ".MONTH." + AND (a.datefrom <= $currtime OR a.datefrom = 0) + AND (a.dateto >= $currtime OR a.dateto = 0) + GROUP BY a.customerid + HAVING SUM(((t.value * (100 - a.pdiscount)) / 100) - a.vdiscount) > 0"); $sdbq->execute(); $srow = $sdbq->fetchrow_hashref(); $sdbq->finish(); @@ -312,8 +312,8 @@ $sdbq->execute(); while ($srow = $sdbq->fetchrow_hashref()) { - my $tmpname = lc($srow->{'name'}); - my $ipaddr = u32todotquad($srow->{'ipaddr'}); + my $tmpname = lc($srow->{'name'}); + my $ipaddr = u32todotquad($srow->{'ipaddr'}); my $networkscount = 0; foreach my $key (@networks) { Index: lms/bin/lms-payments diff -u lms/bin/lms-payments:1.133 lms/bin/lms-payments:1.134 --- lms/bin/lms-payments:1.133 Sun Nov 20 15:01:03 2011 +++ lms/bin/lms-payments Thu Dec 1 18:10:45 2011 @@ -20,7 +20,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # -# $Id: lms-payments,v 1.133 2011/11/20 14:01:03 alec Exp $ +# $Id: lms-payments,v 1.134 2011/12/01 17:10:45 chilek Exp $ use strict; use DBI; @@ -144,8 +144,8 @@ sub is_leap_year($) { my $year = shift; - return 0 if $year % 4; - return 1 if $year % 100; + return 0 if $year % 4; + return 1 if $year % 100; return 0 if $year % 400; return 1; } @@ -191,9 +191,9 @@ my $halfyear; if($month > 6) { - $halfyear = $dom + ($month - 7) * 100; + $halfyear = $dom + ($month - 7) * 100; } else { - $halfyear = $dom + ($month - 1) * 100; + $halfyear = $dom + ($month - 1) * 100; } my $q_month = $month + 2; @@ -201,12 +201,12 @@ my $y_month = $month + 5; my $y_year = $year; if ($q_month > 12) { - $q_month -= 12; - $q_year += 1; + $q_month -= 12; + $q_year += 1; } if ($y_month > 12) { - $y_month -= 12; - $y_year += 1; + $y_month -= 12; + $y_year += 1; } my %txts; @@ -228,7 +228,7 @@ # sale date setting my $saledate = $currtime; if ($sdate_next) { - $saledate = strftime("%s", 0, 0, 12, 1, $month, $year - 1900); + $saledate = strftime("%s", 0, 0, 12, 1, $month, $year - 1900); } # calculate start and end of numbering period @@ -273,7 +273,7 @@ }; /@{[HALFYEAR]}/ && do { my $startmonth; - if($month<=6) { + if($month<=6) { $startmonth = 1; } else { $startmonth = 7; @@ -326,22 +326,22 @@ # get IDs and periods of default invoices numbering plans $dbq = $dbase->prepare("SELECT n.id, n.period, - COALESCE(a.divisionid, 0) AS divid, isdefault + COALESCE(a.divisionid, 0) AS divid, isdefault FROM numberplans n LEFT JOIN numberplanassignments a ON (a.planid = n.id) WHERE doctype = 1"); $dbq->execute(); while(my $row = $dbq->fetchrow_hashref()) { - if ($row->{'isdefault'}) { - $plans{$row->{'divid'}} = $row->{'id'}; - } - $periods{$row->{'id'}} = $row->{'period'} || YEAR; + if ($row->{'isdefault'}) { + $plans{$row->{'divid'}} = $row->{'id'}; + } + $periods{$row->{'id'}} = $row->{'period'} || YEAR; } # let's go, fetch *ALL* assignments in given day $dbq = $dbase->prepare("SELECT a.tariffid, a.liabilityid, a.customerid, - a.period, a.at, a.suspended, a.settlement, a.datefrom, a.discount, + a.period, a.at, a.suspended, a.settlement, a.datefrom, a.pdiscount, a.vdiscount, a.invoice, t.description AS description, a.id AS assignmentid, c.divisionid, c.paytype, a.paytype AS a_paytype, a.numberplanid, d.inv_paytype AS d_paytype, t.period AS t_period, @@ -349,19 +349,16 @@ (CASE a.liabilityid WHEN 0 THEN t.taxid ELSE l.taxid END) AS taxid, (CASE a.liabilityid WHEN 0 THEN t.prodid ELSE l.prodid END) AS prodid, (CASE a.liabilityid WHEN 0 - THEN (CASE a.suspended WHEN 0 - THEN ROUND(CASE a.discount WHEN 0 THEN t.value - ELSE ((100-a.discount)*t.value)/100 END, 2) - ELSE ROUND(ROUND(CASE a.discount WHEN 0 THEN t.value - ELSE ((100-a.discount)*t.value)/100 END, 2) * $suspension_percentage/100, 2) - END) - ELSE - (CASE a.suspended WHEN 0 - THEN ROUND(CASE a.discount WHEN 0 THEN l.value - ELSE ((100-a.discount)*l.value)/100 END, 2) - ELSE ROUND(ROUND(CASE a.discount WHEN 0 THEN l.value - ELSE ((100-a.discount)*l.value)/100 END, 2) * $suspension_percentage/100, 2) - END) + THEN ROUND(((((100 - a.pdiscount) * t.value) / 100) - a.vdiscount) * + (CASE a.suspended WHEN 0 + THEN 1.0 + ELSE $suspension_percentage / 100 + END), 2) + ELSE ROUND(((((100 - a.pdiscount) * l.value) / 100) - a.vdiscount) * + (CASE a.suspended WHEN 0 + THEN 1.0 + ELSE $suspension_percentage / 100 + END), 2) END) AS value FROM assignments a JOIN customers c ON (a.customerid = c.id) @@ -370,14 +367,14 @@ LEFT JOIN divisions d ON (d.id = c.divisionid) WHERE c.status = 3 AND ((a.period = ".DISPOSABLE." AND at = $today) - OR ((a.period = ".DAY." - OR (a.period = ".WEEK." AND at = $weekday) - OR (a.period = ".MONTH." AND at = $dom) - OR (a.period = ".QUARTER." AND at = $quarter) - OR (a.period = ".HALFYEAR." AND at = $halfyear) - OR (a.period = ".YEAR." AND at = $yearday)) - AND (a.datefrom <= $currtime OR a.datefrom = 0) - AND (a.dateto > $currtime OR a.dateto = 0))) + OR ((a.period = ".DAY." + OR (a.period = ".WEEK." AND at = $weekday) + OR (a.period = ".MONTH." AND at = $dom) + OR (a.period = ".QUARTER." AND at = $quarter) + OR (a.period = ".HALFYEAR." AND at = $halfyear) + OR (a.period = ".YEAR." AND at = $yearday)) + AND (a.datefrom <= $currtime OR a.datefrom = 0) + AND (a.dateto > $currtime OR a.dateto = 0))) ORDER BY a.customerid, a.invoice, a.paytype, a.numberplanid, value DESC"); $dbq->execute(); @@ -396,8 +393,8 @@ if ($skipped != $uid && $tested != $uid) { my $found = 0; - my $sdbq = $dbase->prepare("SELECT UPPER(name) AS name FROM customerassignments, customergroups WHERE customergroups.id = customergroupid AND customerid = $uid GROUP BY name"); - $sdbq->execute(); + my $sdbq = $dbase->prepare("SELECT UPPER(name) AS name FROM customerassignments, customergroups WHERE customergroups.id = customergroupid AND customerid = $uid GROUP BY name"); + $sdbq->execute(); while (my $srow = $sdbq->fetchrow_hashref()) { @@ -472,54 +469,54 @@ if($assign->{'value'} != 0) { - my $val = $assign->{'value'}; - # calculate assignment value according to tariff's period - if ($assign->{'t_period'} && $assign->{'period'} != DISPOSABLE - && $assign->{'t_period'} != $assign->{'period'} - ) { - if ($assign->{'t_period'} == YEAR) { - $val = $val / 12.0; - } elsif ($assign->{'t_period'} == HALFYEAR) { - $val = $val / 6.0; - } elsif ($assign->{'t_period'} == QUARTER) { - $val = $val / 3.0; - } - - if ($assign->{'period'} == YEAR) { - $val = $val * 12.0; - } elsif ($assign->{'period'} == HALFYEAR) { - $val = $val * 6.0; - } elsif ($assign->{'period'} == QUARTER) { - $val = $val * 3.0; - } elsif ($assign->{'period'} == WEEK) { - $val = $val / 4.0; - } elsif ($assign->{'period'} == DAY) { - $val = $val / 30.0; - } + my $val = $assign->{'value'}; + # calculate assignment value according to tariff's period + if ($assign->{'t_period'} && $assign->{'period'} != DISPOSABLE + && $assign->{'t_period'} != $assign->{'period'}) + { + if ($assign->{'t_period'} == YEAR) { + $val = $val / 12.0; + } elsif ($assign->{'t_period'} == HALFYEAR) { + $val = $val / 6.0; + } elsif ($assign->{'t_period'} == QUARTER) { + $val = $val / 3.0; + } + + if ($assign->{'period'} == YEAR) { + $val = $val * 12.0; + } elsif ($assign->{'period'} == HALFYEAR) { + $val = $val * 6.0; + } elsif ($assign->{'period'} == QUARTER) { + $val = $val * 3.0; + } elsif ($assign->{'period'} == WEEK) { + $val = $val / 4.0; + } elsif ($assign->{'period'} == DAY) { + $val = $val / 30.0; + } - } + } - $val = sprintf("%.2f", $val); + $val = sprintf("%.2f", $val); if($assign->{'invoice'}) { - my ($inv_paytype, $numberplan, $plan); + my ($inv_paytype, $numberplan, $plan); + + if ($assign->{'a_paytype'}) { + $inv_paytype = $assign->{'a_paytype'}; + } elsif ($assign->{'paytype'}) { + $inv_paytype = $assign->{'paytype'}; + } elsif ($assign->{'d_paytype'}) { + $inv_paytype = $assign->{'d_paytype'}; + } else { + $inv_paytype = $paytype; + } - if ($assign->{'a_paytype'}) { - $inv_paytype = $assign->{'a_paytype'}; - } elsif ($assign->{'paytype'}) { - $inv_paytype = $assign->{'paytype'}; - } elsif ($assign->{'d_paytype'}) { - $inv_paytype = $assign->{'d_paytype'}; - } else { - $inv_paytype = $paytype; - } - - if ($assign->{'numberplanid'}) { - $plan = $assign->{'numberplanid'}; - } else { - $plan = $plans{$divid} || 0; - } + if ($assign->{'numberplanid'}) { + $plan = $assign->{'numberplanid'}; + } else { + $plan = $plans{$divid} || 0; + } if($invoices{$uid} eq 0 || $paytypes{$uid} != $inv_paytype || $numberplans{$uid} != $plan) { @@ -568,7 +565,8 @@ $icdbq = $dbase->prepare("SELECT itemid FROM invoicecontents WHERE tariffid=$assign->{'tariffid'} AND value=$val - AND docid=$invoices{$uid} AND description=? AND discount=$assign->{'discount'}"); + AND docid=$invoices{$uid} AND description=? AND pdiscount=$assign->{'pdiscount'} + AND vdiscount=$assign->{'vdiscount'}"); $icdbq->execute($desc); if($icrow = $icdbq->fetchrow_hashref()) @@ -577,7 +575,7 @@ $icdbq = $dbase->prepare("UPDATE invoicecontents SET count=count+1 WHERE tariffid=$assign->{'tariffid'} AND docid=$invoices{$uid} - AND description=? AND discount=$assign->{'discount'}"); + AND description=? AND pdiscount=$assign->{'pdiscount'} AND vdiscount=$assign->{'vdiscount'}"); $icdbq->execute($desc); $cdbq = $dbase->prepare("UPDATE cash SET value = value+($val*-1) @@ -589,9 +587,9 @@ $itemid++; $icdbq = $dbase->prepare("INSERT INTO invoicecontents (docid, value, taxid, prodid, - content, count, description, tariffid, itemid, discount) + content, count, description, tariffid, itemid, pdiscount, vdiscount) VALUES ($invoices{$uid}, $val, $assign->{'taxid'}, '$assign->{'prodid'}', - 'szt.', 1, ?, $assign->{'tariffid'}, $itemid, $assign->{'discount'})"); + 'szt.', 1, ?, $assign->{'tariffid'}, $itemid, $assign->{'pdiscount'}, $assign->{'vdiscount'})"); $icdbq->execute($desc); $cdbq = $dbase->prepare("INSERT INTO cash (time, value, taxid, customerid, comment, docid, itemid) @@ -618,8 +616,8 @@ my $period = strftime("%Y/%m/%d", 0, 0, 0, $dom - $diffdays, $month - 1, $year - 1900)." - ".strftime("%Y/%m/%d", 0, 0, 0, $dom - 1, $month - 1, $year - 1900); for ($assign->{'period'}) - { - # there are no disposable or daily liabilities with settlement + { + # there are no disposable or daily liabilities with settlement /@{[WEEK]}/ && do { $alldays = 7; last; }; @@ -647,8 +645,8 @@ $sdesc =~ s/\%period/$period/g; $sdesc =~ s/\%current_month/$current_month/g; - if($assign->{'invoice'}) - { + if($assign->{'invoice'}) + { $icdbq = $dbase->prepare("SELECT itemid FROM invoicecontents WHERE tariffid=? AND value=? AND docid=? AND description=?"); $icdbq->execute($assign->{'tariffid'}, $value, $invoices{$uid}, $sdesc); @@ -670,9 +668,9 @@ $itemid++; $icdbq = $dbase->prepare("INSERT INTO invoicecontents (docid, value, taxid, prodid, - content, count, description, tariffid, itemid, discount) + content, count, description, tariffid, itemid, pdiscount, vdiscount) VALUES ($invoices{$uid}, $value, $assign->{'taxid'}, '$assign->{'prodid'}', - 'szt.', 1, ?, $assign->{'tariffid'}, $itemid, $assign->{'discount'})"); + 'szt.', 1, ?, $assign->{'tariffid'}, $itemid, $assign->{'pdiscount'}, $assign->{'vdiscount'})"); $icdbq->execute($sdesc); $cdbq = $dbase->prepare("INSERT INTO cash (time, value, taxid, customerid, comment, docid, itemid) @@ -702,23 +700,23 @@ # check invoices (autoclose invoices) if ($check_invoices) { - my $dbq = $dbase->prepare("UPDATE documents SET closed = 1 - WHERE customerid IN ( - SELECT customerid - FROM cash WHERE time <= $currtime - GROUP BY customerid - HAVING SUM(value) >= 0 - ) - AND type IN (1, 3, 5) - AND cdate <= $currtime - AND closed = 0"); - $dbq->execute(); - $dbq->finish(); + my $dbq = $dbase->prepare("UPDATE documents SET closed = 1 + WHERE customerid IN ( + SELECT customerid + FROM cash WHERE time <= $currtime + GROUP BY customerid + HAVING SUM(value) >= 0 + ) + AND type IN (1, 3, 5) + AND cdate <= $currtime + AND closed = 0"); + $dbq->execute(); + $dbq->finish(); } # solid payments $dbq = $dbase->prepare("SELECT * FROM payments WHERE value <> 0 - AND (period = ".DAY." + AND (period = ".DAY." OR (period = ".WEEK." AND at=$weekday) OR (period = ".MONTH." AND at=$dom) OR (period = ".QUARTER." AND at = $quarter) @@ -737,10 +735,10 @@ # delete old assignments $dbase->do("DELETE FROM liabilities WHERE id IN ( - SELECT liabilityid FROM assignments - WHERE dateto < $utsfmt - 86400 * 30 AND dateto != 0 AND at < $today - 86400 * 30 - AND liabilityid != 0)"); + SELECT liabilityid FROM assignments + WHERE dateto < $utsfmt - 86400 * 30 AND dateto != 0 AND at < $today - 86400 * 30 + AND liabilityid != 0)"); $dbase->do("DELETE FROM assignments - WHERE dateto < $utsfmt - 86400 * 30 AND dateto != 0 AND at < $today - 86400 * 30"); + WHERE dateto < $utsfmt - 86400 * 30 AND dateto != 0 AND at < $today - 86400 * 30"); $dbase->disconnect(); From cvs w lms.org.pl Thu Dec 1 18:10:45 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:45 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc (ChangeLog) Message-ID: <20111201171045.94E7E302A042@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:45 Author: chilek Path: /cvsroot/lms/doc Modified: ChangeLog - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/ChangeLog.diff?&r1=1.1622&r2=1.1623 Index: lms/doc/ChangeLog diff -u lms/doc/ChangeLog:1.1622 lms/doc/ChangeLog:1.1623 --- lms/doc/ChangeLog:1.1622 Thu Dec 1 08:34:00 2011 +++ lms/doc/ChangeLog Thu Dec 1 18:10:45 2011 @@ -1,4 +1,4 @@ -$Id: ChangeLog,v 1.1622 2011/12/01 07:34:00 alec Exp $ +$Id: ChangeLog,v 1.1623 2011/12/01 17:10:45 chilek Exp $ version ? (????-??-??): @@ -74,6 +74,7 @@ - can send any sms to selected users [chilan] - added %if substitution symbol for interface name [chilan] - BTS#0000892: Fixed bug where phpui/style wasn't used on login page [alec] + - we can use percentage and amount discounts [chilan] version 1.11.13 Dira (2011-04-07) From cvs w lms.org.pl Thu Dec 1 18:10:45 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:45 +0100 (CET) Subject: [lms-commits] CVS update of lms/daemon/modules/payments (payments.c) Message-ID: <20111201171045.6D26E302A041@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:45 Author: chilek Path: /cvsroot/lms/daemon/modules/payments Modified: payments.c - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/daemon/modules/payments/payments.c.diff?&r1=1.99&r2=1.100 Index: lms/daemon/modules/payments/payments.c diff -u lms/daemon/modules/payments/payments.c:1.99 lms/daemon/modules/payments/payments.c:1.100 --- lms/daemon/modules/payments/payments.c:1.99 Fri Apr 1 10:13:45 2011 +++ lms/daemon/modules/payments/payments.c Thu Dec 1 18:10:45 2011 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: payments.c,v 1.99 2011/04/01 08:13:45 alec Exp $ + * $Id: payments.c,v 1.100 2011/12/01 17:10:45 chilek Exp $ */ #include #include @@ -483,7 +483,7 @@ /****** customer payments *******/ // let's create main query char *query = strdup("SELECT a.tariffid, a.customerid, a.period, t.period AS t_period, " - "a.at, a.suspended, a.invoice, a.id AS assignmentid, a.settlement, a.datefrom, a.discount, " + "a.at, a.suspended, a.invoice, a.id AS assignmentid, a.settlement, a.datefrom, a.pdiscount, a.vdiscount, " "c.paytype, a.paytype AS a_paytype, a.numberplanid, d.inv_paytype AS d_paytype, " "UPPER(c.lastname) AS lastname, c.name AS custname, c.address, c.zip, c.city, c.ten, c.ssn, " "c.countryid, c.divisionid, c.paytime, " @@ -491,8 +491,8 @@ "(CASE a.liabilityid WHEN 0 THEN t.taxid ELSE li.taxid END) AS taxid, " "(CASE a.liabilityid WHEN 0 THEN t.prodid ELSE li.prodid END) AS prodid, " "(CASE a.liabilityid WHEN 0 THEN " - "ROUND(CASE a.discount WHEN 0 THEN t.value ELSE t.value-t.value*discount/100 END, 2) " - "ELSE ROUND(CASE a.discount WHEN 0 THEN li.value ELSE li.value-li.value*a.discount/100 END, 2) " + "ROUND((t.value - t.value * a.pdiscount / 100) - a.vdiscount, 2) " + "ELSE ROUND((li.value - li.value * a.pdiscount / 100) - a.vdiscount, 2) " "END) AS value " "FROM assignments a " "JOIN customers c ON (a.customerid = c.id) " @@ -560,15 +560,16 @@ // payments accounting and invoices writing for(i=0; idb_nrows(res); i++) { - char *cid_c = g->db_get_data(res,i,"customerid"); - char *discount = g->db_get_data(res,i,"discount"); - int cid = atoi(cid_c); - int s_state = atoi(g->db_get_data(res,i,"suspended")); - int period = atoi(g->db_get_data(res,i,"period")); - int settlement = atoi(g->db_get_data(res,i,"settlement")); - int datefrom = atoi(g->db_get_data(res,i,"datefrom")); - int t_period = atoi(g->db_get_data(res,i,"t_period")); - double val = atof(g->db_get_data(res,i,"value")); + char *cid_c = g->db_get_data(res,i,"customerid"); + char *pdiscount = g->db_get_data(res,i,"pdiscount"); + char *vdiscount = g->db_get_data(res,i,"vdiscount"); + int cid = atoi(cid_c); + int s_state = atoi(g->db_get_data(res,i,"suspended")); + int period = atoi(g->db_get_data(res,i,"period")); + int settlement = atoi(g->db_get_data(res,i,"settlement")); + int datefrom = atoi(g->db_get_data(res,i,"datefrom")); + int t_period = atoi(g->db_get_data(res,i,"t_period")); + double val = atof(g->db_get_data(res,i,"value")); if( !val ) continue; @@ -760,8 +761,8 @@ invoiceid = strdup(itoa(docid)); result = g->db_pquery(g->conn, "SELECT itemid FROM invoicecontents " - "WHERE tariffid = ? AND docid = ? AND description = '?' AND value = ? AND discount = ?", - g->db_get_data(res,i,"tariffid"), invoiceid, description, value, discount); + "WHERE tariffid = ? AND docid = ? AND description = '?' AND value = ? AND pdiscount = ? AND vdiscount = ?", + g->db_get_data(res,i,"tariffid"), invoiceid, description, value, pdiscount, vdiscount); if( g->db_nrows(result) ) { @@ -779,8 +780,8 @@ itemid++; g->db_pexec(g->conn,"INSERT INTO invoicecontents (docid, itemid, value, " - "taxid, prodid, content, count, description, tariffid, discount) " - "VALUES (?, ?, ?, ?, '?', 'szt.', 1, '?', ?, ?)", + "taxid, prodid, content, count, description, tariffid, pdiscount, vdiscount) " + "VALUES (?, ?, ?, ?, '?', 'szt.', 1, '?', ?, ?, ?)", invoiceid, itoa(itemid), value, @@ -788,7 +789,8 @@ g->db_get_data(res,i,"prodid"), description, g->db_get_data(res,i,"tariffid"), - discount + pdiscount, + vdiscount ); g->str_replace(&insert, "%docid", invoiceid); @@ -870,8 +872,8 @@ itemid++; g->db_pexec(g->conn,"INSERT INTO invoicecontents (docid, itemid, value, taxid, prodid, " - "content, count, description, tariffid, discount) " - "VALUES (?, ?, ?, ?, '?', 'szt.', 1, '?', ?, ?)", + "content, count, description, tariffid, pdiscount, vdiscount) " + "VALUES (?, ?, ?, ?, '?', 'szt.', 1, '?', ?, ?, ?)", invoiceid, itoa(itemid), value, @@ -879,7 +881,8 @@ g->db_get_data(res,i,"prodid"), description, g->db_get_data(res,i,"tariffid"), - discount + pdiscount, + vdiscount ); g->str_replace(&insert, "%docid", invoiceid); From cvs w lms.org.pl Thu Dec 1 18:10:45 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:45 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (LMS.class.php, definitions.php, upgradedb.php) Message-ID: <20111201171045.C5BC7302A043@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:45 Author: chilek Path: /cvsroot/lms/lib Modified: LMS.class.php definitions.php upgradedb.php - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/LMS.class.php.diff?&r1=1.1085&r2=1.1086 http://cvs.lms.org.pl/viewvc/Development/lms/lib/definitions.php.diff?&r1=1.38&r2=1.39 http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb.php.diff?&r1=1.195&r2=1.196 Index: lms/lib/LMS.class.php diff -u lms/lib/LMS.class.php:1.1085 lms/lib/LMS.class.php:1.1086 --- lms/lib/LMS.class.php:1.1085 Tue Nov 15 23:39:09 2011 +++ lms/lib/LMS.class.php Thu Dec 1 18:10:45 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: LMS.class.php,v 1.1085 2011/11/15 22:39:09 chilek Exp $ + * $Id: LMS.class.php,v 1.1086 2011/12/01 17:10:45 chilek Exp $ */ // LMS Class - contains internal LMS database functions used @@ -35,7 +35,7 @@ var $cache = array(); // internal cache var $hooks = array(); // registered plugin hooks var $_version = '1.11-cvs'; // class version - var $_revision = '$Revision: 1.1085 $'; + var $_revision = '$Revision: 1.1086 $'; function LMS(&$DB, &$AUTH, &$CONFIG) // class variables setting { @@ -874,10 +874,8 @@ ) b ON (b.customerid = c.id) LEFT JOIN (SELECT a.customerid, SUM((CASE a.suspended - WHEN 0 THEN (CASE discount WHEN 0 THEN (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END) - ELSE ((100 - discount) * (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END)) / 100 END) - ELSE (CASE discount WHEN 0 THEN (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END) * '.$suspension_percentage.' / 100 - ELSE (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END) * discount * '.$suspension_percentage.' / 10000 END) END) + WHEN 0 THEN (((100 - pdiscount) * (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END) / 100) - vdiscount) + ELSE ((((100 - pdiscount) * (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END) / 100) - vdiscount) * '.$suspension_percentage.' / 100) END) * (CASE t.period WHEN '.MONTHLY.' THEN 1 WHEN '.YEARLY.' THEN 1/12.0 @@ -1785,7 +1783,7 @@ if($assignments = $this->DB->GetAll('SELECT a.id AS id, a.tariffid, a.customerid, a.period, a.at, a.suspended, a.invoice, a.settlement, - a.datefrom, a.dateto, a.discount, a.liabilityid, + a.datefrom, a.dateto, a.pdiscount, a.vdiscount, a.liabilityid, t.uprate, t.upceil, t.downceil, t.downrate, (CASE WHEN t.value IS NULL THEN l.value ELSE t.value END) AS value, (CASE WHEN t.name IS NULL THEN l.name ELSE t.name END) AS name @@ -1840,21 +1838,16 @@ // assigned nodes $assignments[$idx]['nodes'] = $this->DB->GetAll('SELECT nodes.name, nodes.id FROM nodeassignments, nodes WHERE nodeid = nodes.id AND assignmentid = ?', array($row['id'])); - - if ($row['discount'] == 0) - $assignments[$idx]['discounted_value'] = $row['value']; - else - $assignments[$idx]['discounted_value'] = ((100 - $row['discount']) * $row['value']) / 100; - + + $assignments[$idx]['discounted_value'] = (((100 - $row['pdiscount']) * $row['value']) / 100) - $row['vdiscount']; + if ($row['suspended'] == 1) - { $assignments[$idx]['discounted_value'] = $assignments[$idx]['discounted_value'] * $this->CONFIG['finances']['suspension_percentage'] / 100; - } - + $assignments[$idx]['discounted_value'] = round($assignments[$idx]['discounted_value'], 2); - + $now = time(); - + if ($row['suspended'] == 0 && (($row['datefrom'] == 0 || $row['datefrom'] < $now) && ($row['dateto'] == 0 || $row['dateto'] > $now))) @@ -1984,9 +1977,9 @@ } // Create assignment - $this->DB->Execute('INSERT INTO assignments (tariffid, customerid, period, at, invoice, - settlement, numberplanid, paytype, datefrom, dateto, discount, liabilityid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + $this->DB->Execute('INSERT INTO assignments (tariffid, customerid, period, at, invoice, + settlement, numberplanid, paytype, datefrom, dateto, pdiscount, vdiscount, liabilityid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($tariffid, $data['customerid'], $period, @@ -1998,6 +1991,7 @@ $idx ? $datefrom : 0, $idx ? $dateto : 0, 0, + 0, $lid, )); @@ -2016,9 +2010,9 @@ // Create assignments foreach ($tariffs as $t) { - $this->DB->Execute('INSERT INTO assignments (tariffid, customerid, period, at, invoice, - settlement, numberplanid, paytype, datefrom, dateto, discount, liabilityid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + $this->DB->Execute('INSERT INTO assignments (tariffid, customerid, period, at, invoice, + settlement, numberplanid, paytype, datefrom, dateto, pdiscount, vdiscount, liabilityid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($t, $data['customerid'], $data['period'], @@ -2027,7 +2021,7 @@ !empty($data['settlement']) ? 1 : 0, !empty($data['numberplanid']) ? $data['numberplanid'] : NULL, !empty($data['paytype']) ? $data['paytype'] : NULL, - $datefrom, 0, 0, 0, + $datefrom, 0, 0, 0, 0, )); $result[] = $this->DB->GetLastInsertID('assignments'); @@ -2036,20 +2030,20 @@ } // Create one assignment record else { - if(!empty($data['value'])) { - $this->DB->Execute('INSERT INTO liabilities (name, value, taxid, prodid) + if(!empty($data['value'])) { + $this->DB->Execute('INSERT INTO liabilities (name, value, taxid, prodid) VALUES (?, ?, ?, ?)', array($data['name'], str_replace(',', '.', $data['value']), intval($data['taxid']), $data['prodid'] )); - $lid = $this->DB->GetLastInsertID('liabilities'); + $lid = $this->DB->GetLastInsertID('liabilities'); } - $this->DB->Execute('INSERT INTO assignments (tariffid, customerid, period, at, invoice, - settlement, numberplanid, paytype, datefrom, dateto, discount, liabilityid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + $this->DB->Execute('INSERT INTO assignments (tariffid, customerid, period, at, invoice, + settlement, numberplanid, paytype, datefrom, dateto, pdiscount, vdiscount, liabilityid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(intval($data['tariffid']), $data['customerid'], $data['period'], @@ -2060,7 +2054,8 @@ !empty($data['paytype']) ? $data['paytype'] : NULL, $data['datefrom'], $data['dateto'], - $data['discount'], + $data['pdiscount'], + $data['vdiscount'], isset($lid) ? $lid : 0, )); @@ -2130,8 +2125,8 @@ $item['taxid'] = isset($item['taxid']) ? $item['taxid'] : 0; $this->DB->Execute('INSERT INTO invoicecontents (docid, itemid, - value, taxid, prodid, content, count, discount, description, tariffid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + value, taxid, prodid, content, count, pdiscount, vdiscount, description, tariffid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array( $iid, $itemid, @@ -2140,14 +2135,15 @@ $item['prodid'], $item['jm'], $item['count'], - $item['discount'], + $item['pdiscount'], + $item['vdiscount'], $item['name'], $item['tariffid'] )); $this->AddBalance(array( 'time' => $cdate, - 'value' => $item['valuebrutto']*$item['count']*-1, + 'value' => $item['valuebrutto'] * $item['count'] * -1, 'taxid' => $item['taxid'], 'customerid' => $invoice['customer']['id'], 'comment' => $item['name'], @@ -2213,7 +2209,8 @@ WHERE d.id = ? AND (d.type = ? OR d.type = ?)', array($invoiceid, DOC_INVOICE, DOC_CNOTE))) { - $result['discount'] = 0; + $result['pdiscount'] = 0; + $result['vdiscount'] = 0; $result['totalbase'] = 0; $result['totaltax'] = 0; $result['total'] = 0; @@ -2232,7 +2229,7 @@ if($result['content'] = $this->DB->GetAll('SELECT invoicecontents.value AS value, itemid, taxid, taxes.value AS taxvalue, taxes.label AS taxlabel, prodid, content, count, invoicecontents.description AS description, - tariffid, itemid, discount + tariffid, itemid, pdiscount, vdiscount FROM invoicecontents LEFT JOIN taxes ON taxid = taxes.id WHERE docid=? @@ -2275,7 +2272,8 @@ $result['taxest'][$row['taxvalue']]['taxvalue'] = $row['taxvalue']; $result['content'][$idx]['pkwiu'] = $row['prodid']; - $result['discount'] += $row['discount']; + $result['pdiscount'] += $row['pdiscount']; + $result['vdiscount'] += $row['vdiscount']; } $result['pdate'] = $result['cdate'] + ($result['paytime'] * 86400); Index: lms/lib/definitions.php diff -u lms/lib/definitions.php:1.38 lms/lib/definitions.php:1.39 --- lms/lib/definitions.php:1.38 Fri Nov 25 15:41:39 2011 +++ lms/lib/definitions.php Thu Dec 1 18:10:45 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: definitions.php,v 1.38 2011/11/25 14:41:39 chilek Exp $ + * $Id: definitions.php,v 1.39 2011/12/01 17:10:45 chilek Exp $ */ // that definitions should be included before LMS.class.php but after Smarty @@ -172,6 +172,14 @@ CONTACT_FAX => trans('fax'), ); +define('DISCOUNT_PERCENTAGE', 1); +define('DISCOUNT_AMOUNT', 2); + +$DISCOUNTTYPES = array( + DISCOUNT_PERCENTAGE => '%', + DISCOUNT_AMOUNT => trans('amount'), +); + if(isset($SMARTY)) { $SMARTY->assign('_DOCTYPES', $DOCTYPES); @@ -183,6 +191,7 @@ $SMARTY->assign('_TARIFFTYPES', $TARIFFTYPES); $SMARTY->assign('_PAYTYPES', $PAYTYPES); $SMARTY->assign('_CONTACTTYPES', $CONTACTTYPES); + $SMARTY->assign('_DISCOUNTTYPES', $DISCOUNTTYPES); } define('DEFAULT_NUMBER_TEMPLATE', '%N/LMS/%Y'); Index: lms/lib/upgradedb.php diff -u lms/lib/upgradedb.php:1.195 lms/lib/upgradedb.php:1.196 --- lms/lib/upgradedb.php:1.195 Tue Nov 8 20:32:39 2011 +++ lms/lib/upgradedb.php Thu Dec 1 18:10:45 2011 @@ -21,10 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: upgradedb.php,v 1.195 2011/11/08 19:32:39 chilek Exp $ + * $Id: upgradedb.php,v 1.196 2011/12/01 17:10:45 chilek Exp $ */ -define('DBVERSION', '2011110800'); // here should be always the newest version of database! +define('DBVERSION', '2011113000'); // here should be always the newest version of database! // it placed here to avoid read disk every time when we call this file. /* From cvs w lms.org.pl Thu Dec 1 18:10:45 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:45 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/locale/pl (strings.php) Message-ID: <20111201171045.EC048302A044@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:45 Author: chilek Path: /cvsroot/lms/lib/locale/pl Modified: strings.php - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/locale/pl/strings.php.diff?&r1=1.404&r2=1.405 Index: lms/lib/locale/pl/strings.php diff -u lms/lib/locale/pl/strings.php:1.404 lms/lib/locale/pl/strings.php:1.405 --- lms/lib/locale/pl/strings.php:1.404 Sat Nov 26 13:52:45 2011 +++ lms/lib/locale/pl/strings.php Thu Dec 1 18:10:45 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: strings.php,v 1.404 2011/11/26 12:52:45 chilek Exp $ + * $Id: strings.php,v 1.405 2011/12/01 17:10:45 chilek Exp $ */ $_LANG['$a ($b addresses)'] = '$a ($b adresów)'; @@ -459,7 +459,7 @@ $_LANG['Enter device producer (optional)'] = 'Wprowadź producenta urządzenia (opcjonalnie)'; $_LANG['Enter device purchase date in \'yyyy/mm/dd\' format or click to choose date from calendar (optional)'] = 'Wprowadź datę zakupu urządzenia w formacie RRRR/MM/DD lub kliknij by wybrać ją z kalendarza (opcjonalnie)'; $_LANG['Enter device serial number (optional)'] = 'Wprowadź numer seryjny urządzenia (opcjonalnie)'; -$_LANG['Enter discount percentage'] = 'Wprowadź procent rabatu'; +$_LANG['Enter discount percentage or amount'] = 'Wprowadź procent lub kwotę rabatu'; $_LANG['Enter domain name'] = 'Wprowadź nazwę domeny'; $_LANG['Enter e-mail address'] = 'Wprowadź adres e-mail'; $_LANG['Enter e-mail address (optional)'] = 'Wprowadź adres e-mail (opcjonalnie)'; From cvs w lms.org.pl Thu Dec 1 18:10:46 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:46 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/upgradedb (2 files) Message-ID: <20111201171046.1E930302A045@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:46 Author: chilek Path: /cvsroot/lms/lib/upgradedb Added: mysql.2011113000.php postgres.2011113000.php - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb/mysql.2011113000.php?rev=1.1 http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb/postgres.2011113000.php?rev=1.1 Index: lms/lib/upgradedb/mysql.2011113000.php diff -u /dev/null lms/lib/upgradedb/mysql.2011113000.php:1.1 --- /dev/null Thu Dec 1 18:10:46 2011 +++ lms/lib/upgradedb/mysql.2011113000.php Thu Dec 1 18:10:45 2011 @@ -0,0 +1,38 @@ +BeginTrans(); + +$DB->Execute("ALTER TABLE assignments CHANGE discount TO pdiscount decimal(4, 2) NOT NULL DEFAULT '0'"); +$DB->Execute("ALTER TABLE invoicecontents CHANGE discount TO pdiscount decimal(4, 2) NOT NULL DEFAULT '0'"); +$DB->Execute("ALTER TABLE assignments ADD vdiscount decimal(9, 2) NOT NULL DEFAULT '0'"); +$DB->Execute("ALTER TABLE invoicecontents ADD vdiscount decimal(9, 2) NOT NULL DEFAULT '0'"); + +$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?",array('2011113000', 'dbversion')); + +$DB->CommitTrans(); + +?> Index: lms/lib/upgradedb/postgres.2011113000.php diff -u /dev/null lms/lib/upgradedb/postgres.2011113000.php:1.1 --- /dev/null Thu Dec 1 18:10:46 2011 +++ lms/lib/upgradedb/postgres.2011113000.php Thu Dec 1 18:10:45 2011 @@ -0,0 +1,38 @@ +BeginTrans(); + +$DB->Execute("ALTER TABLE assignments RENAME discount TO pdiscount"); +$DB->Execute("ALTER TABLE invoicecontents RENAME discount TO pdiscount"); +$DB->Execute("ALTER TABLE assignments ADD vdiscount numeric(9, 2) DEFAULT 0 NOT NULL"); +$DB->Execute("ALTER TABLE invoicecontents ADD vdiscount numeric(9, 2) DEFAULT 0 NOT NULL"); + +$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?",array('2011113000', 'dbversion')); + +$DB->CommitTrans(); + +?> From cvs w lms.org.pl Thu Dec 1 18:10:46 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:46 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (8 files) Message-ID: <20111201171046.B1410302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:46 Author: chilek Path: /cvsroot/lms/modules Modified: customerassignmentadd.php customerassignmentedit.php invoice_pdf.inc.php invoiceedit.php invoicenew.php invoicenote.php print.php tarifflist.php - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/customerassignmentadd.php.diff?&r1=1.8&r2=1.9 http://cvs.lms.org.pl/viewvc/Development/lms/modules/customerassignmentedit.php.diff?&r1=1.5&r2=1.6 http://cvs.lms.org.pl/viewvc/Development/lms/modules/invoice_pdf.inc.php.diff?&r1=1.10&r2=1.11 http://cvs.lms.org.pl/viewvc/Development/lms/modules/invoiceedit.php.diff?&r1=1.40&r2=1.41 http://cvs.lms.org.pl/viewvc/Development/lms/modules/invoicenew.php.diff?&r1=1.88&r2=1.89 http://cvs.lms.org.pl/viewvc/Development/lms/modules/invoicenote.php.diff?&r1=1.50&r2=1.51 http://cvs.lms.org.pl/viewvc/Development/lms/modules/print.php.diff?&r1=1.142&r2=1.143 http://cvs.lms.org.pl/viewvc/Development/lms/modules/tarifflist.php.diff?&r1=1.45&r2=1.46 Index: lms/modules/customerassignmentadd.php diff -u lms/modules/customerassignmentadd.php:1.8 lms/modules/customerassignmentadd.php:1.9 --- lms/modules/customerassignmentadd.php:1.8 Fri Oct 14 18:08:58 2011 +++ lms/modules/customerassignmentadd.php Thu Dec 1 18:10:46 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: customerassignmentadd.php,v 1.8 2011/10/14 16:08:58 chilek Exp $ + * $Id: customerassignmentadd.php,v 1.9 2011/12/01 17:10:46 chilek Exp $ */ // get customer name and check privileges using customersview @@ -212,75 +212,84 @@ if($to < $from && $to != 0 && $from != 0) $error['dateto'] = trans('Incorrect date range!'); - $a['discount'] = str_replace(',','.',$a['discount']); - if($a['discount'] == '') - $a['discount'] = 0; - elseif($a['discount']<0 || $a['discount']>99.99 || !is_numeric($a['discount'])) + $a['discount'] = str_replace(',', '.', $a['discount']); + $a['pdiscount'] = 0; + $a['vdiscount'] = 0; + if (preg_match('/^[0-9]+(\.[0-9]+)*$/', $a['discount'])) + { + $a['pdiscount'] = ($a['discount_type'] == DISCOUNT_PERCENTAGE ? floatval($a['discount']) : 0); + $a['vdiscount'] = ($a['discount_type'] == DISCOUNT_AMOUNT ? floatval($a['discount']) : 0); + } + if ($a['pdiscount'] < 0 || $a['pdiscount'] > 99.99 || $a['vdiscount'] < 0) $error['discount'] = trans('Wrong discount value!'); - // suspending - if($a['tariffid'] == -1) + // suspending + if ($a['tariffid'] == -1) { - $a['tariffid'] = 0; - $a['discount'] = 0; - $a['value'] = 0; - unset($a['schemaid']); - unset($a['invoice']); - unset($a['settlement']); + $a['tariffid'] = 0; + $a['discount'] = 0; + $a['pdiscount'] = 0; + $a['vdiscount'] = 0; + $a['value'] = 0; + unset($a['schemaid']); + unset($a['invoice']); + unset($a['settlement']); unset($error['at']); $at = 0; } - // promotion schema - else if ($a['tariffid'] == -2) { - if (!$from) { - $error['datefrom'] = trans('Promotion start date is required!'); - } - else { - $a['promotiontariffid'] = $a['stariffid']; - $a['value'] = 0; - $a['discount'] = 0; - // @TODO: handle other period/at values - $a['period'] = MONTHLY; - $a['at'] = 1; - } - } + // promotion schema + elseif ($a['tariffid'] == -2) { + if (!$from) { + $error['datefrom'] = trans('Promotion start date is required!'); + } + else { + $a['promotiontariffid'] = $a['stariffid']; + $a['value'] = 0; + $a['discount'] = 0; + $a['pdiscount'] = 0; + $a['vdiscount'] = 0; + // @TODO: handle other period/at values + $a['period'] = MONTHLY; + $a['at'] = 1; + } + } // tariffless - else if (!$a['tariffid']) { - if (!$a['name']) - $error['name'] = trans('Liability name is required!'); - if (!$a['value']) - $error['value'] = trans('Liability value is required!'); - else if(!preg_match('/^[-]?[0-9.,]+$/', $a['value'])) - $error['value'] = trans('Incorrect value!'); + elseif (!$a['tariffid']) { + if (!$a['name']) + $error['name'] = trans('Liability name is required!'); + if (!$a['value']) + $error['value'] = trans('Liability value is required!'); + elseif (!preg_match('/^[-]?[0-9.,]+$/', $a['value'])) + $error['value'] = trans('Incorrect value!'); - unset($a['schemaid']); - } + unset($a['schemaid']); + } - if(!$error) + if (!$error) { - $a['customerid'] = $customer['id']; - $a['period'] = $period; - $a['at'] = $at; + $a['customerid'] = $customer['id']; + $a['period'] = $period; + $a['at'] = $at; $a['datefrom'] = $from; $a['dateto'] = $to; - $DB->BeginTrans(); + $DB->BeginTrans(); $LMS->AddAssignment($a); - $DB->CommitTrans(); + $DB->CommitTrans(); $SESSION->redirect('?'.$SESSION->get('backto')); } - $SMARTY->assign('error', $error); + $SMARTY->assign('error', $error); } else { - if (!empty($CONFIG['phpui']['default_assignment_invoice'])) - $a['invoice'] = true; - if (!empty($CONFIG['phpui']['default_assignment_settlement'])) - $a['settlement'] = true; - if (!empty($CONFIG['phpui']['default_assignment_period'])) - $a['period'] = $CONFIG['phpui']['default_assignment_period']; + if (!empty($CONFIG['phpui']['default_assignment_invoice'])) + $a['invoice'] = true; + if (!empty($CONFIG['phpui']['default_assignment_settlement'])) + $a['settlement'] = true; + if (!empty($CONFIG['phpui']['default_assignment_period'])) + $a['period'] = $CONFIG['phpui']['default_assignment_period']; } $expired = isset($_GET['expired']) ? $_GET['expired'] : false; @@ -293,15 +302,15 @@ unset($customernodes['total']); $schemas = $DB->GetAll('SELECT p.name AS promotion, s.name, s.id, - (SELECT '.$DB->GroupConcat('tariffid', ',').' - FROM promotionassignments WHERE promotionschemaid = s.id - ) AS tariffs - FROM promotions p - JOIN promotionschemas s ON (p.id = s.promotionid) - WHERE p.disabled <> 1 AND s.disabled <> 1 - AND EXISTS (SELECT 1 FROM promotionassignments - WHERE promotionschemaid = s.id LIMIT 1) - ORDER BY p.name, s.name'); + (SELECT '.$DB->GroupConcat('tariffid', ',').' + FROM promotionassignments WHERE promotionschemaid = s.id + ) AS tariffs + FROM promotions p + JOIN promotionschemas s ON (p.id = s.promotionid) + WHERE p.disabled <> 1 AND s.disabled <> 1 + AND EXISTS (SELECT 1 FROM promotionassignments + WHERE promotionschemaid = s.id LIMIT 1) + ORDER BY p.name, s.name'); $SMARTY->assign('assignment', $a); $SMARTY->assign('customernodes', $customernodes); Index: lms/modules/customerassignmentedit.php diff -u lms/modules/customerassignmentedit.php:1.5 lms/modules/customerassignmentedit.php:1.6 --- lms/modules/customerassignmentedit.php:1.5 Fri Oct 14 18:08:58 2011 +++ lms/modules/customerassignmentedit.php Thu Dec 1 18:10:46 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: customerassignmentedit.php,v 1.5 2011/10/14 16:08:58 chilek Exp $ + * $Id: customerassignmentedit.php,v 1.6 2011/12/01 17:10:46 chilek Exp $ */ // get customer name and check privileges using customersview @@ -208,9 +208,9 @@ else $error['datefrom'] = trans('Incorrect charging start time!'); - if($a['dateto'] == '') + if ($a['dateto'] == '') $to = 0; - elseif(preg_match('/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}$/', $a['dateto'])) + elseif (preg_match('/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}$/', $a['dateto'])) { list($y, $m, $d) = explode('/', $a['dateto']); if(checkdate($m, $d, $y)) @@ -221,108 +221,116 @@ else $error['dateto'] = trans('Incorrect charging end time!'); - if($to < $from && $to != 0 && $from != 0) + if ($to < $from && $to != 0 && $from != 0) $error['dateto'] = trans('Incorrect date range!'); - $a['discount'] = str_replace(',','.',$a['discount']); - if($a['discount'] == '') - $a['discount'] = 0; - elseif($a['discount']<0 || $a['discount']>99.99 || !is_numeric($a['discount'])) + $a['discount'] = str_replace(',', '.', $a['discount']); + $a['pdiscount'] = 0.0; + $a['vdiscount'] = 0.0; + if (preg_match('/^[0-9]+(\.[0-9]+)*$/', $a['discount'])) + { + $a['pdiscount'] = ($a['discount_type'] == DISCOUNT_PERCENTAGE ? floatval($a['discount']) : 0); + $a['vdiscount'] = ($a['discount_type'] == DISCOUNT_AMOUNT ? floatval($a['discount']) : 0); + } + if ($a['pdiscount'] < 0 || $a['pdiscount'] > 99.99 || $a['vdiscount'] < 0) $error['discount'] = trans('Wrong discount value!'); - if($a['tariffid'] == -1) + if ($a['tariffid'] == -1) { unset($error['at']); $at = 0; } - else if(!$a['tariffid']) + elseif (!$a['tariffid']) { - if($a['name'] == '') + if ($a['name'] == '') $error['name'] = trans('Liability name is required!'); if (!$a['value']) - $error['value'] = trans('Liability value is required!'); - else if(!preg_match('/^[-]?[0-9.,]+$/', $a['value'])) + $error['value'] = trans('Liability value is required!'); + elseif (!preg_match('/^[-]?[0-9.,]+$/', $a['value'])) $error['value'] = trans('Incorrect value!'); } if(!$error) { - $DB->BeginTrans(); + $DB->BeginTrans(); - if($a['liabilityid']) + if($a['liabilityid']) { - if ($a['tariffid']) { - $DB->Execute('DELETE FROM liabilities WHERE id=?', array($a['liabilityid'])); - $a['liabilityid'] = 0; - } - else - $DB->Execute('UPDATE liabilities SET value=?, name=?, taxid=?, prodid=? WHERE id=?', - array(str_replace(',','.',$a['value']), - $a['name'], - intval($a['taxid']), - $a['prodid'], - $a['liabilityid'] - )); + if ($a['tariffid']) { + $DB->Execute('DELETE FROM liabilities WHERE id=?', array($a['liabilityid'])); + $a['liabilityid'] = 0; + } + else + $DB->Execute('UPDATE liabilities SET value=?, name=?, taxid=?, prodid=? WHERE id=?', + array(str_replace(',','.',$a['value']), + $a['name'], + intval($a['taxid']), + $a['prodid'], + $a['liabilityid'] + )); } else if (!$a['tariffid']) { - $DB->Execute('INSERT INTO liabilities (name, value, taxid, prodid) - VALUES (?, ?, ?, ?)', - array($a['name'], - $a['value'], - intval($a['taxid']), - $a['prodid'] - )); + $DB->Execute('INSERT INTO liabilities (name, value, taxid, prodid) + VALUES (?, ?, ?, ?)', + array($a['name'], + $a['value'], + intval($a['taxid']), + $a['prodid'] + )); - $a['liabilityid'] = $DB->GetLastInsertID('liabilities'); + $a['liabilityid'] = $DB->GetLastInsertID('liabilities'); } if ($a['tariffid'] == -1) { - $a['tariffid'] = 0; - $a['discount'] = 0; - unset($a['invoice']); - unset($a['settlement']); + $a['tariffid'] = 0; + $a['discount'] = 0; + $a['pdiscount'] = 0; + $a['vdiscount'] = 0; + unset($a['invoice']); + unset($a['settlement']); } $DB->Execute('UPDATE assignments SET tariffid=?, customerid=?, period=?, at=?, - invoice=?, settlement=?, datefrom=?, dateto=?, discount=?, liabilityid=?, - numberplanid=?, paytype=? - WHERE id=?', - array(intval($a['tariffid']), - $customer['id'], - $period, - $at, - isset($a['invoice']) ? 1 : 0, - isset($a['settlement']) ? 1 : 0, - $from, - $to, - $a['discount'], - $a['liabilityid'], - !empty($a['numberplanid']) ? $a['numberplanid'] : NULL, - !empty($a['paytype']) ? $a['paytype'] : NULL, - $a['id'], + invoice=?, settlement=?, datefrom=?, dateto=?, pdiscount=?, vdiscount=?, + liabilityid=?, numberplanid=?, paytype=? + WHERE id=?', + array(intval($a['tariffid']), + $customer['id'], + $period, + $at, + isset($a['invoice']) ? 1 : 0, + isset($a['settlement']) ? 1 : 0, + $from, + $to, + $a['pdiscount'], + $a['vdiscount'], + $a['liabilityid'], + !empty($a['numberplanid']) ? $a['numberplanid'] : NULL, + !empty($a['paytype']) ? $a['paytype'] : NULL, + $a['id'], )); $DB->Execute('DELETE FROM nodeassignments WHERE assignmentid=?', array($a['id'])); - if(isset($a['nodes']) && sizeof($a['nodes'])) + if (isset($a['nodes']) && sizeof($a['nodes'])) { foreach($a['nodes'] as $nodeid) $DB->Execute('INSERT INTO nodeassignments (nodeid, assignmentid) VALUES (?,?)', array($nodeid, $a['id'])); } - $DB->CommitTrans(); + $DB->CommitTrans(); $SESSION->redirect('?'.$SESSION->get('backto')); } - $SMARTY->assign('error', $error); + $SMARTY->assign('error', $error); } else { $a = $DB->GetRow('SELECT a.id AS id, a.customerid, a.tariffid, a.period, - a.at, a.datefrom, a.dateto, a.numberplanid, a.paytype, - a.invoice, a.settlement, a.discount, a.liabilityid, + a.at, a.datefrom, a.dateto, a.numberplanid, a.paytype, + a.invoice, a.settlement, a.pdiscount, a.vdiscount, a.liabilityid, (CASE liabilityid WHEN 0 THEN tariffs.name ELSE liabilities.name END) AS name, liabilities.value AS value, liabilities.prodid AS prodid, liabilities.taxid AS taxid FROM assignments a @@ -330,6 +338,17 @@ LEFT JOIN liabilities ON (liabilities.id = a.liabilityid) WHERE a.id = ?', array($_GET['id'])); + $a['pdiscount'] = floatval($a['pdiscount']); + $a['vdiscount'] = floatval($a['vdiscount']); + if (!empty($a['pdiscount'])) { + $a['discount'] = $a['pdiscount']; + $a['discount_type'] = DISCOUNT_PERCENTAGE; + } + elseif (!empty($a['vdiscount'])) { + $a['discount'] = $a['vdiscount']; + $a['discount_type'] = DISCOUNT_AMOUNT; + } + if($a['dateto']) $a['dateto'] = date('Y/m/d', $a['dateto']); if($a['datefrom']) @@ -348,12 +367,12 @@ break; case DISPOSABLE: if($a['at']) - $a['at'] = date('Y/m/d', $a['at']); + $a['at'] = date('Y/m/d', $a['at']); break; } - if (!$a['tariffid'] && !$a['liabilityid']) - $a['tariffid'] = -1; + if (!$a['tariffid'] && !$a['liabilityid']) + $a['tariffid'] = -1; // nodes assignments $a['nodes'] = $DB->GetCol('SELECT nodeid FROM nodeassignments WHERE assignmentid=?', array($a['id'])); Index: lms/modules/invoice_pdf.inc.php diff -u lms/modules/invoice_pdf.inc.php:1.10 lms/modules/invoice_pdf.inc.php:1.11 --- lms/modules/invoice_pdf.inc.php:1.10 Fri Oct 14 18:08:59 2011 +++ lms/modules/invoice_pdf.inc.php Thu Dec 1 18:10:46 2011 @@ -21,10 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: invoice_pdf.inc.php,v 1.10 2011/10/14 16:08:59 chilek Exp $ + * $Id: invoice_pdf.inc.php,v 1.11 2011/12/01 17:10:46 chilek Exp $ */ -// Faktury w PDF, do użycia z formularzami FT-0100 (c) Polarnet -// w razie pytań mailto:lexx w polarnet.org +// Faktury w PDF, do uĹźycia z formularzami FT-0100 (c) Polarnet +// w razie pytań mailto:lexx w polarnet.org function invoice_simple_form_fill($x,$y,$scale) { @@ -244,507 +244,558 @@ return($y); } -function invoice_data($x,$y,$width,$font_size,$margin) +function invoice_data($x, $y, $width, $font_size, $margin) { - global $invoice,$pdf; - - $pdf->setlinestyle(0.5); - $pdf->line($x,$y,$x+$width,$y); - - $v = 1; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('No.')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Name of Product, Commodity or Service:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Product ID:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Unit:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Amount:')).''; - if($invoice['discount']) - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Discount:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Unitary Net Value:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Net Value:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Tax Rate:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Tax Value:')).''; - $t_data[$v++] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Gross Value:')).''; - - for ($i = 1; $i < $v; $i++) $t_justify[$i]="center"; - for ($i = 1; $i < $v; $i++) $t_width[$i] = getWrapTextWidth($font_size,$t_data[$i])+2*$margin+2; - - // tutaj jeszcze trzeba będzie sprawdzić jaką szerokość mają pola w tabelce później - if ($invoice['content']) foreach ($invoice['content'] as $item) - { - $v = 2; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description'])); - $tt_width[$v++] = $pdf->getTextWidth($font_size,$item['prodid']); - $tt_width[$v++] = $pdf->getTextWidth($font_size,$item['content']); - $tt_width[$v++] = $pdf->getTextWidth($font_size,sprintf('%.2f',$item['count'])); - if($invoice['discount']) - $tt_width[$v++] = $pdf->getTextWidth($font_size,sprintf('%.2f%%',$item['discount'])); - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])))+6; - for ($i = 2; $i < $v; $i++) - if(($tt_width[$i]+2*$margin+2)>$t_width[$i]) - $t_width[$i] = $tt_width[$i]+2*$margin+2; - } - - if(isset($invoice['invoice']['content'])) foreach ($invoice['invoice']['content'] as $item) - { - $v = 2; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description'])); - $tt_width[$v++] = $pdf->getTextWidth($font_size,$item['prodid']); - $tt_width[$v++] = $pdf->getTextWidth($font_size,$item['content']); - $tt_width[$v++] = $pdf->getTextWidth($font_size,sprintf('%.2f',$item['count'])); - if($invoice['discount']) - $tt_width[$v++] = $pdf->getTextWidth($font_size,sprintf('%.2f%%',$item['discount'])); - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])))+6; - $tt_width[$v++] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])))+6; - for ($i = 2; $i < $v; $i++) - if(($tt_width[$i]+2*$margin+2)>$t_width[$i]) - $t_width[$i] = $tt_width[$i]+2*$margin+2; - } - // Kolumna 2 będzie miała rozmiar ustalany dynamicznie - $t_width[2] = $width-($t_width[1]+$t_width[3]+$t_width[4]+$t_width[5]+$t_width[6]+$t_width[7]+$t_width[8]+$t_width[9]+$t_width[10]+($invoice['discount'] ? $t_width[11] : 0)+ 2*$margin*($invoice['discount'] ? 11 : 10)); - $y = invoice_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - $t_justify[11] = $t_justify[10] = $t_justify[9] = $t_justify[8] = $t_justify[7] = $t_justify[6] = $t_justify[5] = "right"; - $t_justify[2] = 'left'; + global $invoice, $pdf; - if(isset($invoice['invoice'])) - { - // we have credit note, so first print corrected invoice data - $xx = $x; - $y = $y-text_align_left($x,$y-10,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Was:')).''); - $y -= 6; - $pdf->line($x,$y,$x+$width,$y); - $lp = 1; - if ($invoice['invoice']['content']) - foreach ($invoice['invoice']['content'] as $item) - { - $v = 1; - $t_data[$v++] = $lp; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description']); - $t_data[$v++] = $item['prodid']; - $t_data[$v++] = $item['content']; - $t_data[$v++] = sprintf('%.2f',$item['count']); - if($invoice['discount']) - $t_data[$v++] = sprintf('%.2f%%',$item['discount']); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - - $lp++; - $y = invoice_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - } - - $x = $x + ($invoice['discount'] ? 7 : 6)*2*$margin + $t_width[1] + $t_width[2] + $t_width[3] + $t_width[4] + $t_width[5] + $t_width[6] + ($invoice['discount'] ? $t_width[7] : 0); + $pdf->setlinestyle(0.5); + $pdf->line($x, $y, $x + $width, $y); - $fy=$y-$margin-$pdf->GetFontHeight($font_size); - text_align_right($x-$margin,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Total:')).''); - - $v = $invoice['discount'] ? 8 : 7; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['invoice']['totalbase'])); - $t_data[$v++] = "x"; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['invoice']['totaltax'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['invoice']['total'])); - - $y = invoice_short_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - $y -= 5; + $v = 1; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('No.')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Name of Product, Commodity or Service:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Product ID:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Unit:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Amount:')).''; + if (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Discount:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Unitary Net Value:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Net Value:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Tax Rate:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Tax Value:')).''; + $t_data[$v++] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Gross Value:')).''; + + for ($i = 1; $i < $v; $i++) $t_justify[$i] = "center"; + for ($i = 1; $i < $v; $i++) $t_width[$i] = getWrapTextWidth($font_size, $t_data[$i]) + 2 * $margin + 2; + + // tutaj jeszcze trzeba będzie sprawdzić jaką szerokość mają pola w tabelce później + if ($invoice['content']) + foreach ($invoice['content'] as $item) + { + $v = 2; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8","ISO-8859-2//TRANSLIT", $item['description'])); + $tt_width[$v++] = $pdf->getTextWidth($font_size, $item['prodid']); + $tt_width[$v++] = $pdf->getTextWidth($font_size, $item['content']); + $tt_width[$v++] = $pdf->getTextWidth($font_size, sprintf('%.2f', $item['count'])); + if (!empty($invoice['pdiscount'])) + $tt_width[$v] = $pdf->getTextWidth($font_size, sprintf('%.2f %%', $item['pdiscount'])); + if (!empty($invoice['vdiscount'])) + { + $tmp_width = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount']))); + if ($tmp_width > $tt_width[$v]) + $tt_width[$v] = $tmp_width; + } + $v++; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue']))) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase']))) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel'])) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax']))) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total']))) + 6; + for ($i = 2; $i < $v; $i++) + if(($tt_width[$i] + 2 * $margin + 2) > $t_width[$i]) + $t_width[$i] = $tt_width[$i] + 2 * $margin + 2; + } + + if (isset($invoice['invoice']['content'])) + foreach ($invoice['invoice']['content'] as $item) + { + $v = 2; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8","ISO-8859-2//TRANSLIT", $item['description'])); + $tt_width[$v++] = $pdf->getTextWidth($font_size, $item['prodid']); + $tt_width[$v++] = $pdf->getTextWidth($font_size, $item['content']); + $tt_width[$v++] = $pdf->getTextWidth($font_size, sprintf('%.2f', $item['count'])); + if(!empty($invoice['pdiscount'])) + $tt_width[$v] = $pdf->getTextWidth($font_size, sprintf('%.2f %%', $item['pdiscount'])); + if (!empty($invoice['vdiscount'])) + { + $tmp_width = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount']))); + if ($tmp_width > $tt_width[$v]) + $tt_width[$v] = $tmp_width; + } + $v++; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue']))) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase']))) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel'])) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax']))) + 6; + $tt_width[$v++] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total']))) + 6; + for ($i = 2; $i < $v; $i++) + if(($tt_width[$i] + 2 * $margin + 2) > $t_width[$i]) + $t_width[$i] = $tt_width[$i] + 2 * $margin + 2; + } + // Kolumna 2 będzie miała rozmiar ustalany dynamicznie + $t_width[2] = $width - ($t_width[1] + $t_width[3] + $t_width[4] + $t_width[5] + $t_width[6] + $t_width[7] + + $t_width[8] + $t_width[9] + $t_width[10] + (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount']) ? $t_width[11] : 0) + + 2 * $margin * (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount']) ? 11 : 10)); + $y = invoice_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + $t_justify[11] = $t_justify[10] = $t_justify[9] = $t_justify[8] = $t_justify[7] = $t_justify[6] = $t_justify[5] = "right"; + $t_justify[2] = 'left'; - $fy=$y-$margin-$pdf->GetFontHeight($font_size); - text_align_right($x-$margin,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('in it:')).''); - $v = $invoice['discount'] ? 8 : 7; - $pdf->line($x,$y,$x+$t_width[$v++]+$t_width[$v++]+$t_width[$v++]+$t_width[$v++]+8*$margin,$y); - - if ($invoice['invoice']['taxest']) - foreach ($invoice['invoice']['taxest'] as $item) - { - $v = $invoice['discount'] ? 8 : 7; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['base'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['tax'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - $y = invoice_short_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - } - - $x = $xx; - if ($invoice['reason'] != '') + if (isset($invoice['invoice'])) { - $y = $y-text_align_left($x,$y-10,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Reason:').' '.$invoice['reason']).''); - $y -= 10; + // we have credit note, so first print corrected invoice data + $xx = $x; + $y = $y-text_align_left($x, $y - 10, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Was:')).''); + $y -= 6; + $pdf->line($x, $y, $x + $width, $y); + $lp = 1; + if ($invoice['invoice']['content']) + foreach ($invoice['invoice']['content'] as $item) + { + $v = 1; + $t_data[$v++] = $lp; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['description']); + $t_data[$v++] = $item['prodid']; + $t_data[$v++] = $item['content']; + $t_data[$v++] = sprintf('%.2f',$item['count']); + $item['pdiscount'] = floatval($item['pdiscount']); + $item['vdiscount'] = floatval($item['vdiscount']); + if (!empty($item['pdiscount'])) + $t_data[$v++] = sprintf('%.2f %%', $item['pdiscount']); + elseif (!empty($item['vdiscount'])) + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + + $lp++; + $y = invoice_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + } + + $x = $x + (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount']) ? 7 : 6) * 2 * $margin + $t_width[1] + $t_width[2] + $t_width[3] + + $t_width[4] + $t_width[5] + $t_width[6] + (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount']) ? $t_width[7] : 0); + + $fy=$y-$margin-$pdf->GetFontHeight($font_size); + text_align_right($x - $margin, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Total:')).''); + + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['invoice']['totalbase'])); + $t_data[$v++] = "x"; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['invoice']['totaltax'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['invoice']['total'])); + + $y = invoice_short_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + $y -= 5; + + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + text_align_right($x - $margin, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('in it:')).''); + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $pdf->line($x, $y, $x + $t_width[$v++] + $t_width[$v++] + $t_width[$v++] + $t_width[$v++] + 8 * $margin, $y); + + if ($invoice['invoice']['taxest']) + foreach ($invoice['invoice']['taxest'] as $item) + { + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['base'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['tax'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + $y = invoice_short_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + } + + $x = $xx; + if ($invoice['reason'] != '') + { + $y = $y - text_align_left($x, $y - 10, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Reason:').' '.$invoice['reason']).''); + $y -= 10; + } + $y = $y - text_align_left($x, $y - 10, $font_size, ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Corrected to:')).''); + $y -= 5; + $pdf->line($x, $y, $x + $width, $y); } - $y = $y-text_align_left($x,$y-10,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Corrected to:')).''); - $y -= 5; - $pdf->line($x,$y,$x+$width,$y); - } - - $lp = 1; - if($invoice['content']) foreach ($invoice['content'] as $item) - { - $v = 1; - $t_data[$v++] = $lp; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description']); - $t_data[$v++] = $item['prodid']; - $t_data[$v++] = $item['content']; - $t_data[$v++] = sprintf('%.2f',$item['count']); - if($invoice['discount']) - $t_data[$v++] = sprintf('%.2f%%',$item['discount']); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - - $lp++; - $y = invoice_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - } - - $return[1] = $y; - - $x = $x + ($invoice['discount'] ? 7 : 6)*2*$margin + $t_width[1] + $t_width[2] + $t_width[3] + $t_width[4] + $t_width[5] + $t_width[6] + ($invoice['discount'] ? $t_width[7] : 0); - $fy=$y-$margin-$pdf->GetFontHeight($font_size); - text_align_right($x-$margin,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Total:')).''); - - $v = $invoice['discount'] ? 8 : 7; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['totalbase'])); - $t_data[$v++] = "x"; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['totaltax'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['total'])); + $lp = 1; + if ($invoice['content']) + foreach ($invoice['content'] as $item) + { + $v = 1; + $t_data[$v++] = $lp; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT",$item['description']); + $t_data[$v++] = $item['prodid']; + $t_data[$v++] = $item['content']; + $t_data[$v++] = sprintf('%.2f',$item['count']); + $item['pdiscount'] = floatval($item['pdiscount']); + $item['vdiscount'] = floatval($item['vdiscount']); + if (!empty($item['pdiscount'])) + $t_data[$v++] = sprintf('%.2f %%',$item['pdiscount']); + elseif (!empty($item['vdiscount'])) + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + + $lp++; + $y = invoice_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + } - $y = invoice_short_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - - $y = $y - 5; + $return[1] = $y; - $fy=$y-$margin-$pdf->GetFontHeight($font_size); - text_align_right($x-$margin,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('in it:')).''); - $v = $invoice['discount'] ? 8 : 7; - $pdf->line($x,$y,$x+$t_width[$v++]+$t_width[$v++]+$t_width[$v++]+$t_width[$v++]+8*$margin,$y); - - if ($invoice['taxest']) foreach ($invoice['taxest'] as $item) - { - $v = $invoice['discount'] ? 8 : 7; - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['base'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['tax'])); - $t_data[$v++] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - $y = invoice_short_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - } + $x = $x + (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount']) ? 7 : 6) * 2 * $margin + $t_width[1] + $t_width[2] + $t_width[3] + + $t_width[4] + $t_width[5] + $t_width[6] + (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount']) ? $t_width[7] : 0); - if(isset($invoice['invoice'])) - { - $total = $invoice['total'] - $invoice['invoice']['total']; - $totalbase = $invoice['totalbase'] - $invoice['invoice']['totalbase']; - $totaltax = $invoice['totaltax'] - $invoice['invoice']['totaltax']; - - $y = $y - 5; - $fy=$y-$margin-$pdf->GetFontHeight($font_size); - $v = $invoice['discount'] ? 8 : 7; - $pdf->line($x,$y,$x+$t_width[$v++]+$t_width[$v++]+$t_width[$v++]+$t_width[$v++]+8*$margin,$y); - text_align_right($x-$margin,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT", trans('Difference value:')).''); - - $v = $invoice['discount'] ? 8 : 7; - $t_data[$v++] = ($totalbase>0 ? '+' : '') . iconv("UTF-8","ISO-8859-2//TRANSLIT", moneyf($totalbase)); - $t_data[$v++] = "x"; - $t_data[$v++] = ($totaltax>0 ? '+' : '') . iconv("UTF-8","ISO-8859-2//TRANSLIT", moneyf($totaltax)); - $t_data[$v++] = ($total>0 ? '+' : '') . iconv("UTF-8","ISO-8859-2//TRANSLIT", moneyf($total)); + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + text_align_right($x - $margin, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Total:')).''); - $y = invoice_short_data_row($x,$y,$width,$font_size,$margin,$t_data,$t_width,$t_justify); - } - - $return[2] = $y; + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['totalbase'])); + $t_data[$v++] = "x"; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['totaltax'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['total'])); - return $return; -} + $y = invoice_short_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); -function new_invoice_data($x,$y,$width,$font_size,$margin) -{ - global $invoice, $pdf; + $y = $y - 5; - $pdf->setlinestyle(0.5); - $data = array(); - $cols = array(); - $params = array( - 'fontSize' => $font_size, - 'xPos' => $x, - 'xOrientation' => 'right', // I think it should be left here (bug?) - 'rowGap' => 2, - 'colGap' => 2, - 'showHeadings' => 0, - 'cols' => array(), - ); - - // tabelka glowna - $cols['no'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('No.')).''; - $cols['name'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Name of Product, Commodity or Service:')).''; - $cols['prodid'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Product ID:')).''; - $cols['content'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Unit:')).''; - $cols['count'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Amount:')).''; - if($invoice['discount']) - $cols['discount'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Discount:')).''; - $cols['basevalue'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Unitary Net Value:')).''; - $cols['totalbase'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Net Value:')).''; - $cols['taxlabel'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Tax Rate:')).''; - $cols['totaltax'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Tax Value:')).''; - $cols['total'] = ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Gross Value:')).''; + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + text_align_right($x - $margin, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('in it:')).''); + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $pdf->line($x, $y, $x + $t_width[$v++] + $t_width[$v++] + $t_width[$v++] + $t_width[$v++] + 8 * $margin, $y); + + if ($invoice['taxest']) + foreach ($invoice['taxest'] as $item) + { + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['base'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['tax'])); + $t_data[$v++] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + $y = invoice_short_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + } - foreach($cols as $name => $text) - { - $params['cols'][$name] = array( - 'justification' => 'center', - 'width' => getWrapTextWidth($font_size,$text)+2*$margin+2, - ); - } - - // tutaj jeszcze trzeba będzie sprawdzić jaką szerokość mają pola w tabelce później - if ($invoice['content']) foreach ($invoice['content'] as $item) - { - $tt_width['name'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description'])); - $tt_width['prodid'] = $pdf->getTextWidth($font_size,$item['prodid']); - $tt_width['content'] = $pdf->getTextWidth($font_size,$item['content']); - $tt_width['count'] = $pdf->getTextWidth($font_size,sprintf('%.2f',$item['count'])); - if($invoice['discount']) - $tt_width['discount'] = $pdf->getTextWidth($font_size,sprintf('%.2f%%',$item['discount'])); - $tt_width['basevalue'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])))+6; - $tt_width['totalbase'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])))+6; - $tt_width['taxlabel'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']))+6; - $tt_width['totaltax'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])))+6; - $tt_width['total'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])))+6; - - foreach($tt_width as $name => $w) - if(($w+2*$margin+2) > $params['cols'][$name]['width']) - $params['cols'][$name]['width'] = $w+2*$margin+2; - } - - if(isset($invoice['invoice']['content'])) foreach ($invoice['invoice']['content'] as $item) - { - $tt_width['name'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description'])); - $tt_width['prodid'] = $pdf->getTextWidth($font_size,$item['prodid']); - $tt_width['content'] = $pdf->getTextWidth($font_size,$item['content']); - $tt_width['count'] = $pdf->getTextWidth($font_size,sprintf('%.2f',$item['count'])); - if($invoice['discount']) - $tt_width['discount'] = $pdf->getTextWidth($font_size,sprintf('%.2f%%',$item['discount'])); - $tt_width['basevalue'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])))+6; - $tt_width['totalbase'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])))+6; - $tt_width['taxlabel'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']))+6; - $tt_width['totaltax'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])))+6; - $tt_width['total'] = $pdf->getTextWidth($font_size,iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])))+6; - - foreach($tt_width as $name => $w) - if(($w+2*$margin+2) > $params['cols'][$name]['width']) - $params['cols'][$name]['width'] = $w+2*$margin+2; - } + if (isset($invoice['invoice'])) + { + $total = $invoice['total'] - $invoice['invoice']['total']; + $totalbase = $invoice['totalbase'] - $invoice['invoice']['totalbase']; + $totaltax = $invoice['totaltax'] - $invoice['invoice']['totaltax']; + + $y = $y - 5; + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $pdf->line($x, $y, $x + $t_width[$v++] + $t_width[$v++] + $t_width[$v++] + $t_width[$v++] + 8 * $margin, $y); + text_align_right($x - $margin, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Difference value:')).''); + + $v = (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) ? 8 : 7; + $t_data[$v++] = ($totalbase > 0 ? '+' : '').iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($totalbase)); + $t_data[$v++] = "x"; + $t_data[$v++] = ($totaltax > 0 ? '+' : '').iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($totaltax)); + $t_data[$v++] = ($total > 0 ? '+' : '').iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($total)); - // Kolumna 'name' bedzie miala rozmiar ustalany dynamicznie - $sum = 0; - foreach($params['cols'] as $name => $col) - if($name != 'name') - $sum += $col['width']; - $params['cols']['name']['width'] = $width - $sum; - - // table header - $pdf->ezSetY($y); - $data = array(0=>$cols); - $y = $pdf->ezTable($data, $cols,'', $params); - $data = array(); + $y = invoice_short_data_row($x, $y, $width, $font_size, $margin, $t_data, $t_width, $t_justify); + } - foreach($cols as $name => $text) - { - switch($name) - { - case 'no': $params['cols'][$name]['justification'] = 'center'; break; - case 'name': $params['cols'][$name]['justification'] = 'left'; break; - default: $params['cols'][$name]['justification'] = 'right'; break; - } - } + $return[2] = $y; - // size of taxes summary table - $xx = $x; - foreach($params['cols'] as $name => $value) - if(in_array($name, array('no','name','prodid','content','count','discount','basevalue'))) - { - $xx += $params['cols'][$name]['width']; - } - else - $cols2[$name] = $params['cols'][$name]; - - $data2 = array(); - $params2 = array( - 'fontSize' => $font_size, - 'xPos' => $xx, - 'xOrientation' => 'right', - 'rowGap' => 2, - 'colGap' => 2, - 'showHeadings' => 0, - 'cols' => $cols2, - ); + return $return; +} - if(isset($invoice['invoice'])) - { - // we have credit note, so first print corrected invoice data +function new_invoice_data($x, $y, $width, $font_size, $margin) +{ + global $invoice, $pdf; - $y -= 20; - check_page_length($y); - $y = $y-text_align_left($x,$y,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Was:')).''); + $pdf->setlinestyle(0.5); + $data = array(); + $cols = array(); + $params = array( + 'fontSize' => $font_size, + 'xPos' => $x, + 'xOrientation' => 'right', // I think it should be left here (bug?) + 'rowGap' => 2, + 'colGap' => 2, + 'showHeadings' => 0, + 'cols' => array(), + ); + + // tabelka glowna + $cols['no'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('No.')).''; + $cols['name'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Name of Product, Commodity or Service:')).''; + $cols['prodid'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Product ID:')).''; + $cols['content'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Unit:')).''; + $cols['count'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Amount:')).''; + if (!empty($invoice['pdiscount']) || !empty($invoice['vdiscount'])) + $cols['discount'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Discount:')).''; + $cols['basevalue'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Unitary Net Value:')).''; + $cols['totalbase'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Net Value:')).''; + $cols['taxlabel'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Tax Rate:')).''; + $cols['totaltax'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Tax Value:')).''; + $cols['total'] = ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Gross Value:')).''; - $i = 0; - if ($invoice['invoice']['content']) - foreach ($invoice['invoice']['content'] as $item) - { - $data[$i]['no'] = $i+1; - $data[$i]['name'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description']); - $data[$i]['prodid'] = $item['prodid']; - $data[$i]['content'] = $item['content']; - $data[$i]['count'] = sprintf('%.2f',$item['count']); - if($invoice['discount']) - $data[$i]['discount'] = sprintf('%.2f%%',$item['discount']); - $data[$i]['basevalue'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])); - $data[$i]['totalbase'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])); - $data[$i]['taxlabel'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $data[$i]['totaltax'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])); - $data[$i]['total'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - - $i++; - } + foreach($cols as $name => $text) + { + $params['cols'][$name] = array( + 'justification' => 'center', + 'width' => getWrapTextWidth($font_size, $text) + 2 * $margin + 2, + ); + } + // tutaj jeszcze trzeba będzie sprawdzić jaką szerokość mają pola w tabelce później + if ($invoice['content']) + foreach ($invoice['content'] as $item) + { + $tt_width['name'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['description'])); + $tt_width['prodid'] = $pdf->getTextWidth($font_size, $item['prodid']); + $tt_width['content'] = $pdf->getTextWidth($font_size, $item['content']); + $tt_width['count'] = $pdf->getTextWidth($font_size, sprintf('%.2f',$item['count'])); + if (!empty($invoice['pdiscount'])) + $tt_width['discount'] = $pdf->getTextWidth($font_size, sprintf('%.2f %%', $item['pdiscount'])); + if (!empty($invoice['vdiscount'])) + { + $tmp_width = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount']))); + if ($tmp_width > $tt_width['discount']) + $tt_width['discount'] = $tmp_width; + } + $tt_width['basevalue'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue']))) + 6; + $tt_width['totalbase'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase']))) + 6; + $tt_width['taxlabel'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel'])) + 6; + $tt_width['totaltax'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax']))) + 6; + $tt_width['total'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total']))) + 6; + + foreach($tt_width as $name => $w) + if (($w + 2 * $margin + 2) > $params['cols'][$name]['width']) + $params['cols'][$name]['width'] = $w + 2 * $margin + 2; + } + + if (isset($invoice['invoice']['content'])) + foreach ($invoice['invoice']['content'] as $item) + { + $tt_width['name'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['description'])); + $tt_width['prodid'] = $pdf->getTextWidth($font_size, $item['prodid']); + $tt_width['content'] = $pdf->getTextWidth($font_size, $item['content']); + $tt_width['count'] = $pdf->getTextWidth($font_size, sprintf('%.2f', $item['count'])); + if (!empty($invoice['pdiscount'])) + $tt_width['discount'] = $pdf->getTextWidth($font_size, sprintf('%.2f %%', $item['pdiscount'])); + if (!empty($invoice['vdiscount'])) + { + $tmp_width = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount']))); + if ($tmp_width > $tt_width['discount']) + $tt_width['discount'] = $tmp_width; + } + $tt_width['basevalue'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue']))) + 6; + $tt_width['totalbase'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase']))) + 6; + $tt_width['taxlabel'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel'])) + 6; + $tt_width['totaltax'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax']))) + 6; + $tt_width['total'] = $pdf->getTextWidth($font_size, iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total']))) + 6; + + foreach($tt_width as $name => $w) + if(($w + 2 * $margin + 2) > $params['cols'][$name]['width']) + $params['cols'][$name]['width'] = $w + 2 * $margin + 2; + } + + // Kolumna 'name' bedzie miala rozmiar ustalany dynamicznie + $sum = 0; + foreach($params['cols'] as $name => $col) + if ($name != 'name') + $sum += $col['width']; + $params['cols']['name']['width'] = $width - $sum; + + // table header $pdf->ezSetY($y); - $y = $pdf->ezTable($data, $cols,'', $params); + $data = array(0=>$cols); + $y = $pdf->ezTable($data, $cols, '', $params); $data = array(); - $y -= 10; - check_page_length($y); - - $data2[0]['totalbase'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['invoice']['totalbase'])); - $data2[0]['taxlabel'] = "x"; - $data2[0]['totaltax'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['invoice']['totaltax'])); - $data2[0]['total'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['invoice']['total'])); + foreach($cols as $name => $text) + { + switch($name) + { + case 'no': $params['cols'][$name]['justification'] = 'center'; break; + case 'name': $params['cols'][$name]['justification'] = 'left'; break; + default: $params['cols'][$name]['justification'] = 'right'; break; + } + } + + // size of taxes summary table + $xx = $x; + foreach($params['cols'] as $name => $value) + if (in_array($name, array('no', 'name', 'prodid', 'content', 'count', 'discount', 'basevalue'))) + $xx += $params['cols'][$name]['width']; + else + $cols2[$name] = $params['cols'][$name]; - $pdf->ezSetY($y); - $y = $pdf->ezTable($data2, NULL,'', $params2); $data2 = array(); + $params2 = array( + 'fontSize' => $font_size, + 'xPos' => $xx, + 'xOrientation' => 'right', + 'rowGap' => 2, + 'colGap' => 2, + 'showHeadings' => 0, + 'cols' => $cols2, + ); - $fy = $y + $pdf->GetFontHeight($font_size)/2; - text_align_right($xx-5, $fy, $font_size, ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Total:')).''); - - check_page_length($y); - $fy = $y - $margin - $pdf->GetFontHeight($font_size); - text_align_right($xx-5,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('in it:')).''); - - if ($invoice['invoice']['taxest']) + if (isset($invoice['invoice'])) { - $i = 0; - foreach ($invoice['invoice']['taxest'] as $item) - { - $data2[$i]['totalbase'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['base'])); - $data2[$i]['taxlabel'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $data2[$i]['totaltax'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['tax'])); - $data2[$i]['total'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - $i++; - } - $pdf->ezSetY($y); - $y = $pdf->ezTable($data2, NULL,'', $params2); - $data2 = array(); - } + // we have credit note, so first print corrected invoice data - $y -= 20; - if($invoice['reason'] != '') - { + $y -= 20; check_page_length($y); - $y = text_wrap($x,$y,$width,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Reason:').' '.$invoice['reason']).'','left'); + $y = $y - text_align_left($x, $y, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Was:')).''); + + $i = 0; + if ($invoice['invoice']['content']) + foreach ($invoice['invoice']['content'] as $item) + { + $data[$i]['no'] = $i + 1; + $data[$i]['name'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['description']); + $data[$i]['prodid'] = $item['prodid']; + $data[$i]['content'] = $item['content']; + $data[$i]['count'] = sprintf('%.2f', $item['count']); + $item['pdiscount'] = floatval($item['pdiscount']); + $item['vdiscount'] = floatval($item['vdiscount']); + if (!empty($item['pdiscount'])) + $data[$i]['discount'] = sprintf('%.2f %%', $item['pdiscount']); + elseif (!empty($item['vdiscount'])) + $data[$i]['discount'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount'])); + $data[$i]['basevalue'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue'])); + $data[$i]['totalbase'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase'])); + $data[$i]['taxlabel'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $data[$i]['totaltax'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax'])); + $data[$i]['total'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + + $i++; + } + + $pdf->ezSetY($y); + $y = $pdf->ezTable($data, $cols, '', $params); + $data = array(); + $y -= 10; - } - check_page_length($y); - $y = $y-text_align_left($x,$y,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Corrected to:')).''); - } - - // pozycje faktury - $i = 0; - if(isset($invoice['content'])) foreach ($invoice['content'] as $item) - { - $data[$i]['no'] = $i+1; - $data[$i]['name'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['description']); - $data[$i]['prodid'] = $item['prodid']; - $data[$i]['content'] = $item['content']; - $data[$i]['count'] = sprintf('%.2f',$item['count']); - if($invoice['discount']) - $data[$i]['discount'] = sprintf('%.2f%%',$item['discount']); - $data[$i]['basevalue'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['basevalue'])); - $data[$i]['totalbase'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totalbase'])); - $data[$i]['taxlabel'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $data[$i]['totaltax'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['totaltax'])); - $data[$i]['total'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - - $i++; - } + check_page_length($y); - $pdf->ezSetY($y); - $y = $pdf->ezTable($data, $cols,'', $params); + $data2[0]['totalbase'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['invoice']['totalbase'])); + $data2[0]['taxlabel'] = "x"; + $data2[0]['totaltax'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['invoice']['totaltax'])); + $data2[0]['total'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['invoice']['total'])); + + $pdf->ezSetY($y); + $y = $pdf->ezTable($data2, NULL, '', $params2); + $data2 = array(); - $y -= 10; - check_page_length($y); + $fy = $y + $pdf->GetFontHeight($font_size) / 2; + text_align_right($xx - 5, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Total:')).''); - // podsumowanie podatku - $data2[0]['totalbase'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['totalbase'])); - $data2[0]['taxlabel'] = "x"; - $data2[0]['totaltax'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['totaltax'])); - $data2[0]['total'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($invoice['total'])); - - $pdf->ezSetY($y); - $y = $pdf->ezTable($data2, NULL,'', $params2); - $data2 = array(); + check_page_length($y); + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + text_align_right($xx - 5,$fy, $font_size,''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('in it:')).''); - $fy = $y + $pdf->GetFontHeight($font_size)/2; - text_align_right($xx-5, $fy, $font_size, ''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('Total:')).''); + if ($invoice['invoice']['taxest']) + { + $i = 0; + foreach ($invoice['invoice']['taxest'] as $item) + { + $data2[$i]['totalbase'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['base'])); + $data2[$i]['taxlabel'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $data2[$i]['totaltax'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['tax'])); + $data2[$i]['total'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + $i++; + } + $pdf->ezSetY($y); + $y = $pdf->ezTable($data2, NULL, '', $params2); + $data2 = array(); + } + + $y -= 20; + if ($invoice['reason'] != '') + { + check_page_length($y); + $y = text_wrap($x, $y, $width, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Reason:').' '.$invoice['reason']).'', 'left'); + $y -= 10; + } + check_page_length($y); + $y = $y-text_align_left($x, $y, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Corrected to:')).''); + } - $return[1] = $y; - - check_page_length($y); - $fy = $y - $margin - $pdf->GetFontHeight($font_size); - text_align_right($xx-5,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT",trans('in it:')).''); - - if(isset($invoice['taxest'])) - { + // pozycje faktury $i = 0; - foreach ($invoice['taxest'] as $item) - { - $data2[$i]['totalbase'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['base'])); - $data2[$i]['taxlabel'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",$item['taxlabel']); - $data2[$i]['totaltax'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['tax'])); - $data2[$i]['total'] = iconv("UTF-8","ISO-8859-2//TRANSLIT",moneyf($item['total'])); - $i++; - } + if (isset($invoice['content'])) + foreach ($invoice['content'] as $item) + { + $data[$i]['no'] = $i + 1; + $data[$i]['name'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['description']); + $data[$i]['prodid'] = $item['prodid']; + $data[$i]['content'] = $item['content']; + $data[$i]['count'] = sprintf('%.2f', $item['count']); + $item['pdiscount'] = floatval($item['pdiscount']); + $item['vdiscount'] = floatval($item['vdiscount']); + if (!empty($item['pdiscount'])) + $data[$i]['discount'] = sprintf('%.2f %%', $item['pdiscount']); + elseif (!empty($item['vdiscount'])) + $data[$i]['discount'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['vdiscount'])); + $data[$i]['basevalue'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['basevalue'])); + $data[$i]['totalbase'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totalbase'])); + $data[$i]['taxlabel'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $data[$i]['totaltax'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['totaltax'])); + $data[$i]['total'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + + $i++; + } + $pdf->ezSetY($y); - $y = $pdf->ezTable($data2, NULL,'', $params2); - $data2 = array(); - } + $y = $pdf->ezTable($data, $cols, '', $params); - if(isset($invoice['invoice'])) - { - $total = $invoice['total'] - $invoice['invoice']['total']; - $totalbase = $invoice['totalbase'] - $invoice['invoice']['totalbase']; - $totaltax = $invoice['totaltax'] - $invoice['invoice']['totaltax']; - $y -= 10; - $fy = $y - $margin - $pdf->GetFontHeight($font_size); - text_align_right($xx-5,$fy,$font_size,''.iconv("UTF-8","ISO-8859-2//TRANSLIT", trans('Difference value:')).''); - - $data2[0]['totalbase'] = ($totalbase>0 ? '+' : '') . iconv("UTF-8","ISO-8859-2//TRANSLIT", moneyf($totalbase)); - $data2[0]['taxlabel'] = "x"; - $data2[0]['totaltax'] = ($totaltax>0 ? '+' : '') . iconv("UTF-8","ISO-8859-2//TRANSLIT", moneyf($totaltax)); - $data2[0]['total'] = ($total>0 ? '+' : '') . iconv("UTF-8","ISO-8859-2//TRANSLIT", moneyf($total)); - + check_page_length($y); + + // podsumowanie podatku + $data2[0]['totalbase'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['totalbase'])); + $data2[0]['taxlabel'] = "x"; + $data2[0]['totaltax'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['totaltax'])); + $data2[0]['total'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($invoice['total'])); + $pdf->ezSetY($y); - $y = $pdf->ezTable($data2, NULL,'', $params2); + $y = $pdf->ezTable($data2, NULL, '', $params2); $data2 = array(); - } - - $return[2] = $y; - return $return; + $fy = $y + $pdf->GetFontHeight($font_size) / 2; + text_align_right($xx - 5, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Total:')).''); + + $return[1] = $y; + + check_page_length($y); + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + text_align_right($xx - 5, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('in it:')).''); + + if (isset($invoice['taxest'])) + { + $i = 0; + foreach ($invoice['taxest'] as $item) + { + $data2[$i]['totalbase'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['base'])); + $data2[$i]['taxlabel'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", $item['taxlabel']); + $data2[$i]['totaltax'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['tax'])); + $data2[$i]['total'] = iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($item['total'])); + $i++; + } + $pdf->ezSetY($y); + $y = $pdf->ezTable($data2, NULL, '', $params2); + $data2 = array(); + } + + if(isset($invoice['invoice'])) + { + $total = $invoice['total'] - $invoice['invoice']['total']; + $totalbase = $invoice['totalbase'] - $invoice['invoice']['totalbase']; + $totaltax = $invoice['totaltax'] - $invoice['invoice']['totaltax']; + + $y -= 10; + $fy = $y - $margin - $pdf->GetFontHeight($font_size); + text_align_right($xx - 5, $fy, $font_size, ''.iconv("UTF-8", "ISO-8859-2//TRANSLIT", trans('Difference value:')).''); + + $data2[0]['totalbase'] = ($totalbase>0 ? '+' : '').iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($totalbase)); + $data2[0]['taxlabel'] = "x"; + $data2[0]['totaltax'] = ($totaltax>0 ? '+' : '').iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($totaltax)); + $data2[0]['total'] = ($total>0 ? '+' : '').iconv("UTF-8", "ISO-8859-2//TRANSLIT", moneyf($total)); + + $pdf->ezSetY($y); + $y = $pdf->ezTable($data2, NULL, '', $params2); + $data2 = array(); + } + + $return[2] = $y; + + return $return; } function invoice_to_pay($x,$y) Index: lms/modules/invoiceedit.php diff -u lms/modules/invoiceedit.php:1.40 lms/modules/invoiceedit.php:1.41 --- lms/modules/invoiceedit.php:1.40 Fri Oct 14 18:08:59 2011 +++ lms/modules/invoiceedit.php Thu Dec 1 18:10:46 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: invoiceedit.php,v 1.40 2011/10/14 16:08:59 chilek Exp $ + * $Id: invoiceedit.php,v 1.41 2011/12/01 17:10:46 chilek Exp $ */ $taxeslist = $LMS->GetTaxes(); @@ -41,7 +41,9 @@ $nitem['name'] = $item['description']; $nitem['prodid'] = $item['prodid']; $nitem['count'] = str_replace(',' ,'.', $item['count']); - $nitem['discount'] = str_replace(',' ,'.', $item['discount']); + $nitem['discount'] = str_replace(',' ,'.', $item['pdiscount']); + $nitem['pdiscount'] = str_replace(',' ,'.', $item['pdiscount']); + $nitem['vdiscount'] = str_replace(',' ,'.', $item['vdiscount']); $nitem['jm'] = str_replace(',' ,'.', $item['content']); $nitem['valuenetto'] = str_replace(',' ,'.', $item['basevalue']); $nitem['valuebrutto'] = str_replace(',' ,'.', $item['value']); @@ -76,34 +78,50 @@ switch($action) { case 'additem': - if ($invoice['closed']) - break; + if ($invoice['closed']) + break; $itemdata = r_trim($_POST); + + unset($error); + + $itemdata['discount'] = str_replace(',', '.', $itemdata['discount']); + $itemdata['pdiscount'] = 0; + $itemdata['vdiscount'] = 0; + if (preg_match('/^[0-9]+(\.[0-9]+)*$/', $itemdata['discount'])) { + $itemdata['pdiscount'] = ($itemdata['discount_type'] == DISCOUNT_PERCENTAGE ? floatval($itemdata['discount']) : 0); + $itemdata['vdiscount'] = ($itemdata['discount_type'] == DISCOUNT_AMOUNT ? floatval($itemdata['discount']) : 0); + } + if ($itemdata['pdiscount'] < 0 || $itemdata['pdiscount'] > 99.9 || $itemdata['vdiscount'] < 0) + $error['discount'] = trans('Wrong discount value!'); + + if ($error) + break; + foreach(array('count', 'discount', 'valuenetto', 'valuebrutto') as $key) - $itemdata[$key] = round((float) str_replace(',','.',$itemdata[$key]),2); + $itemdata[$key] = round((float) str_replace(',', '.', $itemdata[$key]), 2); - if($itemdata['count'] > 0 && $itemdata['name'] != '') + if ($itemdata['count'] > 0 && $itemdata['name'] != '') { $taxvalue = $taxeslist[$itemdata['taxid']]['value']; - if($itemdata['valuenetto'] != 0) + if ($itemdata['valuenetto'] != 0) { - $itemdata['valuenetto'] = f_round($itemdata['valuenetto'] - $itemdata['valuenetto'] * f_round($itemdata['discount'])/100); - $itemdata['valuebrutto'] = round($itemdata['valuenetto'] * ($taxvalue / 100 + 1),2); + $itemdata['valuenetto'] = f_round(($itemdata['valuenetto'] - $itemdata['valuenetto'] * f_round($itemdata['pdiscount']) / 100) - $itemdata['vdiscount']); + $itemdata['valuebrutto'] = round($itemdata['valuenetto'] * ($taxvalue / 100 + 1), 2); } - elseif($itemdata['valuebrutto'] != 0) + elseif ($itemdata['valuebrutto'] != 0) { - $itemdata['valuebrutto'] = f_round($itemdata['valuebrutto'] - $itemdata['valuebrutto'] * f_round($itemdata['discount'])/100); - $itemdata['valuenetto'] = round($itemdata['valuebrutto'] / ($taxvalue / 100 + 1),2); + $itemdata['valuebrutto'] = f_round(($itemdata['valuebrutto'] - $itemdata['valuebrutto'] * $itemdata['pdiscount'] / 100) - $itemdata['vdiscount']); + $itemdata['valuenetto'] = round($itemdata['valuebrutto'] / ($taxvalue / 100 + 1), 2); } // str_replace here is needed because of bug in some PHP versions (4.3.10) - $itemdata['s_valuebrutto'] = str_replace(',','.',$itemdata['valuebrutto'] * $itemdata['count']); - $itemdata['s_valuenetto'] = str_replace(',','.',$itemdata['s_valuebrutto'] / ($taxvalue / 100 + 1)); - $itemdata['valuenetto'] = str_replace(',','.',$itemdata['valuenetto']); - $itemdata['valuebrutto'] = str_replace(',','.',$itemdata['valuebrutto']); - $itemdata['count'] = str_replace(',','.',$itemdata['count']); - $itemdata['discount'] = str_replace(',','.',$itemdata['discount']); + $itemdata['s_valuebrutto'] = str_replace(',', '.', $itemdata['valuebrutto'] * $itemdata['count']); + $itemdata['s_valuenetto'] = str_replace(',', '.', $itemdata['s_valuebrutto'] / ($taxvalue / 100 + 1)); + $itemdata['valuenetto'] = str_replace(',', '.', $itemdata['valuenetto']); + $itemdata['valuebrutto'] = str_replace(',', '.', $itemdata['valuebrutto']); + $itemdata['count'] = str_replace(',', '.', $itemdata['count']); + $itemdata['discount'] = str_replace(',', '.', $itemdata['discount']); $itemdata['tax'] = $taxeslist[$itemdata['taxid']]['label']; $itemdata['posuid'] = (string) getmicrotime(); $contents[] = $itemdata; @@ -111,12 +129,12 @@ break; case 'deletepos': - if ($invoice['closed']) - break; + if ($invoice['closed']) + break; - if(sizeof($contents)) + if (sizeof($contents)) foreach($contents as $idx => $row) - if($row['posuid'] == $_GET['posuid']) + if ($row['posuid'] == $_GET['posuid']) unset($contents[$idx]); break; @@ -192,19 +210,19 @@ case 'save': if (empty($contents) || empty($customer)) - break; + break; $SESSION->restore('invoiceid', $invoice['id']); $invoice['type'] = DOC_INVOICE; - $currtime = time(); - $cdate = $invoice['cdate'] ? $invoice['cdate'] : $currtime; - $sdate = $invoice['sdate'] ? $invoice['sdate'] : $currtime; - $iid = $invoice['id']; + $currtime = time(); + $cdate = $invoice['cdate'] ? $invoice['cdate'] : $currtime; + $sdate = $invoice['sdate'] ? $invoice['sdate'] : $currtime; + $iid = $invoice['id']; - $DB->BeginTrans(); + $DB->BeginTrans(); - $DB->Execute('UPDATE documents SET cdate = ?, sdate = ?, paytime = ?, paytype = ?, customerid = ?, + $DB->Execute('UPDATE documents SET cdate = ?, sdate = ?, paytime = ?, paytype = ?, customerid = ?, name = ?, address = ?, ten = ?, ssn = ?, zip = ?, city = ?, divisionid = ? WHERE id = ?', array($cdate, @@ -222,48 +240,49 @@ $iid )); - if (!$invoice['closed']) { - $DB->Execute('DELETE FROM invoicecontents WHERE docid = ?', array($iid)); - $DB->Execute('DELETE FROM cash WHERE docid = ?', array($iid)); - - $itemid=0; - foreach ($contents as $idx => $item) { - $itemid++; - - $DB->Execute('INSERT INTO invoicecontents (docid, itemid, value, - taxid, prodid, content, count, discount, description, tariffid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', - array( - $iid, - $itemid, - $item['valuebrutto'], - $item['taxid'], - $item['prodid'], - $item['jm'], - $item['count'], - $item['discount'], - $item['name'], - $item['tariffid'] - )); - - $LMS->AddBalance(array( - 'time' => $cdate, - 'value' => $item['valuebrutto']*$item['count']*-1, - 'taxid' => $item['taxid'], - 'customerid' => $customer['id'], - 'comment' => $item['name'], - 'docid' => $iid, - 'itemid' => $itemid - )); - } - } + if (!$invoice['closed']) { + $DB->Execute('DELETE FROM invoicecontents WHERE docid = ?', array($iid)); + $DB->Execute('DELETE FROM cash WHERE docid = ?', array($iid)); + + $itemid=0; + foreach ($contents as $idx => $item) { + $itemid++; + + $DB->Execute('INSERT INTO invoicecontents (docid, itemid, value, + taxid, prodid, content, count, pdiscount, vdiscount, description, tariffid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + array( + $iid, + $itemid, + $item['valuebrutto'], + $item['taxid'], + $item['prodid'], + $item['jm'], + $item['count'], + $item['pdiscount'], + $item['vdiscount'], + $item['name'], + $item['tariffid'] + )); + + $LMS->AddBalance(array( + 'time' => $cdate, + 'value' => $item['valuebrutto']*$item['count']*-1, + 'taxid' => $item['taxid'], + 'customerid' => $customer['id'], + 'comment' => $item['name'], + 'docid' => $iid, + 'itemid' => $itemid + )); + } + } - $DB->CommitTrans(); + $DB->CommitTrans(); if (isset($_GET['print'])) $SESSION->save('invoiceprint', array('invoice' => $invoice['id'], 'original' => !empty($_GET['original']) ? 1 : 0, - 'copy' => !empty($_GET['copy']) ? 1 : 0, + 'copy' => !empty($_GET['copy']) ? 1 : 0, 'duplicate' => !empty($_GET['duplicate']) ? 1 : 0)); $SESSION->redirect('?m=invoicelist'); Index: lms/modules/invoicenew.php diff -u lms/modules/invoicenew.php:1.88 lms/modules/invoicenew.php:1.89 --- lms/modules/invoicenew.php:1.88 Fri Oct 14 18:08:59 2011 +++ lms/modules/invoicenew.php Thu Dec 1 18:10:46 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: invoicenew.php,v 1.88 2011/10/14 16:08:59 chilek Exp $ + * $Id: invoicenew.php,v 1.89 2011/12/01 17:10:46 chilek Exp $ */ // Invoiceless liabilities: Zobowiazania/obciazenia na ktore nie zostala wystawiona faktura @@ -86,7 +86,22 @@ case 'additem': - foreach(array('count', 'discount', 'valuenetto', 'valuebrutto') as $key) + unset($error); + + $itemdata['discount'] = str_replace(',', '.', $itemdata['discount']); + $itemdata['pdiscount'] = 0; + $itemdata['vdiscount'] = 0; + if (preg_match('/^[0-9]+(\.[0-9]+)*$/', $itemdata['discount'])) { + $itemdata['pdiscount'] = ($itemdata['discount_type'] == DISCOUNT_PERCENTAGE ? floatval($itemdata['discount']) : 0); + $itemdata['vdiscount'] = ($itemdata['discount_type'] == DISCOUNT_AMOUNT ? floatval($itemdata['discount']) : 0); + } + if ($itemdata['pdiscount'] < 0 || $itemdata['pdiscount'] > 99.9 || $itemdata['vdiscount'] < 0) + $error['discount'] = trans('Wrong discount value!'); + + if ($error) + break; + + foreach(array('count', 'pdiscount', 'vdiscount', 'valuenetto', 'valuebrutto') as $key) $itemdata[$key] = f_round($itemdata[$key]); if($itemdata['count'] > 0 && $itemdata['name'] != '') @@ -94,12 +109,12 @@ $taxvalue = isset($itemdata['taxid']) ? $taxeslist[$itemdata['taxid']]['value'] : 0; if($itemdata['valuenetto'] != 0) { - $itemdata['valuenetto'] = f_round($itemdata['valuenetto'] - $itemdata['valuenetto'] * f_round($itemdata['discount'])/100); + $itemdata['valuenetto'] = f_round(($itemdata['valuenetto'] - $itemdata['valuenetto'] * $itemdata['pdiscount'] / 100) - $itemdata['vdiscount']); $itemdata['valuebrutto'] = round($itemdata['valuenetto'] * ($taxvalue / 100 + 1),2); } elseif($itemdata['valuebrutto'] != 0) { - $itemdata['valuebrutto'] = f_round($itemdata['valuebrutto'] - $itemdata['valuebrutto'] * f_round($itemdata['discount'])/100); + $itemdata['valuebrutto'] = f_round(($itemdata['valuebrutto'] - $itemdata['valuebrutto'] * $itemdata['pdiscount'] / 100) - $itemdata['vdiscount']); $itemdata['valuenetto'] = round($itemdata['valuebrutto'] / ($taxvalue / 100 + 1), 2); } @@ -110,6 +125,8 @@ $itemdata['valuebrutto'] = f_round($itemdata['valuebrutto']); $itemdata['count'] = f_round($itemdata['count']); $itemdata['discount'] = f_round($itemdata['discount']); + $itemdata['pdiscount'] = f_round($itemdata['pdiscount']); + $itemdata['vdiscount'] = f_round($itemdata['vdiscount']); $itemdata['tax'] = isset($itemdata['taxid']) ? $taxeslist[$itemdata['taxid']]['label'] : ''; $itemdata['posuid'] = (string) getmicrotime(); $contents[] = $itemdata; @@ -130,6 +147,8 @@ $itemdata['taxid'] = $cash['taxid']; $itemdata['tax'] = isset($taxeslist[$itemdata['taxid']]) ? $taxeslist[$itemdata['taxid']]['label'] : ''; $itemdata['discount'] = 0; + $itemdata['pdiscount'] = 0; + $itemdata['vdiscount'] = 0; $itemdata['count'] = f_round($_POST['l_count'][$id]); $itemdata['valuebrutto'] = f_round((-$cash['value'])/$itemdata['count']); $itemdata['s_valuebrutto'] = f_round(-$cash['value']); Index: lms/modules/invoicenote.php diff -u lms/modules/invoicenote.php:1.50 lms/modules/invoicenote.php:1.51 --- lms/modules/invoicenote.php:1.50 Thu Nov 24 18:57:09 2011 +++ lms/modules/invoicenote.php Thu Dec 1 18:10:46 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: invoicenote.php,v 1.50 2011/11/24 17:57:09 chilek Exp $ + * $Id: invoicenote.php,v 1.51 2011/12/01 17:10:46 chilek Exp $ */ $taxeslist = $LMS->GetTaxes(); @@ -29,7 +29,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : NULL; -if(isset($_GET['id']) && $action=='init') +if (isset($_GET['id']) && $action == 'init') { $invoice = $LMS->GetInvoiceContent($_GET['id']); @@ -39,7 +39,9 @@ $nitem['name'] = $item['description']; $nitem['prodid'] = $item['prodid']; $nitem['count'] = str_replace(',', '.', $item['count']); - $nitem['discount'] = str_replace(',', '.', $item['discount']); + $nitem['discount'] = str_replace(',', '.', $item['pdiscount']); + $nitem['pdiscount'] = str_replace(',', '.', $item['pdiscount']); + $nitem['vdiscount'] = str_replace(',', '.', $item['vdiscount']); $nitem['jm'] = str_replace(',', '.', $item['content']); $nitem['valuenetto'] = str_replace(',', '.', $item['basevalue']); $nitem['valuebrutto'] = str_replace(',', '.', $item['value']); @@ -85,16 +87,16 @@ switch($action) { case 'deletepos': - if ($invoice['closed']) - break; + if ($invoice['closed']) + break; $contents[$_GET['itemid']]['deleted'] = true; - break; + break; case 'recoverpos': - if ($invoice['closed']) - break; + if ($invoice['closed']) + break; $contents[$_GET['itemid']]['deleted'] = false; - break; + break; case 'setheader': @@ -174,7 +176,7 @@ case 'save': if (empty($contents) || empty($cnote)) - break; + break; $SESSION->restore('invoiceid', $invoice['id']); $newcontents = r_trim($_POST); @@ -185,29 +187,41 @@ $contents[$idx]['prodid'] = isset($newcontents['prodid'][$idx]) ? $newcontents['prodid'][$idx] : $item['prodid']; $contents[$idx]['jm'] = isset($newcontents['jm'][$idx]) ? $newcontents['jm'][$idx] : $item['jm']; $contents[$idx]['count'] = isset($newcontents['count'][$idx]) ? $newcontents['count'][$idx] : $item['count']; - $contents[$idx]['discount'] = isset($newcontents['discount'][$idx]) ? $newcontents['discount'][$idx] : $item['discount']; + + $contents[$idx]['discount'] = str_replace(',', '.', isset($newcontents['discount'][$idx]) ? $newcontents['discount'][$idx] : $item['discount']); + $contents[$idx]['pdiscount'] = 0; + $contents[$idx]['vdiscount'] = 0; + $contents[$idx]['discount_type'] = isset($newcontents['discount_type'][$idx]) ? $newcontents['discount_type'][$idx] : $item['discount_type']; + if (preg_match('/^[0-9]+(\.[0-9]+)*$/', $contents[$idx]['discount'])) { + $contents[$idx]['pdiscount'] = ($contents[$idx]['discount_type'] == DISCOUNT_PERCENTAGE ? floatval($contents[$idx]['discount']) : 0); + $contents[$idx]['vdiscount'] = ($contents[$idx]['discount_type'] == DISCOUNT_AMOUNT ? floatval($contents[$idx]['discount']) : 0); + } + if ($contents[$idx]['pdiscount'] < 0 || $contents[$idx]['pdiscount'] > 99.9 || $contents[$idx]['vdiscount'] < 0) + $error['discount'] = trans('Wrong discount value!'); + $contents[$idx]['name'] = isset($newcontents['name'][$idx]) ? $newcontents['name'][$idx] : $item['name']; $contents[$idx]['tariffid'] = isset($newcontents['tariffid'][$idx]) ? $newcontents['tariffid'][$idx] : $item['tariffid']; - $contents[$idx]['valuebrutto'] = $newcontents['valuebrutto'][$idx]!='' ? $newcontents['valuebrutto'][$idx] : $item['valuebrutto']; - $contents[$idx]['valuenetto'] = $newcontents['valuenetto'][$idx]!='' ? $newcontents['valuenetto'][$idx] : $item['valuenetto']; + $contents[$idx]['valuebrutto'] = $newcontents['valuebrutto'][$idx] != '' ? $newcontents['valuebrutto'][$idx] : $item['valuebrutto']; + $contents[$idx]['valuenetto'] = $newcontents['valuenetto'][$idx] != '' ? $newcontents['valuenetto'][$idx] : $item['valuenetto']; $contents[$idx]['valuebrutto'] = f_round($contents[$idx]['valuebrutto']); $contents[$idx]['valuenetto'] = f_round($contents[$idx]['valuenetto']); $contents[$idx]['count'] = f_round($contents[$idx]['count']); - $contents[$idx]['discount'] = f_round($contents[$idx]['discount']); + $contents[$idx]['pdiscount'] = f_round($contents[$idx]['pdiscount']); + $contents[$idx]['vdiscount'] = f_round($contents[$idx]['vdiscount']); $taxvalue = $taxeslist[$contents[$idx]['taxid']]['value']; - if($contents[$idx]['valuenetto'] != $item['valuenetto']) { + if ($contents[$idx]['valuenetto'] != $item['valuenetto']) { $contents[$idx]['valuebrutto'] = round($contents[$idx]['valuenetto'] * ($taxvalue / 100 + 1),2); } - if(isset($item['deleted']) && $item['deleted']) { + if (isset($item['deleted']) && $item['deleted']) { $contents[$idx]['valuebrutto'] = 0; $contents[$idx]['cash'] = round($item['valuebrutto'] * $item['count'],2); $contents[$idx]['count'] = 0; } - elseif($contents[$idx]['count'] != $item['count'] || - $contents[$idx]['valuebrutto'] != $item['valuebrutto'] - ) { + elseif ($contents[$idx]['count'] != $item['count'] + || $contents[$idx]['valuebrutto'] != $item['valuebrutto']) + { $contents[$idx]['cash'] = round($item['valuebrutto'] * $item['count'],2) - round($contents[$idx]['valuebrutto'] * $contents[$idx]['count'],2); } @@ -221,37 +235,37 @@ if(!isset($cnote['number']) || !$cnote['number']) $cnote['number'] = $LMS->GetNewDocumentNumber(DOC_CNOTE, $cnote['numberplanid'], $cnote['cdate']); else { - if(!preg_match('/^[0-9]+$/', $cnote['number'])) - $error['number'] = trans('Credit note number must be integer!'); - elseif($LMS->DocumentExists($cnote['number'], DOC_CNOTE, $cnote['numberplanid'], $cnote['cdate'])) - $error['number'] = trans('Credit note number $a already exists!', $cnote['number']); + if (!preg_match('/^[0-9]+$/', $cnote['number'])) + $error['number'] = trans('Credit note number must be integer!'); + elseif ($LMS->DocumentExists($cnote['number'], DOC_CNOTE, $cnote['numberplanid'], $cnote['cdate'])) + $error['number'] = trans('Credit note number $a already exists!', $cnote['number']); - if($error) + if ($error) $cnote['number'] = $LMS->GetNewDocumentNumber(DOC_CNOTE, $cnote['numberplanid'], $cnote['cdate']); } $DB->Execute('INSERT INTO documents (number, numberplanid, type, cdate, sdate, paytime, paytype, userid, customerid, name, address, ten, ssn, zip, city, countryid, reference, reason, divisionid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array($cnote['number'], - $cnote['numberplanid'] ? $cnote['numberplanid'] : 0, - DOC_CNOTE, - $cnote['cdate'], - $cnote['sdate'], - $cnote['paytime'], - $cnote['paytype'], - $AUTH->id, - $invoice['customerid'], - $invoice['name'], - $invoice['address'], - $invoice['ten'], - $invoice['ssn'], - $invoice['zip'], - $invoice['city'], - $invoice['countryid'], - $invoice['id'], - $cnote['reason'], - !empty($cnote['use_current_division']) ? $invoice['current_divisionid'] : $invoice['divisionid'], + $cnote['numberplanid'] ? $cnote['numberplanid'] : 0, + DOC_CNOTE, + $cnote['cdate'], + $cnote['sdate'], + $cnote['paytime'], + $cnote['paytype'], + $AUTH->id, + $invoice['customerid'], + $invoice['name'], + $invoice['address'], + $invoice['ten'], + $invoice['ssn'], + $invoice['zip'], + $invoice['city'], + $invoice['countryid'], + $invoice['id'], + $cnote['reason'], + !empty($cnote['use_current_division']) ? $invoice['current_divisionid'] : $invoice['divisionid'], )); $id = $DB->GetOne('SELECT id FROM documents WHERE number = ? AND cdate = ? AND type = ?', @@ -261,35 +275,37 @@ foreach($contents as $idx => $item) { - $item['valuebrutto'] = str_replace(',','.', $item['valuebrutto']); - $item['count'] = str_replace(',','.', $item['count']); - $item['discount'] = str_replace(',','.', $item['discount']); - - $DB->Execute('INSERT INTO invoicecontents (docid, itemid, value, taxid, prodid, content, count, discount, description, tariffid) - VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', - array($id, - $idx, - $item['valuebrutto'], - $item['taxid'], - $item['prodid'], - $item['jm'], - $item['count'], - $item['discount'], - $item['name'], - $item['tariffid'] - )); + $item['valuebrutto'] = str_replace(',', '.', $item['valuebrutto']); + $item['count'] = str_replace(',', '.', $item['count']); + $item['pdiscount'] = str_replace(',', '.', $item['pdiscount']); + $item['vdiscount'] = str_replace(',', '.', $item['vdiscount']); + + $DB->Execute('INSERT INTO invoicecontents (docid, itemid, value, taxid, prodid, content, count, pdiscount, vdiscount, description, tariffid) + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + array($id, + $idx, + $item['valuebrutto'], + $item['taxid'], + $item['prodid'], + $item['jm'], + $item['count'], + $item['pdiscount'], + $item['vdiscount'], + $item['name'], + $item['tariffid'] + )); - if(isset($item['cash']) && $item['cash'] != 0) + if (isset($item['cash']) && $item['cash'] != 0) $DB->Execute('INSERT INTO cash (time, userid, value, taxid, customerid, comment, docid, itemid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?)', - array($cnote['cdate'], - $AUTH->id, - str_replace(',','.',$item['cash']), - $item['taxid'], - $invoice['customerid'], - $item['name'], - $id, - $idx + VALUES (?, ?, ?, ?, ?, ?, ?, ?)', + array($cnote['cdate'], + $AUTH->id, + str_replace(',','.',$item['cash']), + $item['taxid'], + $invoice['customerid'], + $item['name'], + $id, + $idx )); } @@ -301,13 +317,13 @@ $SESSION->remove('invoicecontents'); $SESSION->remove('cnoteerror'); - if(isset($_GET['print'])) - $SESSION->save('invoiceprint', array('invoice' => $id, - 'original' => !empty($_GET['original']) ? 1 : 0, + if (isset($_GET['print'])) + $SESSION->save('invoiceprint', array('invoice' => $id, + 'original' => !empty($_GET['original']) ? 1 : 0, 'copy' => !empty($_GET['copy']) ? 1 : 0)); - $SESSION->redirect('?m=invoicelist'); - break; + $SESSION->redirect('?m=invoicelist'); + break; } $SESSION->save('invoice', $invoice); @@ -315,7 +331,7 @@ $SESSION->save('invoicecontents', $contents); $SESSION->save('cnoteerror', $error); -if($action != '') +if ($action != '') { // redirect, to not prevent from invoice break with the refresh $SESSION->redirect('?m=invoicenote'); Index: lms/modules/print.php diff -u lms/modules/print.php:1.142 lms/modules/print.php:1.143 --- lms/modules/print.php:1.142 Fri Oct 14 18:09:00 2011 +++ lms/modules/print.php Thu Dec 1 18:10:46 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: print.php,v 1.142 2011/10/14 16:09:00 chilek Exp $ + * $Id: print.php,v 1.143 2011/12/01 17:10:46 chilek Exp $ */ $type = isset($_GET['type']) ? $_GET['type'] : ''; @@ -436,16 +436,15 @@ break; case 'liabilityreport': /********************************************/ - - if(isset($_POST['day']) && $_POST['day']) + + if (isset($_POST['day']) && $_POST['day']) { - list($year, $month, $day) = explode('/',$_POST['day']); - $reportday = mktime(0,0,0,$month,$day,$year); + list($year, $month, $day) = explode('/', $_POST['day']); + $reportday = mktime(0, 0, 0, $month, $day, $year); $today = $reportday; - } else - { + } else { $reportday = time(); - $today = mktime(0,0,0); + $today = mktime(0, 0, 0); } $layout['pagetitle'] = trans('Liability Report on $a',date('Y/m/d', $reportday)); @@ -454,7 +453,7 @@ $direction = $_POST['direction']; $customerid = (isset($_POST['customer']) ? intval($_POST['customer']) : 0); - $year = date('Y', $reportday); + $year = date('Y', $reportday); $yearday = date('z', $reportday) + 1; $month = date('n', $reportday); $monthday = date('j', $reportday); @@ -462,114 +461,94 @@ switch($month) { - case 1: - case 4: - case 7: - case 10: $quarterday = $monthday; break; - case 2: - case 5: - case 8: - case 11: $quarterday = $monthday + 100; break; - default: $quarterday = $monthday + 200; break; - } - - if ($month > 6) - $halfyear = $monthday + ($month - 7) * 100; - else - $halfyear = $monthday + ($month - 1) * 100; + case 1: + case 4: + case 7: + case 10: $quarterday = $monthday; break; + case 2: + case 5: + case 8: + case 11: $quarterday = $monthday + 100; break; + default: $quarterday = $monthday + 200; break; + } - if (is_leap_year($year) && $yearday > 31+28) - $yearday -= 1; + if ($month > 6) + $halfyear = $monthday + ($month - 7) * 100; + else + $halfyear = $monthday + ($month - 1) * 100; + + if (is_leap_year($year) && $yearday > 31 + 28) + $yearday -= 1; $suspension_percentage = $CONFIG['finances']['suspension_percentage']; - if($taxes = $LMS->GetTaxes($reportday, $reportday)) + if ($taxes = $LMS->GetTaxes($reportday, $reportday)) { foreach($taxes as $taxidx => $tax) { - $list1 = $DB->GetAllByKey('SELECT a.customerid AS id, '.$DB->Concat('UPPER(lastname)',"' '",'c.name').' AS customername, ' + $list1 = $DB->GetAllByKey('SELECT a.customerid AS id, '.$DB->Concat('UPPER(lastname)',"' '",'c.name').' AS customername, ' .$DB->Concat('city',"' '",'address').' AS address, ten, - SUM((CASE a.suspended - WHEN 0 THEN - (CASE a.discount - WHEN 0 THEN t.value - ELSE ((100 - a.discount) * t.value) / 100 - END) - ELSE - (CASE a.discount - WHEN 0 THEN t.value * '.$suspension_percentage.' / 100 - ELSE t.value * a.discount * '.$suspension_percentage.' / 10000 - END) - END) + SUM(((((100 - a.pdiscount) * t.value) / 100) - a.vdiscount) * + ((CASE a.suspended WHEN 0 THEN 100.0 ELSE '.$suspension_percentage.' END) / 100)) * (CASE a.period - WHEN '.YEARLY.' THEN 12 - WHEN '.HALFYEARLY.' THEN 6 - WHEN '.QUARTERLY.' THEN 3 - WHEN '.WEEKLY.' THEN 1.0/4 - WHEN '.DAILY.' THEN 1.0/30 - ELSE 1 END) + WHEN '.YEARLY.' THEN 12 + WHEN '.HALFYEARLY.' THEN 6 + WHEN '.QUARTERLY.' THEN 3 + WHEN '.WEEKLY.' THEN 1.0/4 + WHEN '.DAILY.' THEN 1.0/30 + ELSE 1 END) * (CASE t.period - WHEN '.YEARLY.' THEN 1.0/12 - WHEN '.HALFYEARLY.' THEN 1.0/6 - WHEN '.QUARTERLY.' THEN 1.0/3 - ELSE 1 END) - ) AS value + WHEN '.YEARLY.' THEN 1.0/12 + WHEN '.HALFYEARLY.' THEN 1.0/6 + WHEN '.QUARTERLY.' THEN 1.0/3 + ELSE 1 END) + ) AS value FROM assignments a, tariffs t, customersview c WHERE a.customerid = c.id AND a.tariffid = t.id AND t.taxid=? AND c.deleted=0 AND (a.datefrom<=? OR a.datefrom=0) AND (a.dateto>=? OR a.dateto=0) AND ((a.period='.DISPOSABLE.' AND a.at=?) - OR (a.period='.WEEKLY.'. AND a.at=?) - OR (a.period='.MONTHLY.' AND a.at=?) - OR (a.period='.QUARTERLY.' AND a.at=?) - OR (a.period='.HALFYEARLY.' AND a.at=?) - OR (a.period='.YEARLY.' AND a.at=?)) ' + OR (a.period='.WEEKLY.'. AND a.at=?) + OR (a.period='.MONTHLY.' AND a.at=?) + OR (a.period='.QUARTERLY.' AND a.at=?) + OR (a.period='.HALFYEARLY.' AND a.at=?) + OR (a.period='.YEARLY.' AND a.at=?)) ' .($customerid ? 'AND a.customerid='.$customerid : ''). ' GROUP BY a.customerid, lastname, c.name, city, address, ten ', 'id', array($tax['id'], $reportday, $reportday, $today, $weekday, $monthday, $quarterday, $halfyear, $yearday)); - $list2 = $DB->GetAllByKey('SELECT a.customerid AS id, '.$DB->Concat('UPPER(lastname)',"' '",'c.name').' AS customername, ' + $list2 = $DB->GetAllByKey('SELECT a.customerid AS id, '.$DB->Concat('UPPER(lastname)',"' '",'c.name').' AS customername, ' .$DB->Concat('city',"' '",'address').' AS address, ten, - SUM(CASE a.suspended - WHEN 0 THEN - (CASE a.discount - WHEN 0 THEN l.value - ELSE ((100 - a.discount) * l.value) / 100 - END) - ELSE - (CASE discount - WHEN 0 THEN l.value * '.$suspension_percentage.' / 100 - ELSE l.value * a.discount * '.$suspension_percentage.' / 10000 - END) - END) AS value + SUM(((((100 - a.pdiscount) * l.value) / 100) - a.vdiscount) * + ((CASE a.suspended WHEN 0 THEN 100.0 ELSE '.$suspension_percentage.' END) / 100)) AS value FROM assignments a, liabilities l, customersview c WHERE a.customerid = c.id AND a.liabilityid = l.id AND l.taxid=? AND c.deleted=0 AND (a.datefrom<=? OR a.datefrom=0) AND (a.dateto>=? OR a.dateto=0) AND ((a.period='.DISPOSABLE.' AND a.at=?) - OR (a.period='.WEEKLY.'. AND a.at=?) - OR (a.period='.MONTHLY.' AND a.at=?) - OR (a.period='.QUARTERLY.' AND a.at=?) - OR (a.period='.HALFYEARLY.' AND a.at=?) - OR (a.period='.YEARLY.' AND a.at=?)) ' + OR (a.period='.WEEKLY.'. AND a.at=?) + OR (a.period='.MONTHLY.' AND a.at=?) + OR (a.period='.QUARTERLY.' AND a.at=?) + OR (a.period='.HALFYEARLY.' AND a.at=?) + OR (a.period='.YEARLY.' AND a.at=?)) ' .($customerid ? 'AND a.customerid='.$customerid : ''). ' GROUP BY a.customerid, lastname, c.name, city, address, ten ', 'id', array($tax['id'], $reportday, $reportday, $today, $weekday, $monthday, $quarterday, $halfyear, $yearday)); - if (empty($list1) && empty($list2)) { - unset($taxes[$taxidx]); - } + if (empty($list1) && empty($list2)) { + unset($taxes[$taxidx]); + } $list = array_merge((array) $list1, (array) $list2); - if($list) + if ($list) { foreach($list as $row) { $idx = $row['id']; - if(!isset($reportlist[$idx])) + if (!isset($reportlist[$idx])) { $reportlist[$idx]['id'] = $row['id']; $reportlist[$idx]['customername'] = $row['customername']; @@ -589,27 +568,27 @@ case 'customername': foreach($reportlist as $idx => $row) { - $table['idx'][] = $idx; - $table['customername'][] = $row['customername']; + $table['idx'][] = $idx; + $table['customername'][] = $row['customername']; } - if(is_array($table)) - { - array_multisort($table['customername'],($direction == 'desc' ? SORT_DESC : SORT_ASC), $table['idx']); - foreach($table['idx'] as $idx) - $tmplist[] = $reportlist[$idx]; + if (is_array($table)) + { + array_multisort($table['customername'],($direction == 'desc' ? SORT_DESC : SORT_ASC), $table['idx']); + foreach($table['idx'] as $idx) + $tmplist[] = $reportlist[$idx]; } $reportlist = $tmplist; break; default: foreach($reportlist as $idx => $row) { - $table['idx'][] = $idx; - $table['value'][] = $row['value']; + $table['idx'][] = $idx; + $table['value'][] = $row['value']; } - if(is_array($table)) - { - array_multisort($table['value'],($direction == 'desc' ? SORT_DESC : SORT_ASC), $table['idx']); - foreach($table['idx'] as $idx) + if (is_array($table)) + { + array_multisort($table['value'],($direction == 'desc' ? SORT_DESC : SORT_ASC), $table['idx']); + foreach($table['idx'] as $idx) $tmplist[] = $reportlist[$idx]; } $reportlist = $tmplist; Index: lms/modules/tarifflist.php diff -u lms/modules/tarifflist.php:1.45 lms/modules/tarifflist.php:1.46 --- lms/modules/tarifflist.php:1.45 Wed Mar 2 11:31:05 2011 +++ lms/modules/tarifflist.php Thu Dec 1 18:10:46 2011 @@ -21,19 +21,19 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: tarifflist.php,v 1.45 2011/03/02 10:31:05 alec Exp $ + * $Id: tarifflist.php,v 1.46 2011/12/01 17:10:46 chilek Exp $ */ -function GetTariffList($order='name,asc', $type=NULL, $customergroupid=NULL, $promotionid=NULL) +function GetTariffList($order = 'name,asc', $type = NULL, $customergroupid = NULL, $promotionid = NULL) { global $DB, $LMS; - if($order=='') - $order='name,asc'; + if ($order == '') + $order = 'name,asc'; list($order,$direction) = sscanf($order, '%[^,],%s'); - ($direction=='desc') ? $direction = 'desc' : $direction = 'asc'; + ($direction == 'desc') ? $direction = 'desc' : $direction = 'asc'; switch($order) { @@ -41,28 +41,28 @@ $sqlord = " ORDER BY id $direction"; break; case 'description': - $sqlord = " ORDER BY t.description $direction, t.name"; + $sqlord = " ORDER BY t.description $direction, t.name"; break; case 'value': - $sqlord = " ORDER BY t.value $direction, t.name"; + $sqlord = " ORDER BY t.value $direction, t.name"; break; case 'downrate': - $sqlord = " ORDER BY t.downrate $direction, t.name"; + $sqlord = " ORDER BY t.downrate $direction, t.name"; break; case 'downceil': - $sqlord = " ORDER BY t.downceil $direction, t.name"; + $sqlord = " ORDER BY t.downceil $direction, t.name"; break; case 'uprate': - $sqlord = " ORDER BY t.uprate $direction, t.name"; + $sqlord = " ORDER BY t.uprate $direction, t.name"; break; case 'upceil': - $sqlord = " ORDER BY t.upceil $direction, t.name"; + $sqlord = " ORDER BY t.upceil $direction, t.name"; break; case 'count': - $sqlord = " ORDER BY customerscount $direction, t.name"; + $sqlord = " ORDER BY customerscount $direction, t.name"; break; default: - $sqlord = " ORDER BY t.name, t.value DESC"; + $sqlord = " ORDER BY t.name, t.value DESC"; break; } @@ -71,7 +71,7 @@ $totalcount = 0; $totalactivecount = 0; - if($tarifflist = $DB->GetAll('SELECT t.id, t.name, t.value, + if ($tarifflist = $DB->GetAll('SELECT t.id, t.name, t.value, taxes.label AS tax, taxes.value AS taxvalue, prodid, t.uprate, t.downrate, t.upceil, t.downceil, t.climit, t.plimit, t.uprate_n, t.downrate_n, t.upceil_n, t.downceil_n, t.climit_n, t.plimit_n, @@ -79,72 +79,64 @@ FROM tariffs t LEFT JOIN (SELECT a.tariffid, COUNT(*) AS count, COUNT(DISTINCT a.customerid) AS customerscount, - SUM(CASE tt.period - WHEN '.MONTHLY.' THEN ((tt.value * (100 - a.discount)) / 100.0) - WHEN '.QUARTERLY.' THEN ((tt.value * (100 - a.discount)) / 100.0) / 3 - WHEN '.YEARLY.' THEN ((tt.value * (100 - a.discount)) / 100.0) / 12 - WHEN '.HALFYEARLY.' THEN ((tt.value * (100 - a.discount)) / 100.0) / 6 - ELSE ((tt.value * (100 - a.discount)) / 100.0) * (CASE a.period - WHEN '.MONTHLY.' THEN 1 - WHEN '.QUARTERLY.' THEN 1.0 / 3 - WHEN '.YEARLY.' THEN 1.0 / 12 - WHEN '.HALFYEARLY.' THEN 1.0 / 6 - ELSE 0 END) - END) AS value + SUM((((tt.value * (100 - a.pdiscount)) / 100.0) - a.vdiscount) * + (CASE tt.period + WHEN '.MONTHLY.' THEN 1 + WHEN '.QUARTERLY.' THEN 1.0 / 3 + WHEN '.YEARLY.' THEN 1.0 / 12 + WHEN '.HALFYEARLY.' THEN 1.0 / 6 + ELSE 0 END) + ) AS value FROM assignments a JOIN tariffs tt ON (tt.id = tariffid)' .($customergroupid ? ' JOIN customerassignments cc ON (cc.customerid = a.customerid) - WHERE cc.customergroupid = '.intval($customergroupid) : '') - .($promotionid ? ' AND tt.id IN (SELECT pa.tariffid - FROM promotionassignments pa - JOIN promotionschemas ps ON (ps.id = pa.promotionschemaid) - WHERE ps.promotionid = ' .intval($promotionid).')' : '') + WHERE cc.customergroupid = '.intval($customergroupid) : '') + .($promotionid ? ' AND tt.id IN (SELECT pa.tariffid + FROM promotionassignments pa + JOIN promotionschemas ps ON (ps.id = pa.promotionschemaid) + WHERE ps.promotionid = ' .intval($promotionid).')' : '') .' GROUP BY a.tariffid ) a ON (a.tariffid = t.id) LEFT JOIN taxes ON (t.taxid = taxes.id) WHERE 1=1' .($type ? ' AND t.type = '.intval($type) : '') - .($promotionid ? ' AND t.id IN (SELECT pa.tariffid - FROM promotionassignments pa - JOIN promotionschemas ps ON (ps.id = pa.promotionschemaid) - WHERE ps.promotionid = ' .intval($promotionid).')' : '') + .($promotionid ? ' AND t.id IN (SELECT pa.tariffid + FROM promotionassignments pa + JOIN promotionschemas ps ON (ps.id = pa.promotionschemaid) + WHERE ps.promotionid = ' .intval($promotionid).')' : '') .($sqlord != '' ? $sqlord : ''))) { $unactive = $DB->GetAllByKey('SELECT tariffid, COUNT(*) AS count, - SUM(CASE x.period - WHEN '.MONTHLY.' THEN ((x.value * (100 - x.discount)) / 100.0) - WHEN '.QUARTERLY.' THEN ((x.value * (100 - x.discount)) / 100.0) / 3 - WHEN '.YEARLY.' THEN ((x.value * (100 - x.discount)) / 100.0) / 12 - WHEN '.HALFYEARLY.' THEN ((x.value * (100 - x.discount)) / 100.0) / 6 - ELSE ((x.value * (100 - x.discount)) / 100.0) * (CASE x.aperiod - WHEN '.MONTHLY.' THEN 1 - WHEN '.QUARTERLY.' THEN 1.0 / 3 - WHEN '.YEARLY.' THEN 1.0 / 12 - WHEN '.HALFYEARLY.' THEN 1.0 / 6 - ELSE 0 END) - END) AS value - FROM (SELECT a.tariffid, t.period, a.period AS aperiod, a.discount, t.value + SUM(((((x.value * (100 - x.pdiscount)) / 100.0) - x.vdiscount) * + (CASE x.period + WHEN '.MONTHLY.' THEN 1 + WHEN '.QUARTERLY.' THEN 1.0 / 3 + WHEN '.YEARLY.' THEN 1.0 / 12 + WHEN '.HALFYEARLY.' THEN 1.0 / 6 + ELSE 0 END) + ) AS value + FROM (SELECT a.tariffid, t.period, a.period AS aperiod, a.pdiscount, a.vdiscount, t.value FROM assignments a JOIN tariffs t ON (t.id = a.tariffid)' .($customergroupid ? ' JOIN customerassignments cc ON (cc.customerid = a.customerid)' : '') .' WHERE ( a.suspended = 1 - OR a.datefrom > ?NOW? - OR (a.dateto <= ?NOW? AND a.dateto != 0) + OR a.datefrom > ?NOW? + OR (a.dateto <= ?NOW? AND a.dateto != 0) OR EXISTS ( - SELECT 1 FROM assignments b + SELECT 1 FROM assignments b WHERE b.customerid = a.customerid AND liabilityid = 0 AND tariffid = 0 - AND (b.datefrom <= ?NOW? OR b.datefrom = 0) + AND (b.datefrom <= ?NOW? OR b.datefrom = 0) AND (b.dateto > ?NOW? OR b.dateto = 0) ) )' .($type ? ' AND t.type = '.intval($type) : '') .($customergroupid ? ' AND cc.customergroupid = '.intval($customergroupid) : '') .($promotionid ? ' AND t.id IN (SELECT pa.tariffid - FROM promotionassignments pa - JOIN promotionschemas ps ON (ps.id = pa.promotionschemaid) - WHERE ps.promotionid = ' .intval($promotionid).')' : '') + FROM promotionassignments pa + JOIN promotionschemas ps ON (ps.id = pa.promotionschemaid) + WHERE ps.promotionid = ' .intval($promotionid).')' : '') .') x GROUP BY tariffid', 'tariffid'); foreach($tarifflist as $idx => $row) @@ -162,18 +154,18 @@ switch($order) { - case 'income': - foreach($tarifflist as $idx => $row) - { - $table['idx'][] = $idx; - $table['income'][] = $row['income']; + case 'income': + foreach($tarifflist as $idx => $row) + { + $table['idx'][] = $idx; + $table['income'][] = $row['income']; } - if(isset($table)) + if (isset($table)) { array_multisort($table['income'],($direction == "desc" ? SORT_DESC : SORT_ASC), $table['idx']); foreach($table['idx'] as $idx) - $ntarifflist[] = $tarifflist[$idx]; - + $ntarifflist[] = $tarifflist[$idx]; + $tarifflist = $ntarifflist; } break; @@ -191,28 +183,28 @@ return $tarifflist; } -if(!isset($_GET['o'])) - $SESSION->restore('tlo', $o); +if (!isset($_GET['o'])) + $SESSION->restore('tlo', $o); else - $o = $_GET['o']; + $o = $_GET['o']; $SESSION->save('tlo', $o); -if(!isset($_GET['t'])) - $SESSION->restore('tlt', $t); +if (!isset($_GET['t'])) + $SESSION->restore('tlt', $t); else - $t = $_GET['t']; + $t = $_GET['t']; $SESSION->save('tlt', $t); -if(!isset($_GET['g'])) - $SESSION->restore('tlg', $g); +if (!isset($_GET['g'])) + $SESSION->restore('tlg', $g); else - $g = $_GET['g']; + $g = $_GET['g']; $SESSION->save('tlg', $g); -if(!isset($_GET['p'])) - $SESSION->restore('tlp', $p); +if (!isset($_GET['p'])) + $SESSION->restore('tlp', $p); else - $p = $_GET['p']; + $p = $_GET['p']; $SESSION->save('tlp', $p); $tarifflist = GetTariffList($o, $t, $g, $p); From cvs w lms.org.pl Thu Dec 1 18:10:47 2011 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 1 Dec 2011 18:10:47 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (6 files) Message-ID: <20111201171047.3AF8D302A040@eftep.altec.pl> Date: Thursday, December 1, 2011 @ 18:10:47 Author: chilek Path: /cvsroot/lms/templates Modified: customerassignments.html customerassignmentsedit.html invoice.html invoiceedit.html invoicenew.html invoicenote.html - we can use percentage and amount discounts Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/customerassignments.html.diff?&r1=1.46&r2=1.47 http://cvs.lms.org.pl/viewvc/Development/lms/templates/customerassignmentsedit.html.diff?&r1=1.25&r2=1.26 http://cvs.lms.org.pl/viewvc/Development/lms/templates/invoice.html.diff?&r1=1.73&r2=1.74 http://cvs.lms.org.pl/viewvc/Development/lms/templates/invoiceedit.html.diff?&r1=1.45&r2=1.46 http://cvs.lms.org.pl/viewvc/Development/lms/templates/invoicenew.html.diff?&r1=1.71&r2=1.72 http://cvs.lms.org.pl/viewvc/Development/lms/templates/invoicenote.html.diff?&r1=1.29&r2=1.30 Index: lms/templates/customerassignments.html diff -u lms/templates/customerassignments.html:1.46 lms/templates/customerassignments.html:1.47 --- lms/templates/customerassignments.html:1.46 Thu Nov 24 18:15:38 2011 +++ lms/templates/customerassignments.html Thu Dec 1 18:10:46 2011 @@ -1,4 +1,4 @@ - + {assign var=today value=$smarty.now|date_format:"%x 00:00:00"}{assign var=today value=$today|date_format:"%s"} @@ -55,7 +55,7 @@ {if $_config.privileges.finances_management|chkconfig || $adminuser}{$a.value|money_format}{/if} pdiscount - discount percentagepdiscount - discount percentage section to specify type of map. Set it to "flash" if you've - got Ming library or "gd" for graphic images. By default (option + got Ming library, "gd" for graphic images or "openlayers" if you want to use + map based on this library. By default (option not set) LMS will try to generate flash map, and when this fails, t will fallback to GD.

Date: Friday, December 30, 2011 @ 15:19:38 Author: alec Path: /cvsroot/lms/doc/html/pl Modified: devel-db.html index.html install-documents.html install.html menu-netdevices.html user.html - Updated DDL files, updated documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/devel-db.html.diff?&r1=1.77&r2=1.78 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/index.html.diff?&r1=1.44&r2=1.45 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install-documents.html.diff?&r1=1.31&r2=1.32 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/install.html.diff?&r1=1.28&r2=1.29 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/menu-netdevices.html.diff?&r1=1.18&r2=1.19 http://cvs.lms.org.pl/viewvc/Development/lms/doc/html/pl/user.html.diff?&r1=1.36&r2=1.37 Index: lms/doc/html/pl/devel-db.html diff -u lms/doc/html/pl/devel-db.html:1.77 lms/doc/html/pl/devel-db.html:1.78 --- lms/doc/html/pl/devel-db.html:1.77 Thu Dec 1 09:33:55 2011 +++ lms/doc/html/pl/devel-db.html Fri Dec 30 15:19:38 2011 @@ -502,7 +502,23 @@ >location - lokalizacja, tekst
- {if $_config.privileges.finances_management|chkconfig || $adminuser}{if $a.discount!=0}{$a.discount}%{else}-{/if}{/if} + {if $_config.privileges.finances_management|chkconfig || $adminuser}{if $a.pdiscount != 0}{$a.pdiscount}%{else}{if $a.vdiscount != 0}{$a.vdiscount|money_format}{else}-{/if}{/if}{/if} {$a.payday} Index: lms/templates/customerassignmentsedit.html diff -u lms/templates/customerassignmentsedit.html:1.25 lms/templates/customerassignmentsedit.html:1.26 --- lms/templates/customerassignmentsedit.html:1.25 Thu Nov 24 18:15:38 2011 +++ lms/templates/customerassignmentsedit.html Thu Dec 1 18:10:46 2011 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

{include file="calendar_js.html"} + - -
-«  -1m  -1w  -1d  -12h  -6h  -1h  -|  -1h  -6h  -12h  -1d  -1w  -1m  -» -
+
+ +
+ «  + 1m  + 1w  + 1d  + 12h  + 6h  + 1h  + |  + 1h  + 6h  + 12h  + 1d  + 1w  + 1m  + » +
+//--> From cvs w lms.org.pl Tue Dec 6 21:56:44 2011 From: cvs w lms.org.pl (LMS CVS) Date: Tue, 6 Dec 2011 21:56:44 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (customersearch.html, printindex.html) Message-ID: <20111206205644.EEE5030281A1@eftep.altec.pl> Date: Tuesday, December 6, 2011 @ 21:56:44 Author: chilek Path: /cvsroot/lms/templates Modified: customersearch.html printindex.html - missed changes for 'in debt above 200%' patch Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/customersearch.html.diff?&r1=1.25&r2=1.26 http://cvs.lms.org.pl/viewvc/Development/lms/templates/printindex.html.diff?&r1=1.102&r2=1.103 Index: lms/templates/customersearch.html diff -u lms/templates/customersearch.html:1.25 lms/templates/customersearch.html:1.26 --- lms/templates/customersearch.html:1.25 Thu Nov 10 07:41:01 2011 +++ lms/templates/customersearch.html Tue Dec 6 21:56:44 2011 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

{include file="calendar_js.html"} @@ -47,7 +53,11 @@ {t}IP address:{/t} {if $nodeinfo.ip_pub != "0.0.0.0"} Index: lms/templates/ping.html diff -u lms/templates/ping.html:1.18 lms/templates/ping.html:1.19 --- lms/templates/ping.html:1.18 Tue Nov 29 01:27:13 2011 +++ lms/templates/ping.html Sun Dec 18 14:31:56 2011 @@ -4,7 +4,7 @@
 
- +
{elseif $part eq "ipform"}
@@ -15,14 +15,16 @@
{t}Enter IP address:{/t}
- +
+ icmp + arp
{else} - + @@ -34,7 +36,7 @@ {if !$part} - + {else} @@ -51,6 +53,7 @@
+ From cvs w lms.org.pl Fri Dec 30 09:08:26 2011 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 30 Dec 2011 09:08:26 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/upgradedb (postgres.2011091100.php) Message-ID: <20111230080826.2E55B30281A1@eftep.altec.pl> Date: Friday, December 30, 2011 @ 09:08:26 Author: alec Path: /cvsroot/lms/lib/upgradedb Modified: postgres.2011091100.php - Use the ssame default value for voipaccounts.access column in both databases Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb/postgres.2011091100.php.diff?&r1=1.1&r2=1.2 Index: lms/lib/upgradedb/postgres.2011091100.php diff -u lms/lib/upgradedb/postgres.2011091100.php:1.1 lms/lib/upgradedb/postgres.2011091100.php:1.2 --- lms/lib/upgradedb/postgres.2011091100.php:1.1 Thu Sep 15 18:26:11 2011 +++ lms/lib/upgradedb/postgres.2011091100.php Fri Dec 30 09:08:25 2011 @@ -21,16 +21,16 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: postgres.2011091100.php,v 1.1 2011/09/15 16:26:11 maniac Exp $ + * $Id: postgres.2011091100.php,v 1.2 2011/12/30 08:08:25 alec Exp $ */ $DB->BeginTrans(); $DB->Execute(" ALTER TABLE voipaccounts ADD COLUMN access smallint; - UPDATE voipaccounts SET access = 0; + UPDATE voipaccounts SET access = 1; ALTER TABLE voipaccounts ALTER access SET NOT NULL; - ALTER TABLE voipaccounts ALTER access SET DEFAULT 0; + ALTER TABLE voipaccounts ALTER access SET DEFAULT 1; "); $DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?",array('2011091100', 'dbversion')); From cvs w lms.org.pl Fri Dec 30 10:09:40 2011 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 30 Dec 2011 10:09:40 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (3 files) Message-ID: <20111230090940.5AF5930281A1@eftep.altec.pl> Date: Friday, December 30, 2011 @ 10:09:40 Author: alec Path: /cvsroot/lms/modules Modified: rtqueueview.php rtticketadd.php welcome.php - Some improvements Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/rtqueueview.php.diff?&r1=1.52&r2=1.53 http://cvs.lms.org.pl/viewvc/Development/lms/modules/rtticketadd.php.diff?&r1=1.60&r2=1.61 http://cvs.lms.org.pl/viewvc/Development/lms/modules/welcome.php.diff?&r1=1.61&r2=1.62 Index: lms/modules/rtqueueview.php diff -u lms/modules/rtqueueview.php:1.52 lms/modules/rtqueueview.php:1.53 --- lms/modules/rtqueueview.php:1.52 Fri Sep 16 22:48:17 2011 +++ lms/modules/rtqueueview.php Fri Dec 30 10:09:40 2011 @@ -21,20 +21,21 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: rtqueueview.php,v 1.52 2011/09/16 20:48:17 chilek Exp $ + * $Id: rtqueueview.php,v 1.53 2011/12/30 09:09:40 alec Exp $ */ if(isset($_GET['id'])) - $queuedata['id'] = ($_GET['id'] == '' ? 0 : $_GET['id']); + $queuedata['id'] = intval($_GET['id']); + if(isset($_GET['catid'])) - $queuedata['catid'] = ($_GET['catid'] == '' ? 0 : $_GET['catid']); + $queuedata['catid'] = intval($_GET['catid']); if(! $LMS->QueueExists($queuedata['id']) && $queuedata['id'] != 0) { $SESSION->redirect('?m=rtqueuelist'); } -if($queuedata['id'] != 0) +if($queuedata['id']) { $right = $LMS->GetUserRightsRT($AUTH->id, $queuedata['id']); @@ -59,7 +60,7 @@ $queuedata['id'] = $queues; } -if($queuedata['catid'] != 0) +if($queuedata['catid']) { $catrights = $LMS->GetUserRightsToCategory($AUTH->id, $queuedata['catid']); @@ -73,14 +74,15 @@ else { $categories = $DB->GetCol('SELECT categoryid FROM rtcategoryusers WHERE userid=?', array($AUTH->id)); + $all_cat = $DB->GetOne('SELECT COUNT(*) FROM rtcategories'); - if (!$categories) { + if (!$categories && $all_cat) { $SMARTY->display('noaccess.html'); $SESSION->close(); die; } - if(sizeof($categories) != $DB->GetOne('SELECT COUNT(*) FROM rtcategories')) + if(sizeof($categories) != $all_cat) $queuedata['catid'] = $categories; } Index: lms/modules/rtticketadd.php diff -u lms/modules/rtticketadd.php:1.60 lms/modules/rtticketadd.php:1.61 --- lms/modules/rtticketadd.php:1.60 Fri Dec 9 11:47:24 2011 +++ lms/modules/rtticketadd.php Fri Dec 30 10:09:40 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: rtticketadd.php,v 1.60 2011/12/09 10:47:24 chilek Exp $ + * $Id: rtticketadd.php,v 1.61 2011/12/30 09:09:40 alec Exp $ */ $queue = isset($_GET['id']) ? intval($_GET['id']) : 0; @@ -171,11 +171,17 @@ $categories = $LMS->GetCategoryListByUser($AUTH->id); +if (!$categories) { + $SMARTY->display('noaccess.html'); + $SESSION->close(); + die; +} + // handle category id got from welcome module so this category will be selected if (isset($_GET['catid']) && intval($_GET['catid'])) $ticket['categories'][intval($_GET['catid'])] = true; -foreach ($categories as $category) +if ($categories) foreach ($categories as $category) { $category['checked'] = isset($ticket['categories'][$category['id']]) || count($categories) == 1; $ncategories[] = $category; Index: lms/modules/welcome.php diff -u lms/modules/welcome.php:1.61 lms/modules/welcome.php:1.62 --- lms/modules/welcome.php:1.61 Fri Sep 9 20:16:52 2011 +++ lms/modules/welcome.php Fri Dec 30 10:09:40 2011 @@ -21,40 +21,43 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: welcome.php,v 1.61 2011/09/09 18:16:52 chilek Exp $ + * $Id: welcome.php,v 1.62 2011/12/30 09:09:40 alec Exp $ */ -require_once(LIB_DIR.'/Sysinfo.class.php'); @include(LIB_DIR.'/locale/'.$_language.'/fortunes.php'); -$SI = new Sysinfo; - $layout['pagetitle'] = 'LAN Management System'; $layout['dbversion'] = $DB->GetDBVersion(); $layout['dbtype'] = $CONFIG['database']['type']; -$content = $LMS->CheckUpdates(); +if ($adminuser) { + $content = $LMS->CheckUpdates(); + + if(isset($content['newer_version'])) { + list($v, ) = preg_split('/\s+/', $LMS->_version); -if(isset($content['newer_version'])) -{ - list($v, ) = preg_split('/\s+/', $LMS->_version); + if(version_compare($content['newer_version'], $v) > 0) + $SMARTY->assign('newer_version', $content['newer_version']); + } - if(version_compare($content['newer_version'], $v)>0) - $SMARTY->assign('newer_version', $content['newer_version']); + $SMARTY->assign('regdata', $LMS->GetRegisterData()); } $SMARTY->assign('_dochref', is_dir('doc/html/'.$LMS->ui_lang) ? 'doc/html/'.$LMS->ui_lang.'/' : 'doc/html/en/'); -if ($adminuser) - $SMARTY->assign('regdata', $LMS->GetRegisterData()); $SMARTY->assign('rtstats', $LMS->RTStats()); -if (!$CONFIG['phpui']['hide_sysinfo']) - $SMARTY->assign('sysinfo',$SI->get_sysinfo()); -if (!$CONFIG['phpui']['hide_summaries']) -{ - $SMARTY->assign('customerstats',$LMS->CustomerStats()); - $SMARTY->assign('nodestats',$LMS->NodeStats()); + +if (!$CONFIG['phpui']['hide_sysinfo']) { + require_once LIB_DIR.'/Sysinfo.class.php'; + $SI = new Sysinfo; + $SMARTY->assign('sysinfo', $SI->get_sysinfo()); +} + +if (!$CONFIG['phpui']['hide_summaries']) { + $SMARTY->assign('customerstats', $LMS->CustomerStats()); + $SMARTY->assign('nodestats', $LMS->NodeStats()); } + $SMARTY->display('welcome.html'); ?> From cvs w lms.org.pl Fri Dec 30 11:48:21 2011 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 30 Dec 2011 11:48:21 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (messageadd.html) Message-ID: <20111230104821.6449630281A1@eftep.altec.pl> Date: Friday, December 30, 2011 @ 11:48:21 Author: alec Path: /cvsroot/lms/templates Modified: messageadd.html - Hide users selector if there are no users with phone number Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/messageadd.html.diff?&r1=1.10&r2=1.11 Index: lms/templates/messageadd.html diff -u lms/templates/messageadd.html:1.10 lms/templates/messageadd.html:1.11 --- lms/templates/messageadd.html:1.10 Sat Nov 26 14:30:40 2011 +++ lms/templates/messageadd.html Fri Dec 30 11:48:21 2011 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

@@ -18,22 +18,24 @@ function typesel(elem) { + alert(elem); if(elem == 'typesms' || elem == 'typeanysms') { document.getElementById('mailbody').style.display = 'none'; document.getElementById('mailfrom').style.display = 'none'; document.getElementById('mailsender').style.display = 'none'; document.getElementById('attachment').style.display = 'none'; {if !$message.customerid} + var users = document.getElementById('users'); if (elem == 'typeanysms') { - document.getElementById('phonenumber').style.display = 'table-row'; - document.getElementById('users').style.display = 'table-row'; + document.getElementById('phonenumber').style.display = ''; + if (users) users.style.display = ''; } else { document.getElementById('phonenumber').style.display = 'none'; - document.getElementById('users').style.display = 'none'; + if (users) users.style.display = 'none'; } {/if} - document.getElementById('smsbody').style.display = 'table-row'; - document.getElementById('charscount').style.display = 'table-row'; + document.getElementById('smsbody').style.display = ''; + document.getElementById('charscount').style.display = ''; } else { document.getElementById('mailbody').style.display = ''; document.getElementById('mailfrom').style.display = ''; @@ -169,6 +171,7 @@ {if !$message.customerid} + {if $users}
+ {/if} location_address - address stringlocation_city - city identifierlocation_street - street identifier
- {$nodeinfo.ip} + {$nodeinfo.ip} +
+ icmp + arp +
location_address - address - street, apartment, flat, etc
location_zip - address - zip code
location_city - address - location (city)
location_house - house number
location_flat - flat number
nas - NAS flag (1/0)
longitude - geog. longitude
latitude - geog latitude
discount - discount percentage
vdiscount - discount value
discount - discount percentage
vdiscount - discount value
access - enabled/disabled (1/0)
creationdate - date of account creation
location - lokalizacja
location_city - identyfikator miejscowości (TERYT)
location_street - identyfikator ulicy (TERYT)
location_house - numer domu
location_flat - numer mieszkania
channelid - identyfikator kanału STM (tabela ewx_channels)
longitude - długość geograficzna
latitude - szerokość geograficzna
location_address - adres lokalizacji - ulica, nr domu, nr lokalulocation - adres lokalizacji, tekstlocation_zip - adres lokalizacji - kod pocztowylocation_city - identyfikator miejscowości (TERYT)location_city - adres lokalizacji - miastolocation_street - identyfikator ulicy (TERYT)location_house - numer domulocation_flat - numer mieszkanianas - flaga NAS (0/1)longitude - długość geograficznalatitude - szerokość geograficznadiscount - wartość procentowa rabatupdiscount - wartość procentowa rabatuvdiscount - wartość kwotowa rabatudiscount - wartość procentowa rabatupdiscount - wartość procentowa rabatuvdiscount - wartość kwotowa rabatuaccess - włączone/wyłączone (1/0)creationdate - data utworzeniaDokumenty
2.10. Baza podziału terytorialnego (TERYT)
NastępnyNastępnyInterfejs Użytkownika (LMS-UI)Baza podziału terytorialnego (TERYT)
2.10. Baza podziału terytorialnego (TERYT)
[phpui]. Ustaw "flash" jeśli używasz biblioteki - Ming lub "gd" jeśli chcesz generować obrazki przy pomocy gdlib. Domyślnie + Ming, "gd" jeśli chcesz generować obrazki przy pomocy gdlib lub "openlayers" jeśli + chcesz używać biblioteki OpenLayers do generowania mapy. Domyślnie (opcja nieustawiona) LMS spróbuje wykryć jaką bibliotekę masz dostępną w systemie, przy czym w pierwszej kolejności szuka możliwości wygenerowania mapy we flashu, a jak się to nie uda, to użyje GD. Index: lms/doc/html/pl/user.html diff -u lms/doc/html/pl/user.html:1.36 lms/doc/html/pl/user.html:1.37 --- lms/doc/html/pl/user.html:1.36 Thu Dec 1 09:33:55 2011 +++ lms/doc/html/pl/user.html Fri Dec 30 15:19:38 2011 @@ -10,8 +10,8 @@ TITLE="LMS - LAN Management System 1.11-cvs" HREF="index.html">PoprzedniPoprzedniDokumentyBaza podziału terytorialnego (TERYT) Date: Friday, December 30, 2011 @ 15:19:37 Author: alec Path: /cvsroot/lms/doc Modified: README README.pl lms.mysql lms.pgsql - Updated DDL files, updated documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/README.diff?&r1=1.237&r2=1.238 http://cvs.lms.org.pl/viewvc/Development/lms/doc/README.pl.diff?&r1=1.69&r2=1.70 http://cvs.lms.org.pl/viewvc/Development/lms/doc/lms.mysql.diff?&r1=1.187&r2=1.188 http://cvs.lms.org.pl/viewvc/Development/lms/doc/lms.pgsql.diff?&r1=1.186&r2=1.187 Index: lms/doc/README diff -u lms/doc/README:1.237 lms/doc/README:1.238 --- lms/doc/README:1.237 Thu Dec 1 09:33:53 2011 +++ lms/doc/README Fri Dec 30 15:19:37 2011 @@ -1271,9 +1271,10 @@ You need GD or Ming library compiled in PHP to be able to use graphical map. Use 'map_type' option in section [phpui] section to specify type of - map. Set it to "flash" if you've got Ming library or "gd" for graphic - images. By default (option not set) LMS will try to generate flash map, - and when this fails, t will fallback to GD. + map. Set it to "flash" if you've got Ming library, "gd" for graphic + images or "openlayers" if you want to use map based on this library. By + default (option not set) LMS will try to generate flash map, and when + this fails, t will fallback to GD. Device status is shown on the map - computers in black are offline. Question mark on device icon means that its status is unknown (device @@ -5414,7 +5415,11 @@ id - serial number name - name - location - physical location + location - physical location text + location_city - city identifier + location_street - street identifier + location_house - house number + location_flat - flat number description - device summary producer - manufacturer's name model - model number @@ -5428,6 +5433,8 @@ secret - password (radius) community - SNMP community channelid - STM channel identifier (ewx_channels table) + longitude - geog. longitude + latitude - geog latitude __________________________________________________________________ 7.2.8. Network connections ('netlinks') @@ -5460,10 +5467,14 @@ halfduplex - half/full duplex mode (0/1) lastonline - last network activity timestamp info - additional information - location_address - address - street, apartment, flat, etc - location_zip - address - zip code - location_city - address - location (city) + location_address - address string + location_city - city identifier + location_street - street identifier + location_house - house number + location_flat - flat number nas - NAS flag (1/0) + longitude - geog. longitude + latitude - geog latitude __________________________________________________________________ 7.2.10. MAC addresses ('macs') @@ -5639,7 +5650,8 @@ datefrom - start date for assignment dateto - end date for assignment invoice - invoice writeout? (1 - yes, 0 - no) - discount - discount percentage + pdiscount - discount percentage + vdiscount - discount value suspended - is this payment suspended? (1 - yes, 0 - no) settlement - do deficient period settlement? (1 - yes, 0 - no) paytype - invoice payment type identifier @@ -5753,7 +5765,8 @@ docid - invoice serial number itemid - invoice item identifier value - amount - discount - discount percentage + pdiscount - discount percentage + vdiscount - discount value taxid - tax rate identifier prodid - product/service classification number content - used unit (usually 'pc.') @@ -5873,6 +5886,7 @@ login - login passwd - password phone - phone number + access - enabled/disabled (1/0) creationdate - date of account creation moddate - date of last account modification creatorid - creator (user) identifier Index: lms/doc/README.pl diff -u lms/doc/README.pl:1.69 lms/doc/README.pl:1.70 --- lms/doc/README.pl:1.69 Thu Dec 1 09:33:53 2011 +++ lms/doc/README.pl Fri Dec 30 15:19:37 2011 @@ -26,6 +26,7 @@ 2.7. Prawa dostępu 2.8. Upgrade 2.9. Dokumenty + 2.10. Baza podziału terytorialnego (TERYT) 3. Interfejs Użytkownika (LMS-UI) @@ -1129,6 +1130,14 @@ dokumencie. __________________________________________________________________ +2.10. Baza podziału terytorialnego (TERYT) + + LMS obsługuje bazę podziału terytorialnego TERYT w sposób umożliwiający + przypisanie adresów zgodnych z zawartością tej bazy do komputerów oraz + urządzeń sieciowych. Aby mieć możliwość wyboru adresów z listy należy + zaimportować bazę TERYT. Służy do tego skrypt lms-teryt. + __________________________________________________________________ + Rozdział 3. Interfejs Użytkownika (LMS-UI) LMS'owy Interfejs Użytkownika to panel administracyjny do tworzenia i @@ -1422,8 +1431,9 @@ Do wygenerowania mapy potrzebna jest wbudowana w PHP obsługa biblioteki graficznej GD lub Ming. Aby wybrać typ mapy musisz skorzystać z opcji map_type z sekcji - [phpui]. Ustaw "flash" jeśli używasz biblioteki Ming lub "gd" jeśli - chcesz generować obrazki przy pomocy gdlib. Domyślnie (opcja + [phpui]. Ustaw "flash" jeśli używasz biblioteki Ming, "gd" jeśli chcesz + generować obrazki przy pomocy gdlib lub "openlayers" jeśli chcesz + używać biblioteki OpenLayers do generowania mapy. Domyślnie (opcja nieustawiona) LMS spróbuje wykryć jaką bibliotekę masz dostępną w systemie, przy czym w pierwszej kolejności szuka możliwości wygenerowania mapy we flashu, a jak się to nie uda, to użyje GD. @@ -6430,7 +6440,11 @@ id - identyfikator name - nazwa - location - lokalizacja + location - lokalizacja, tekst + location_city - identyfikator miejscowości (TERYT) + location_street - identyfikator ulicy (TERYT) + location_house - numer domu + location_flat - numer mieszkania description - opis producer - producent model - model @@ -6445,6 +6459,8 @@ secret - hasło (radius) community - community SNMP channelid - identyfikator kanału STM (tabela ewx_channels) + longitude - długość geograficzna + latitude - szerokość geograficzna __________________________________________________________________ 7.2.8. Połączenia sieciowe ('netlinks') @@ -6478,10 +6494,14 @@ warning - ostrzegaj/nie ostrzegaj (1/0) lastonline - znacznik czasu ostatniej obecności w sieci info - informacje dodatkowe - location_address - adres lokalizacji - ulica, nr domu, nr lokalu - location_zip - adres lokalizacji - kod pocztowy - location_city - adres lokalizacji - miasto + location - adres lokalizacji, tekst + location_city - identyfikator miejscowości (TERYT) + location_street - identyfikator ulicy (TERYT) + location_house - numer domu + location_flat - numer mieszkania nas - flaga NAS (0/1) + longitude - długość geograficzna + latitude - szerokość geograficzna __________________________________________________________________ 7.2.10. Adresy MAC ('macs') @@ -6666,7 +6686,8 @@ datefrom - data obowiązywania zobowiązania dateto - data obowiązywania zobowiązania invoice - określa czy ma być wystawiana faktura (1 - tak, 0 - nie) - discount - wartość procentowa rabatu + pdiscount - wartość procentowa rabatu + vdiscount - wartość kwotowa rabatu suspended - zawieszenie płatności (1 - tak, 0 - nie) settlement - rozliczenie okresu niepełnego (1 - tak, 0 - nie) paytype - identyfikator typu płatności faktury @@ -6771,7 +6792,8 @@ docid - identyfikator faktury itemid - nr pozycji value - kwota pozycji - discount - wartość procentowa rabatu + pdiscount - wartość procentowa rabatu + vdiscount - wartość kwotowa rabatu taxid - identyfikator stawki podatkowej prodid - numer PKWiU content - użyta jednostka (najczęściej 'szt.') @@ -6891,6 +6913,7 @@ login - login passwd - hasło phone - numer telefonu + access - włączone/wyłączone (1/0) creationdate - data utworzenia moddate - date ostatniej zmiany creatorid - identyfikator użytkownika Index: lms/doc/lms.mysql diff -u lms/doc/lms.mysql:1.187 lms/doc/lms.mysql:1.188 --- lms/doc/lms.mysql:1.187 Fri Apr 15 19:47:27 2011 +++ lms/doc/lms.mysql Fri Dec 30 15:19:37 2011 @@ -1,5 +1,5 @@ # -------------------------------------------------------- -# $Id: lms.mysql,v 1.187 2011/04/15 17:47:27 alec Exp $ +# $Id: lms.mysql,v 1.188 2011/12/30 14:19:37 alec Exp $ # -------------------------------------------------------- # -- Drop tables first, MySQL doesn't support CASCADE @@ -9,13 +9,14 @@ DROP VIEW IF EXISTS vnodes; DROP VIEW IF EXISTS vmacs; DROP VIEW IF EXISTS customersview; +DROP VIEW IF EXISTS teryt_terc; +DROP VIEW IF EXISTS teryt_ulic; +DROP VIEW IF EXISTS teryt_simc; DROP TABLE IF EXISTS ewx_stm_nodes; DROP TABLE IF EXISTS ewx_stm_channels; DROP TABLE IF EXISTS ewx_pt_config; DROP TABLE IF EXISTS ewx_channels; -DROP TABLE IF EXISTS users; -DROP TABLE IF EXISTS customers; DROP TABLE IF EXISTS numberplans; DROP TABLE IF EXISTS nodeassignments; DROP TABLE IF EXISTS assignments; @@ -28,6 +29,12 @@ DROP TABLE IF EXISTS documents; DROP TABLE IF EXISTS documentcontents; DROP TABLE IF EXISTS receiptcontents; +DROP TABLE IF EXISTS location_street_types; +DROP TABLE IF EXISTS location_streets; +DROP TABLE IF EXISTS location_cities; +DROP TABLE IF EXISTS location_boroughs; +DROP TABLE IF EXISTS location_districts; +DROP TABLE IF EXISTS location_states; DROP TABLE IF EXISTS netdevices; DROP TABLE IF EXISTS netlinks; DROP TABLE IF EXISTS networks; @@ -36,6 +43,9 @@ DROP TABLE IF EXISTS nodegroups; DROP TABLE IF EXISTS nodegroupassignments; DROP TABLE IF EXISTS payments; +DROP TABLE IF EXISTS rtticketcategories; +DROP TABLE IF EXISTS rtcategoryusers; +DROP TABLE IF EXISTS rtcategories; DROP TABLE IF EXISTS rtattachments; DROP TABLE IF EXISTS rtmessages; DROP TABLE IF EXISTS rtnotes; @@ -86,6 +96,8 @@ DROP TABLE IF EXISTS up_help; DROP TABLE IF EXISTS up_info_changes; DROP TABLE IF EXISTS supermasters; +DROP TABLE IF EXISTS users; +DROP TABLE IF EXISTS customers; # -------------------------------------------------------- # @@ -189,7 +201,8 @@ invoice tinyint(1) NOT NULL DEFAULT '0', suspended tinyint(1) NOT NULL DEFAULT '0', settlement tinyint(1) NOT NULL DEFAULT '0', - discount decimal(4,2) NOT NULL DEFAULT '0', + pdiscount decimal(4,2) NOT NULL DEFAULT '0', + vdiscount decimal(9,2) NOT NULL DEFAULT '0', paytype smallint DEFAULT NULL, numberplanid int(11) DEFAULT NULL REFERENCES numberplans (id) ON DELETE SET NULL ON UPDATE CASCADE, @@ -222,7 +235,7 @@ time int(11) NOT NULL DEFAULT '0', type smallint NOT NULL DEFAULT '0', userid int(11) NOT NULL DEFAULT '0', - value decimal(9,2) NOT NULL DEFAULT '0.00', + value decimal(9,2) NOT NULL DEFAULT '0', taxid int(11) NOT NULL DEFAULT '0', customerid int(11) NOT NULL DEFAULT '0', comment text NOT NULL DEFAULT '', @@ -268,12 +281,13 @@ CREATE TABLE invoicecontents ( docid int(11) NOT NULL DEFAULT '0', itemid smallint NOT NULL DEFAULT '0', - value decimal(9,2) NOT NULL DEFAULT '0.00', - discount decimal(4,2) NOT NULL DEFAULT '0.00', + value decimal(9,2) NOT NULL DEFAULT '0', + pdiscount decimal(4,2) NOT NULL DEFAULT '0', + vdiscount decimal(9,2) NOT NULL DEFAULT '0', taxid int(11) NOT NULL DEFAULT '0', prodid varchar(255) NOT NULL DEFAULT '', content varchar(16) NOT NULL DEFAULT '', - count decimal(9,2) NOT NULL DEFAULT '0.00', + count decimal(9,2) NOT NULL DEFAULT '0', description text NOT NULL DEFAULT '', tariffid int(11) NOT NULL DEFAULT '0', INDEX docid (docid) @@ -287,7 +301,7 @@ id int(11) NOT NULL auto_increment, docid int(11) NOT NULL DEFAULT '0', itemid smallint NOT NULL DEFAULT '0', - value decimal(9,2) NOT NULL DEFAULT '0.00', + value decimal(9,2) NOT NULL DEFAULT '0', description text NOT NULL DEFAULT '', PRIMARY KEY (id), UNIQUE KEY docid (docid, itemid) @@ -362,6 +376,89 @@ # -------------------------------------------------------- # +# Structure of table location_states +# +CREATE TABLE location_states ( + id int(11) NOT NULL auto_increment, + ident varchar(8) NOT NULL, -- TERYT: WOJ + name varchar(64) NOT NULL, -- TERYT: NAZWA + PRIMARY KEY (id), + UNIQUE KEY name (name) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table location_districts +# +CREATE TABLE location_districts ( + id int(11) NOT NULL auto_increment, + name varchar(64) NOT NULL, -- TERYT: NAZWA + ident varchar(8) NOT NULL, -- TERYT: POW + stateid int(11) NOT NULL -- TERYT: WOJ + REFERENCES location_states (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE KEY stateid (stateid, name) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table location_boroughs +# +CREATE TABLE location_boroughs ( + id int(11) NOT NULL auto_increment, + name varchar(64) NOT NULL, -- TERYT: NAZWA + ident varchar(8) NOT NULL, -- TERYT: GMI + districtid int(11) NOT NULL + REFERENCES location_districts (id) ON DELETE CASCADE ON UPDATE CASCADE, + type smallint NOT NULL, -- TERYT: RODZ + PRIMARY KEY (id), + UNIQUE KEY districtid (districtid, name, type) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table location_cities +# +CREATE TABLE location_cities ( + id int(11) NOT NULL auto_increment, + ident varchar(8) NOT NULL, -- TERYT: SYM / SYMPOD + name varchar(64) NOT NULL, -- TERYT: NAZWA + cityid int(11) DEFAULT NULL, + boroughid int(11) DEFAULT NULL + REFERENCES location_boroughs (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + INDEX cityid (cityid), + INDEX boroughid (boroughid, name) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table location_street_types +# +CREATE TABLE location_street_types ( + id int(11) NOT NULL auto_increment, + name varchar(8) NOT NULL, -- TERYT: CECHA + PRIMARY KEY (id) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table location_streets +# +CREATE TABLE location_streets ( + id int(11) NOT NULL auto_increment, + name varchar(128) NOT NULL, -- TERYT: NAZWA_1 + ident varchar(8) NOT NULL, -- TERYT: SYM_UL + typeid int(11) DEFAULT NULL + REFERENCES location_street_types (id) ON DELETE SET NULL ON UPDATE CASCADE, + cityid int(11) NOT NULL + REFERENCES location_cities (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE (cityid, name, ident) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# # Structure of tables ewx_* (EtherWerX(R)) # CREATE TABLE ewx_stm_nodes ( @@ -420,6 +517,12 @@ id int(11) NOT NULL auto_increment, name varchar(32) NOT NULL DEFAULT '', location varchar(255) NOT NULL DEFAULT '', + location_city int(11) DEFAULT NULL + REFERENCES location_cities (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_street int(11) DEFAULT NULL + REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_house varchar(8) DEFAULT NULL, + location_flat varchar(8) DEFAULT NULL, description text NOT NULL DEFAULT '', producer varchar(64) NOT NULL DEFAULT '', model varchar(32) NOT NULL DEFAULT '', @@ -434,8 +537,12 @@ community varchar(50) NOT NULL DEFAULT '', channelid int(11) DEFAULT NULL REFERENCES ewx_channels (id) ON DELETE SET NULL ON UPDATE CASCADE, + longitude decimal(10, 6) DEFAULT NULL, + latitude decimal(10, 6) DEFAULT NULL, PRIMARY KEY (id), - INDEX channelid (channelid) + INDEX channelid (channelid), + INDEX location_city (location_city, location_street, location_house, location_flat), + INDEX location_street (location_street) ) ENGINE=InnoDB; # -------------------------------------------------------- @@ -501,16 +608,24 @@ halfduplex tinyint(1) NOT NULL DEFAULT '0', lastonline int(11) NOT NULL DEFAULT '0', info text NOT NULL DEFAULT '', - location_address varchar(255) DEFAULT NULL, - location_zip varchar(10) DEFAULT NULL, - location_city varchar(32) DEFAULT NULL, + location varchar(255) DEFAULT NULL, + location_city int(11) DEFAULT NULL + REFERENCES location_cities (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_street int(11) DEFAULT NULL + REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_house varchar(8) DEFAULT NULL, + location_flat varchar(8) DEFAULT NULL, nas tinyint(1) NOT NULL DEFAULT '0', + longitude decimal(10, 6) DEFAULT NULL, + latitude decimal(10, 6) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY name (name), UNIQUE KEY ipaddr (ipaddr), INDEX netdev (netdev), INDEX ownerid (ownerid), - INDEX ipaddr_pub (ipaddr_pub) + INDEX ipaddr_pub (ipaddr_pub), + INDEX location_city (location_city, location_street, location_house, location_flat), + INDEX location_street (location_street) ) ENGINE=InnoDB; # -------------------------------------------------------- @@ -574,7 +689,7 @@ CREATE TABLE payments ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL DEFAULT '', - value decimal(9,2) NOT NULL DEFAULT '0.00', + value decimal(9,2) NOT NULL DEFAULT '0', creditor varchar(255) NOT NULL DEFAULT '', period smallint NOT NULL DEFAULT '0', at smallint NOT NULL DEFAULT '0', @@ -687,6 +802,46 @@ # -------------------------------------------------------- # +# Structure of table rtcategories +# +CREATE TABLE rtcategories ( + id int(11) NOT NULL auto_increment, + name varchar(255) DEFAULT '' NOT NULL, + description text DEFAULT '' NOT NULL, + PRIMARY KEY (id), + UNIQUE KEY (name) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table rtcategoryusers +# +CREATE TABLE rtcategoryusers ( + id int(11) NOT NULL auto_increment, + userid int(11) NOT NULL + REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE, + categoryid int(11) NOT NULL + REFERENCES rtcategories (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE KEY userid (userid, categoryid) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# +# Structure of table rtticketcategories +# +CREATE TABLE rtticketcategories ( + id int(11) NOT NULL auto_increment, + ticketid int(11) NOT NULL + REFERENCES rttickets (id) ON DELETE CASCADE ON UPDATE CASCADE, + categoryid int(11) NOT NULL + REFERENCES rtcategories (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE KEY ticketid (ticketid, categoryid) +) ENGINE=INNODB; + +# -------------------------------------------------------- +# # Structure of table stats # CREATE TABLE stats ( @@ -706,7 +861,7 @@ id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL DEFAULT '', type tinyint NOT NULL DEFAULT '1', - value decimal(9,2) NOT NULL DEFAULT '0.00', + value decimal(9,2) NOT NULL DEFAULT '0', taxid int(11) NOT NULL DEFAULT '0', period smallint DEFAULT NULL, prodid varchar(255) NOT NULL DEFAULT '', @@ -997,7 +1152,7 @@ CREATE TABLE cashimport ( id int(11) NOT NULL auto_increment, date int(11) NOT NULL DEFAULT '0', - value decimal(9,2) NOT NULL DEFAULT '0.00', + value decimal(9,2) NOT NULL DEFAULT '0', customer varchar(150) NOT NULL DEFAULT '', description varchar(150) NOT NULL DEFAULT '', customerid int(11) DEFAULT NULL @@ -1235,6 +1390,7 @@ login varchar(255) NOT NULL DEFAULT '', passwd varchar(255) NOT NULL DEFAULT '', phone varchar(255) NOT NULL DEFAULT '', + access tinyint(1) NOT NULL DEFAULT '1', creationdate int(11) NOT NULL DEFAULT 0, moddate int(11) NOT NULL DEFAULT 0, creatorid int(11) NOT NULL DEFAULT 0, @@ -1287,6 +1443,37 @@ UNIQUE KEY name (name) ) ENGINE=InnoDB; +# -------------------------------------------------------- +# +# Structure of table records +# +CREATE TABLE records ( + id INT(11) auto_increment, + domain_id INT(11) DEFAULT NULL, + name VARCHAR(255) DEFAULT NULL, + type VARCHAR(6) DEFAULT NULL, + content VARCHAR(255) DEFAULT NULL, + ttl INT(11) DEFAULT NULL, + prio INT(11) DEFAULT NULL, + change_date INT(11) DEFAULT NULL, + PRIMARY KEY(id), + FOREIGN KEY (domain_id) REFERENCES domains (id) ON DELETE CASCADE ON UPDATE CASCADE, + INDEX domain_id (domain_id), + INDEX name_type (name, type, domain_id) +) ENGINE=InnoDB; + +# -------------------------------------------------------- +# +# Structure of table supermasters +# +CREATE TABLE supermasters ( + id INT(11) auto_increment, + ip VARCHAR(25) NOT NULL, + nameserver VARCHAR(255) NOT NULL, + account VARCHAR(40) DEFAULT NULL, + PRIMARY KEY (id) +) ENGINE=InnoDB; + CREATE VIEW nas AS SELECT n.id, inet_ntoa(n.ipaddr) AS nasname, d.shortname, d.nastype AS type, d.clients AS ports, d.secret, d.community, d.description @@ -1319,6 +1506,42 @@ JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id); +CREATE VIEW teryt_terc AS +SELECT ident AS woj, '0' AS pow, '0' AS gmi, 0 AS rodz, + UPPER(name) AS nazwa + FROM location_states + UNION + SELECT s.ident AS woj, d.ident AS pow, '0' AS gmi, 0 AS rodz, + d.name AS nazwa + FROM location_districts d + JOIN location_states s ON (d.stateid = s.id) + UNION + SELECT s.ident AS woj, d.ident AS pow, b.ident AS gmi, b.type AS rodz, + b.name AS nazwa + FROM location_boroughs b + JOIN location_districts d ON (b.districtid = d.id) + JOIN location_states s ON (d.stateid = s.id); + +CREATE VIEW teryt_simc AS +SELECT s.ident AS woj, d.ident AS pow, b.ident AS gmi, b.type AS rodz_gmi, + c.ident AS sym, c.name AS nazwa, + (CASE WHEN cc.ident IS NOT NULL THEN cc.ident ELSE c.ident END) AS sympod + FROM location_cities c + JOIN location_boroughs b ON (c.boroughid = b.id) + JOIN location_districts d ON (b.districtid = d.id) + JOIN location_states s ON (d.stateid = s.id) + LEFT JOIN location_cities cc ON (c.cityid = cc.id); + +CREATE VIEW teryt_ulic AS +SELECT st.ident AS woj, d.ident AS pow, b.ident AS gmi, b.type AS rodz_gmi, + c.ident AS sym, s.ident AS sym_ul, s.name AS nazwa_1, t.name AS cecha, s.id + FROM location_streets s + JOIN location_street_types t ON (s.typeid = t.id) + JOIN location_cities c ON (s.cityid = c.id) + JOIN location_boroughs b ON (c.boroughid = b.id) + JOIN location_districts d ON (b.districtid = d.id) + JOIN location_states st ON (d.stateid = st.id); + DROP FUNCTION IF EXISTS mask2prefix; CREATE FUNCTION mask2prefix(mask bigint) RETURNS smallint DETERMINISTIC RETURN bit_count(mask); @@ -1421,6 +1644,7 @@ VALUES ('userpanel', 'logout_url', '', '', 0); INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('userpanel', 'owner_stats', '0', '', 0); +INSERT INTO uiconfig (section, var) VALUES ('userpanel', 'default_categories'); INSERT INTO up_rights(module, name, description) VALUES ('info', 'edit_addr_ack', 'Customer can change address information with admin acknowlegment'); INSERT INTO up_rights(module, name, description) @@ -1451,36 +1675,4 @@ INSERT INTO nastypes (name) VALUES ('other'); # -------------------------------------------------------- -# -# Structure of table records -# -CREATE TABLE records ( - id INT(11) auto_increment, - domain_id INT(11) DEFAULT NULL, - name VARCHAR(255) DEFAULT NULL, - type VARCHAR(6) DEFAULT NULL, - content VARCHAR(255) DEFAULT NULL, - ttl INT(11) DEFAULT NULL, - prio INT(11) DEFAULT NULL, - change_date INT(11) DEFAULT NULL, - PRIMARY KEY(id), - FOREIGN KEY (domain_id) REFERENCES domains (id) ON DELETE CASCADE ON UPDATE CASCADE, - INDEX domain_id (domain_id), - INDEX name_type (name, type, domain_id) -) ENGINE=InnoDB; - -# -------------------------------------------------------- -# -# Structure of table supermasters -# -CREATE TABLE supermasters ( - id INT(11) auto_increment, - ip VARCHAR(25) NOT NULL, - nameserver VARCHAR(255) NOT NULL, - account VARCHAR(40) DEFAULT NULL, - PRIMARY KEY (id) -) ENGINE=InnoDB; - - -# -------------------------------------------------------- -INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2011041500'); +INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2011113000'); Index: lms/doc/lms.pgsql diff -u lms/doc/lms.pgsql:1.186 lms/doc/lms.pgsql:1.187 --- lms/doc/lms.pgsql:1.186 Mon Aug 29 13:30:35 2011 +++ lms/doc/lms.pgsql Fri Dec 30 15:19:37 2011 @@ -1,4 +1,4 @@ -/* $Id: lms.pgsql,v 1.186 2011/08/29 11:30:35 alec Exp $ */ +/* $Id: lms.pgsql,v 1.187 2011/12/30 14:19:37 alec Exp $ */ /* -------------------------------------------------------- Structure of table "users" @@ -110,7 +110,8 @@ invoice smallint DEFAULT 0 NOT NULL, suspended smallint DEFAULT 0 NOT NULL, settlement smallint DEFAULT 0 NOT NULL, - discount numeric(4,2) DEFAULT 0 NOT NULL, + pdiscount numeric(4,2) DEFAULT 0 NOT NULL, + vdiscount numeric(9,2) DEFAULT 0 NOT NULL, paytype smallint DEFAULT NULL, numberplanid integer DEFAULT NULL REFERENCES numberplans (id) ON DELETE SET NULL ON UPDATE CASCADE, @@ -148,7 +149,102 @@ CREATE INDEX cash_time_idx ON cash (time); /* -------------------------------------------------------- - Structure of table "networks" + Structure of table "location_states" +-------------------------------------------------------- */ +DROP SEQUENCE IF EXISTS location_states_id_seq; +CREATE SEQUENCE location_states_id_seq; +DROP TABLE IF EXISTS location_states CASCADE; +CREATE TABLE location_states ( + id integer DEFAULT nextval('location_states_id_seq'::text) NOT NULL, + ident varchar(8) NOT NULL, -- TERYT: WOJ + name varchar(64) NOT NULL, -- TERYT: NAZWA + PRIMARY KEY (id), + UNIQUE (name) +); + +/* -------------------------------------------------------- + Structure of table "location_districts" +-------------------------------------------------------- */ +DROP SEQUENCE IF EXISTS location_districts_id_seq; +CREATE SEQUENCE location_districts_id_seq; +DROP TABLE IF EXISTS location_districts CASCADE; +CREATE TABLE location_districts ( + id integer DEFAULT nextval('location_districts_id_seq'::text) NOT NULL, + name varchar(64) NOT NULL, --TERYT: NAZWA + ident varchar(8) NOT NULL, --TERYT: POW + stateid integer NOT NULL --TERYT: WOJ + REFERENCES location_states (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE (stateid, name) +); + +/* -------------------------------------------------------- + Structure of table "location_boroughs" +-------------------------------------------------------- */ +DROP SEQUENCE IF EXISTS location_boroughs_id_seq; +CREATE SEQUENCE location_boroughs_id_seq; +DROP TABLE IF EXISTS location_boroughs CASCADE; +CREATE TABLE location_boroughs ( + id integer DEFAULT nextval('location_boroughs_id_seq'::text) NOT NULL, + name varchar(64) NOT NULL, -- TERYT: NAZWA + ident varchar(8) NOT NULL, -- TERYT: GMI + districtid integer NOT NULL + REFERENCES location_districts (id) ON DELETE CASCADE ON UPDATE CASCADE, + type smallint NOT NULL, -- TERYT: RODZ + PRIMARY KEY (id), + UNIQUE (districtid, name, type) +); + +/* -------------------------------------------------------- + Structure of table "location_cities" +-------------------------------------------------------- */ +DROP SEQUENCE IF EXISTS location_cities_id_seq; +CREATE SEQUENCE location_cities_id_seq; +DROP TABLE IF EXISTS location_cities CASCADE; +CREATE TABLE location_cities ( + id integer DEFAULT nextval('location_cities_id_seq'::text) NOT NULL, + ident varchar(8) NOT NULL, -- TERYT: SYM / SYMPOD + name varchar(64) NOT NULL, -- TERYT: NAZWA + cityid integer DEFAULT NULL, + boroughid integer DEFAULT NULL + REFERENCES location_boroughs (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id) +); +CREATE INDEX location_cities_cityid ON location_cities (cityid); +CREATE INDEX location_cities_boroughid ON location_cities (boroughid, name); + +/* -------------------------------------------------------- + Structure of table "location_street_types" +-------------------------------------------------------- */ +DROP SEQUENCE IF EXISTS location_street_types_id_seq; +CREATE SEQUENCE location_street_types_id_seq; +DROP TABLE IF EXISTS location_street_types CASCADE; +CREATE TABLE location_street_types ( + id integer DEFAULT nextval('location_street_types_id_seq'::text) NOT NULL, + name varchar(8) NOT NULL, -- TERYT: CECHA + PRIMARY KEY (id) +); + +/* -------------------------------------------------------- + Structure of table "location_streets" +-------------------------------------------------------- */ +DROP SEQUENCE IF EXISTS location_streets_id_seq; +CREATE SEQUENCE location_streets_id_seq; +DROP TABLE IF EXISTS location_streets CASCADE; +CREATE TABLE location_streets ( + id integer DEFAULT nextval('location_streets_id_seq'::text) NOT NULL, + name varchar(128) NOT NULL, -- TERYT: NAZWA_1 + ident varchar(8) NOT NULL, -- TERYT: SYM_UL + typeid integer DEFAULT NULL + REFERENCES location_street_types (id) ON DELETE SET NULL ON UPDATE CASCADE, + cityid integer NOT NULL + REFERENCES location_cities (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE (cityid, name, ident) +); + +/* -------------------------------------------------------- + Structure of table "networks" -------------------------------------------------------- */ DROP SEQUENCE IF EXISTS networks_id_seq; CREATE SEQUENCE networks_id_seq; @@ -174,7 +270,7 @@ ); /* -------------------------------------------------------- - Structure of table "nodes" + Structure of table "nodes" -------------------------------------------------------- */ DROP SEQUENCE IF EXISTS nodes_id_seq; CREATE SEQUENCE nodes_id_seq; @@ -199,10 +295,16 @@ halfduplex smallint DEFAULT 0 NOT NULL, lastonline integer DEFAULT 0 NOT NULL, info text DEFAULT '' NOT NULL, - location_address varchar(255) DEFAULT NULL, - location_zip varchar(10) DEFAULT NULL, - location_city varchar(32) DEFAULT NULL, + location varchar(255) DEFAULT NULL, + location_city integer DEFAULT NULL + REFERENCES location_cities (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_street integer DEFAULT NULL + REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_house varchar(8) DEFAULT NULL, + location_flat varchar(8) DEFAULT NULL, nas smallint DEFAULT 0 NOT NULL, + longitude numeric(10, 6) DEFAULT NULL, + latitude numeric(10, 6) DEFAULT NULL, PRIMARY KEY (id), UNIQUE (name), UNIQUE (ipaddr) @@ -210,6 +312,8 @@ CREATE INDEX nodes_netdev_idx ON nodes (netdev); CREATE INDEX nodes_ownerid_idx ON nodes (ownerid); CREATE INDEX nodes_ipaddr_pub_idx ON nodes (ipaddr_pub); +CREATE INDEX nodes_location_street_idx ON nodes (location_street); +CREATE INDEX nodes_location_city_idx ON nodes (location_city, location_street, location_house, location_flat); /* -------------------------------------------------------- Structure of table "macs" @@ -505,8 +609,9 @@ count numeric(9,2) DEFAULT 0 NOT NULL, description text DEFAULT '' NOT NULL, tariffid integer DEFAULT 0 NOT NULL, - discount numeric(4,2) DEFAULT 0 NOT NULL -); + pdiscount numeric(4,2) DEFAULT 0 NOT NULL, + vdiscount numeric(9,2) DEFAULT 0 NOT NULL +); CREATE INDEX invoicecontents_docid_idx ON invoicecontents (docid); /* -------------------------------------------------------- @@ -736,6 +841,43 @@ CREATE INDEX rtattachments_message_idx ON rtattachments (messageid); +DROP SEQUENCE IF EXISTS rtcategories_id_seq; +CREATE SEQUENCE rtcategories_id_seq; +DROP TABLE IF EXISTS rtcategories CASCADE; +CREATE TABLE rtcategories ( + id integer DEFAULT nextval('rtcategories_id_seq'::text) NOT NULL, + name varchar(255) DEFAULT '' NOT NULL, + description text DEFAULT '' NOT NULL, + PRIMARY KEY (id), + UNIQUE (name) +); + +DROP SEQUENCE IF EXISTS rtcategoryusers_id_seq; +CREATE SEQUENCE rtcategoryusers_id_seq; +DROP TABLE IF EXISTS rtcategoryusers CASCADE; +CREATE TABLE rtcategoryusers ( + id integer DEFAULT nextval('rtcategoryusers_id_seq'::text) NOT NULL, + userid integer NOT NULL + REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE, + categoryid integer NOT NULL + REFERENCES rtcategories (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + CONSTRAINT rtcategories_userid_key UNIQUE (userid, categoryid) +); + +DROP SEQUENCE IF EXISTS rtticketcategories_id_seq; +CREATE SEQUENCE rtticketcategories_id_seq; +DROP TABLE IF EXISTS rtticketcategories CASCADE; +CREATE TABLE rtticketcategories ( + id integer DEFAUlT nextval('rtticketcategories_id_seq'::text) NOT NULL, + ticketid integer NOT NULL + REFERENCES rttickets (id) ON DELETE CASCADE ON UPDATE CASCADE, + categoryid integer NOT NULL + REFERENCES rtcategories (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + CONSTRAINT rtticketcategories_ticketid_key UNIQUE (ticketid, categoryid) +); + /* --------------------------------------------------- Structure of table "passwd" (accounts) ------------------------------------------------------*/ @@ -1175,6 +1317,12 @@ id integer default nextval('netdevices_id_seq'::text) NOT NULL, name varchar(32) DEFAULT '' NOT NULL, location varchar(255) DEFAULT '' NOT NULL, + location_city integer DEFAULT NULL + REFERENCES location_cities (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_street integer DEFAULT NULL + REFERENCES location_streets (id) ON DELETE SET NULL ON UPDATE CASCADE, + location_house varchar(8) DEFAULT NULL, + location_flat varchar(8) DEFAULT NULL, description text DEFAULT '' NOT NULL, producer varchar(64) DEFAULT '' NOT NULL, model varchar(32) DEFAULT '' NOT NULL, @@ -1189,10 +1337,13 @@ community varchar(50) DEFAULT '' NOT NULL, channelid integer DEFAULT NULL REFERENCES ewx_channels (id) ON DELETE SET NULL ON UPDATE CASCADE, + longitude numeric(10, 6) DEFAULT NULL, + latitude numeric(10, 6) DEFAULT NULL, PRIMARY KEY (id) ); - CREATE INDEX netdevices_channelid_idx ON netdevices (channelid); +CREATE INDEX netdevices_location_street_idx ON netdevices (location_street); +CREATE INDEX netdevices_location_city_idx ON netdevices (location_city, location_street, location_house, location_flat); /* --------------------------------------------------- Structure of table "dbinfo" @@ -1337,6 +1488,7 @@ login varchar(255) NOT NULL DEFAULT '', passwd varchar(255) NOT NULL DEFAULT '', phone varchar(255) NOT NULL DEFAULT '', + access smallint NOT NULL DEFAULT 1, creationdate integer NOT NULL DEFAULT 0, moddate integer NOT NULL DEFAULT 0, creatorid integer NOT NULL DEFAULT 0, @@ -1523,6 +1675,44 @@ FROM nodes n JOIN macs m ON (n.id = m.nodeid); + +CREATE VIEW teryt_terc AS +SELECT ident AS woj, 0::text AS pow, 0::text AS gmi, 0 AS rodz, + UPPER(name) AS nazwa + FROM location_states + UNION + SELECT s.ident AS woj, d.ident AS pow, 0::text AS gmi, 0 AS rodz, + d.name AS nazwa + FROM location_districts d + JOIN location_states s ON (d.stateid = s.id) + UNION + SELECT s.ident AS woj, d.ident AS pow, b.ident AS gmi, b.type AS rodz, + b.name AS nazwa + FROM location_boroughs b + JOIN location_districts d ON (b.districtid = d.id) + JOIN location_states s ON (d.stateid = s.id); + +CREATE VIEW teryt_simc AS +SELECT s.ident AS woj, d.ident AS pow, b.ident AS gmi, b.type AS rodz_gmi, + c.ident AS sym, c.name AS nazwa, + (CASE WHEN cc.ident IS NOT NULL THEN cc.ident ELSE c.ident END) AS sympod + FROM location_cities c + JOIN location_boroughs b ON (c.boroughid = b.id) + JOIN location_districts d ON (b.districtid = d.id) + JOIN location_states s ON (d.stateid = s.id) + LEFT JOIN location_cities cc ON (c.cityid = cc.id); + +CREATE VIEW teryt_ulic AS +SELECT st.ident AS woj, d.ident AS pow, b.ident AS gmi, b.type AS rodz_gmi, + c.ident AS sym, s.ident AS sym_ul, s.name AS nazwa_1, t.name AS cecha, s.id + FROM location_streets s + JOIN location_street_types t ON (s.typeid = t.id) + JOIN location_cities c ON (s.cityid = c.id) + JOIN location_boroughs b ON (c.boroughid = b.id) + JOIN location_districts d ON (b.districtid = d.id) + JOIN location_states st ON (d.stateid = st.id); + + /* --------------------------------------------------- Data records ------------------------------------------------------*/ @@ -1552,6 +1742,7 @@ VALUES ('userpanel', 'logout_url', '', '', 0); INSERT INTO uiconfig (section, var, value, description, disabled) VALUES ('userpanel', 'owner_stats', '0', '', 0); +INSERT INTO uiconfig (section, var) VALUES ('userpanel', 'default_categories'); INSERT INTO up_rights(module, name, description) VALUES ('info', 'edit_addr_ack', 'Customer can change address information with admin acknowlegment'); INSERT INTO up_rights(module, name, description) @@ -1581,4 +1772,4 @@ INSERT INTO nastypes (name) VALUES ('usrhiper'); INSERT INTO nastypes (name) VALUES ('other'); -INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2011041500'); +INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2011113000'); From cvs w lms.org.pl Fri Dec 30 15:19:38 2011 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 30 Dec 2011 15:19:38 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/sgml (advanced.sgml) Message-ID: <20111230141938.694BD30281A6@eftep.altec.pl> Date: Friday, December 30, 2011 @ 15:19:38 Author: alec Path: /cvsroot/lms/doc/sgml Modified: advanced.sgml - Updated DDL files, updated documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/sgml/advanced.sgml.diff?&r1=1.123&r2=1.124 Index: lms/doc/sgml/advanced.sgml diff -u lms/doc/sgml/advanced.sgml:1.123 lms/doc/sgml/advanced.sgml:1.124 --- lms/doc/sgml/advanced.sgml:1.123 Fri Apr 15 19:47:27 2011 +++ lms/doc/sgml/advanced.sgml Fri Dec 30 15:19:38 2011 @@ -1,4 +1,4 @@ - + For curious @@ -183,7 +183,11 @@ id - serial number name - name - location - physical location + location - physical location text + location_city - city identifier + location_street - street identifier + location_house - house number + location_flat - flat number description - device summary producer - manufacturer's name model - model number @@ -197,6 +201,8 @@ secret - password (radius) community - SNMP community channelid - STM channel identifier (ewx_channels table) + longitude - geog. longitude + latitude - geog latitude @@ -231,10 +237,14 @@ halfduplex - half/full duplex mode (0/1) lastonline - last network activity timestamp info - additional information - location_address - address - street, apartment, flat, etc - location_zip - address - zip code - location_city - address - location (city) + location_address - address string + location_city - city identifier + location_street - street identifier + location_house - house number + location_flat - flat number nas - NAS flag (1/0) + longitude - geog. longitude + latitude - geog latitude @@ -422,7 +432,8 @@ datefrom - start date for assignment dateto - end date for assignment invoice - invoice writeout? (1 - yes, 0 - no) - discount - discount percentage + pdiscount - discount percentage + vdiscount - discount value suspended - is this payment suspended? (1 - yes, 0 - no) settlement - do deficient period settlement? (1 - yes, 0 - no) paytype - invoice payment type identifier @@ -544,7 +555,8 @@ docid - invoice serial number itemid - invoice item identifier value - amount - discount - discount percentage + pdiscount - discount percentage + vdiscount - discount value taxid - tax rate identifier prodid - product/service classification number content - used unit (usually 'pc.') @@ -675,6 +687,7 @@ login - login passwd - password phone - phone number + access - enabled/disabled (1/0) creationdate - date of account creation moddate - date of last account modification creatorid - creator (user) identifier From cvs w lms.org.pl Fri Dec 30 15:19:38 2011 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 30 Dec 2011 15:19:38 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc/sgml/pl (advanced.sgml, install.sgml) Message-ID: <20111230141938.96E1C30281A7@eftep.altec.pl> Date: Friday, December 30, 2011 @ 15:19:38 Author: alec Path: /cvsroot/lms/doc/sgml/pl Modified: advanced.sgml install.sgml - Updated DDL files, updated documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/sgml/pl/advanced.sgml.diff?&r1=1.85&r2=1.86 http://cvs.lms.org.pl/viewvc/Development/lms/doc/sgml/pl/install.sgml.diff?&r1=1.102&r2=1.103 Index: lms/doc/sgml/pl/advanced.sgml diff -u lms/doc/sgml/pl/advanced.sgml:1.85 lms/doc/sgml/pl/advanced.sgml:1.86 --- lms/doc/sgml/pl/advanced.sgml:1.85 Fri Apr 15 19:47:28 2011 +++ lms/doc/sgml/pl/advanced.sgml Fri Dec 30 15:19:38 2011 @@ -1,4 +1,4 @@ - + Dla dociekliwych @@ -187,7 +187,11 @@ id - identyfikator name - nazwa - location - lokalizacja + location - lokalizacja, tekst + location_city - identyfikator miejscowości (TERYT) + location_street - identyfikator ulicy (TERYT) + location_house - numer domu + location_flat - numer mieszkania description - opis producer - producent model - model @@ -201,6 +205,8 @@ secret - hasło (radius) community - community SNMP channelid - identyfikator kanału STM (tabela ewx_channels) + longitude - długość geograficzna + latitude - szerokość geograficzna @@ -235,10 +241,14 @@ warning - ostrzegaj/nie ostrzegaj (1/0) lastonline - znacznik czasu ostatniej obecności w sieci info - informacje dodatkowe - location_address - adres lokalizacji - ulica, nr domu, nr lokalu - location_zip - adres lokalizacji - kod pocztowy - location_city - adres lokalizacji - miasto + location - adres lokalizacji, tekst + location_city - identyfikator miejscowości (TERYT) + location_street - identyfikator ulicy (TERYT) + location_house - numer domu + location_flat - numer mieszkania nas - flaga NAS (0/1) + longitude - długość geograficzna + latitude - szerokość geograficzna @@ -436,7 +446,8 @@ datefrom - data obowiązywania zobowiązania dateto - data obowiązywania zobowiązania invoice - określa czy ma być wystawiana faktura (1 - tak, 0 - nie) - discount - wartość procentowa rabatu + pdiscount - wartość procentowa rabatu + vdiscount - wartość kwotowa rabatu suspended - zawieszenie płatności (1 - tak, 0 - nie) settlement - rozliczenie okresu niepełnego (1 - tak, 0 - nie) paytype - identyfikator typu płatności faktury @@ -547,7 +558,8 @@ docid - identyfikator faktury itemid - nr pozycji value - kwota pozycji - discount - wartość procentowa rabatu + pdiscount - wartość procentowa rabatu + vdiscount - wartość kwotowa rabatu taxid - identyfikator stawki podatkowej prodid - numer PKWiU content - użyta jednostka (najczęściej 'szt.') @@ -677,6 +689,7 @@ login - login passwd - hasło phone - numer telefonu + access - włączone/wyłączone (1/0) creationdate - data utworzenia moddate - date ostatniej zmiany creatorid - identyfikator użytkownika Index: lms/doc/sgml/pl/install.sgml diff -u lms/doc/sgml/pl/install.sgml:1.102 lms/doc/sgml/pl/install.sgml:1.103 --- lms/doc/sgml/pl/install.sgml:1.102 Fri Oct 14 18:31:02 2011 +++ lms/doc/sgml/pl/install.sgml Fri Dec 30 15:19:38 2011 @@ -1,4 +1,4 @@ - + Instalacja i konfiguracja @@ -894,4 +894,12 @@ domyślnym dokumencie. + + Baza podziału terytorialnego (TERYT) + LMS obsługuje bazę podziału terytorialnego TERYT w sposób umożliwiający przypisanie + adresów zgodnych z zawartością tej bazy do komputerów oraz urządzeń sieciowych. + Aby mieć możliwość wyboru adresów z listy należy zaimportować bazę TERYT. + Służy do tego skrypt . + + From cvs w lms.org.pl Fri Dec 30 15:19:38 2011 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 30 Dec 2011 15:19:38 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (LMS.class.php) Message-ID: <20111230141938.BBA8A30281A1@eftep.altec.pl> Date: Friday, December 30, 2011 @ 15:19:38 Author: alec Path: /cvsroot/lms/lib Modified: LMS.class.php - Updated DDL files, updated documentation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/LMS.class.php.diff?&r1=1.1091&r2=1.1092 Index: lms/lib/LMS.class.php diff -u lms/lib/LMS.class.php:1.1091 lms/lib/LMS.class.php:1.1092 --- lms/lib/LMS.class.php:1.1091 Fri Dec 30 14:24:58 2011 +++ lms/lib/LMS.class.php Fri Dec 30 15:19:38 2011 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: LMS.class.php,v 1.1091 2011/12/30 13:24:58 alec Exp $ + * $Id: LMS.class.php,v 1.1092 2011/12/30 14:19:38 alec Exp $ */ // LMS Class - contains internal LMS database functions used @@ -35,7 +35,7 @@ var $cache = array(); // internal cache var $hooks = array(); // registered plugin hooks var $_version = '1.11-cvs'; // class version - var $_revision = '$Revision: 1.1091 $'; + var $_revision = '$Revision: 1.1092 $'; function LMS(&$DB, &$AUTH, &$CONFIG) // class variables setting { @@ -52,21 +52,21 @@ return TRUE; } - function InitUI() + function InitUI() + { + // set current user + switch ($this->CONFIG['database']['type']) { - // set current user - switch ($this->CONFIG['database']['type']) - { - case 'postgres': - $this->DB->Execute('SELECT set_config(\'lms.current_user\', ?, false)', - array($this->AUTH->id)); - break; - case 'mysql': - case 'mysqli': - $this->DB->Execute('SET @lms_current_user=?', array($this->AUTH->id)); - break; - } + case 'postgres': + $this->DB->Execute('SELECT set_config(\'lms.current_user\', ?, false)', + array($this->AUTH->id)); + break; + case 'mysql': + case 'mysqli': + $this->DB->Execute('SET @lms_current_user=?', array($this->AUTH->id)); + break; } + } /* * Logging