Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
/* | ||
* LMS version 1.11-git | ||
* | ||
* (C) Copyright 2001-2013 LMS Developers | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License Version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
* USA. | ||
* | ||
*/ | ||
|
||
$DB->BeginTrans(); | ||
|
||
$DB->Execute("ALTER TABLE documents ADD div_name TEXT NOT NULL DEFAULT '';"); // pełna nazwa firmy | ||
$DB->Execute("ALTER TABLE documents ADD div_address VARCHAR (255) NOT NULL DEFAULT '';"); // adres firmy | ||
$DB->Execute("ALTER TABLE documents ADD div_city VARCHAR (255) NOT NULL DEFAULT '';"); // miasto | ||
$DB->Execute("ALTER TABLE documents ADD div_zip VARCHAR (255) NOT NULL DEFAULT '';"); // kod pocztowy | ||
$DB->Execute("ALTER TABLE documents ADD div_countryid INT (11) NOT NULL DEFAULT 0;"); | ||
$DB->Execute("ALTER TABLE documents ADD div_ten VARCHAR (255) NOT NULL DEFAULT '';"); // nip | ||
$DB->Execute("ALTER TABLE documents ADD div_regon VARCHAR (255) NOT NULL DEFAULT '';"); // regon | ||
$DB->Execute("ALTER TABLE documents ADD div_account VARCHAR (48) NOT NULL DEFAULT '';"); // nr konta bankowego | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_header TEXT NOT NULL DEFAULT '';"); // nagłówek faktury | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_footer TEXT NOT NULL DEFAULT '';"); // stopka faktury | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_author TEXT NOT NULL DEFAULT '';"); // kto wystawił | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_cplace TEXT NOT NULL DEFAULT '';"); // miejsce wystawienia | ||
|
||
$dl = $DB->GetAll('SELECT id, name, address, city, zip, countryid, ten, regon, | ||
account, inv_header, inv_footer, inv_author, inv_cplace | ||
FROM divisions;'); | ||
|
||
$count = sizeof($dl); | ||
|
||
if ($dl) for ($i=0; $i<$count; $i++) { | ||
|
||
$DB->Execute("UPDATE documents SET div_name = ?, div_address = ?, div_city = ?, div_zip = ?, | ||
div_countryid = ?, div_ten = ?, div_regon = ?, div_account = ?, div_inv_header = ?, | ||
div_inv_footer = ?, div_inv_author = ?, div_inv_cplace = ? | ||
WHERE divisionid = ? ;",array( | ||
($dl[$i]['name'] ? $dl[$i]['name'] : ''), | ||
($dl[$i]['address'] ? $dl[$i]['address'] : ''), | ||
($dl[$i]['city'] ? $dl[$i]['city'] : ''), | ||
($dl[$i]['zip'] ? $dl[$i]['zip'] : ''), | ||
($dl[$i]['countryid'] ? $dl[$i]['countryid'] : 0), | ||
($dl[$i]['ten'] ? $dl[$i]['ten'] : ''), | ||
($dl[$i]['regon'] ? $dl[$i]['regon'] : ''), | ||
($dl[$i]['account'] ? $dl[$i]['account'] : ''), | ||
($dl[$i]['inv_header'] ? $dl[$i]['inv_header'] : ''), | ||
($dl[$i]['inv_footer'] ? $dl[$i]['inv_footer'] : ''), | ||
($dl[$i]['inv_author'] ? $dl[$i]['inv_author'] : ''), | ||
($dl[$i]['inv_cplace'] ? $dl[$i]['inv_cplace'] : ''), | ||
$dl[$i]['id'] | ||
) | ||
); | ||
|
||
} | ||
|
||
$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013101400', 'dbversion')); | ||
$DB->CommitTrans(); | ||
?> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
/* | ||
* LMS version 1.11-git | ||
* | ||
* (C) Copyright 2001-2013 LMS Developers | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License Version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
* USA. | ||
* | ||
*/ | ||
|
||
$DB->BeginTrans(); | ||
|
||
$DB->Execute("ALTER TABLE documents ADD div_name TEXT NOT NULL DEFAULT '';"); // pełna nazwa firmy | ||
$DB->Execute("ALTER TABLE documents ADD div_address VARCHAR (255) NOT NULL DEFAULT '';"); // adres firmy | ||
$DB->Execute("ALTER TABLE documents ADD div_city VARCHAR (255) NOT NULL DEFAULT '';"); // miasto | ||
$DB->Execute("ALTER TABLE documents ADD div_zip VARCHAR (255) NOT NULL DEFAULT '';"); // kod pocztowy | ||
$DB->Execute("ALTER TABLE documents ADD div_countryid INTEGER NOT NULL DEFAULT '0';"); | ||
$DB->Execute("ALTER TABLE documents ADD div_ten VARCHAR (255) NOT NULL DEFAULT '';"); // nip | ||
$DB->Execute("ALTER TABLE documents ADD div_regon VARCHAR (255) NOT NULL DEFAULT '';"); // regon | ||
$DB->Execute("ALTER TABLE documents ADD div_account VARCHAR (48) NOT NULL DEFAULT '';"); // nr konta bankowego | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_header TEXT NOT NULL DEFAULT '';"); // nagłówek faktury | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_footer TEXT NOT NULL DEFAULT '';"); // stopka faktury | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_author TEXT NOT NULL DEFAULT '';"); // kto wystawił | ||
$DB->Execute("ALTER TABLE documents ADD div_inv_cplace TEXT NOT NULL DEFAULT '';"); // miejsce wystawienia | ||
|
||
$dl = $DB->GetAll('SELECT id, name, address, city, zip, countryid, ten, regon, | ||
account, inv_header, inv_footer, inv_author, inv_cplace | ||
FROM divisions;'); | ||
|
||
$count = sizeof($dl); | ||
|
||
if ($dl) for ($i=0; $i<$count; $i++) { | ||
|
||
$DB->Execute("UPDATE documents SET div_name = ?, div_address = ?, div_city = ?, div_zip = ?, | ||
div_countryid = ?, div_ten = ?, div_regon = ?, div_account = ?, div_inv_header = ?, | ||
div_inv_footer = ?, div_inv_author = ?, div_inv_cplace = ? | ||
WHERE divisionid = ? ;",array( | ||
($dl[$i]['name'] ? $dl[$i]['name'] : ''), | ||
($dl[$i]['address'] ? $dl[$i]['address'] : ''), | ||
($dl[$i]['city'] ? $dl[$i]['city'] : ''), | ||
($dl[$i]['zip'] ? $dl[$i]['zip'] : ''), | ||
($dl[$i]['countryid'] ? $dl[$i]['countryid'] : 0), | ||
($dl[$i]['ten'] ? $dl[$i]['ten'] : ''), | ||
($dl[$i]['regon'] ? $dl[$i]['regon'] : ''), | ||
($dl[$i]['account'] ? $dl[$i]['account'] : ''), | ||
($dl[$i]['inv_header'] ? $dl[$i]['inv_header'] : ''), | ||
($dl[$i]['inv_footer'] ? $dl[$i]['inv_footer'] : ''), | ||
($dl[$i]['inv_author'] ? $dl[$i]['inv_author'] : ''), | ||
($dl[$i]['inv_cplace'] ? $dl[$i]['inv_cplace'] : ''), | ||
$dl[$i]['id'] | ||
) | ||
); | ||
|
||
} | ||
|
||
$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2013101400', 'dbversion')); | ||
$DB->CommitTrans(); | ||
?> |
5 comments
on commit 9d58511
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/LMS.class.php zmieniono metodę GetNoteContent tak by dane wystawcy pobierała z pól tabeli documents. Wystawiane noty obciążeniowe nie wypełniają tych pól przy dodawaniu dokumentu. Przez to wystawione noty nie zawierają zmiennych z danymi wystawcy noty.
9d58511#commitcomment-5851039
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Komentujesz commit czy robisz coś innego?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nic innego nie robię. Chciałem tylko zakreślić problem by łatwiej było go rozwiązać.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zapomnieliście o ds.shortname AS division_shortname,
aktualnie jako shortname jest pełna nazwa, co powoduje że na małym odcinku drukuje się pełna nazwa firmy, zamiast skrócona jak było dotychczas, brak kolumny div_shortname w tabeli documents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Słusznie - dodałem przed chwilą kopiowanie i tego, istotnego pola.
Dane wystawcy z tabeli divisions