Skip to content

Commit

Permalink
documents: copy division data to documents
Browse files Browse the repository at this point in the history
  • Loading branch information
chilek committed Oct 24, 2013
1 parent 6f7da9c commit 9d58511
Show file tree
Hide file tree
Showing 11 changed files with 285 additions and 33 deletions.
18 changes: 15 additions & 3 deletions bin/lms-payments
Expand Up @@ -559,15 +559,27 @@ while(my $assign = $dbq->fetchrow_hashref())
FROM customers WHERE id = ?");
$udbq->execute($uid);
my $urow = $udbq->fetchrow_hashref();

my $ddbq = $dbase->prepare("SELECT name, address, city, zip, countryid, ten, regon, account, inv_header, inv_footer, inv_author, inv_cplace
FROM divisions WHERE id = ?");
$ddbq -> execute($urow->{'divisionid'});
my $drow = $ddbq->fetchrow_hashref();

my $paytime = $urow->{'paytime'};
if($paytime eq -1) { $paytime = $deadline; }

my $idbq = $dbase->prepare("INSERT INTO documents (number, numberplanid, type, countryid, divisionid,
customerid, name, address, zip, city, ten, ssn, cdate, sdate, paytime, paytype)
VALUES (?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
customerid, name, address, zip, city, ten, ssn, cdate, sdate, paytime, paytype,
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)
VALUES (?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");

$idbq->execute($numbers{$plan}, $plan, $urow->{'countryid'}, $urow->{'divisionid'}, $uid,
$urow->{'lastname'}.' '.$urow->{'name'}, $urow->{'address'}, $urow->{'zip'},
$urow->{'city'}, $urow->{'ten'}, $urow->{'ssn'}, $currtime, $saledate, $paytime, $inv_paytype);
$urow->{'city'}, $urow->{'ten'}, $urow->{'ssn'}, $currtime, $saledate, $paytime, $inv_paytype,
$drow->{'name'}, $drow->{'address'}, $drow->{'city'}, $drow->{'zip'}, $drow->{'countryid'},
$drow->{'ten'}, $drow->{'regon'}, $drow->{'account'}, $drow->{'inv_header'}, $drow->{'inv_footer'},
$drow->{'inv_author'}, $drow->{'inv_cplace'});

$idbq = $dbase->prepare("SELECT id FROM documents
WHERE cdate = ? AND number = ? AND type = 1 AND customerid = ?");
Expand Down
26 changes: 23 additions & 3 deletions bin/lms-payments.php
Expand Up @@ -484,15 +484,35 @@ function get_period($period)

$customer = $DB->GetRow("SELECT lastname, name, address, city, zip, ssn, ten, countryid, divisionid, paytime
FROM customers WHERE id = $cid");

$division = $this->DB->GetRow('SELECT name, address, city, zip, countryid, ten, regon,
account, inv_header, inv_footer, inv_author, inv_cplace
FROM divisions WHERE id = ? ;',array($customer['divisionid']));

$paytime = $customer['paytime'];
if ($paytime == -1) $paytime = $deadline;

$DB->Execute("INSERT INTO documents (number, numberplanid, type, countryid, divisionid,
customerid, name, address, zip, city, ten, ssn, cdate, sdate, paytime, paytype)
VALUES(?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
customerid, name, address, zip, city, ten, ssn, cdate, sdate, paytime, paytype,
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)
VALUES(?, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
array($numbers[$plan], $plan, $customer['countryid'], $customer['divisionid'], $cid,
$customer['lastname']." ".$customer['name'], $customer['address'], $customer['zip'],
$customer['city'], $customer['ten'], $customer['ssn'], $currtime, $saledate, $paytime, $inv_paytype));
$customer['city'], $customer['ten'], $customer['ssn'], $currtime, $saledate, $paytime, $inv_paytype,
($division['name'] ? $division['name'] : ''),
($division['address'] ? $division['address'] : ''),
($division['city'] ? $division['city'] : ''),
($division['zip'] ? $division['zip'] : ''),
($division['countryid'] ? $division['countryid'] : 0),
($division['ten'] ? $division['ten'] : ''),
($division['regon'] ? $division['regon'] : ''),
($division['account'] ? $division['account'] : ''),
($division['inv_header'] ? $division['inv_header'] : ''),
($division['inv_footer'] ? $division['inv_footer'] : ''),
($division['inv_author'] ? $division['inv_author'] : ''),
($division['inv_cplace'] ? $division['inv_cplace'] : ''),
));

$invoices[$cid] = $DB->GetLastInsertID("documents");
$paytypes[$cid] = $inv_paytype;
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -182,6 +182,7 @@ version ? (????-??-??):
- add attachments support for new tickets [chilan]
- multi attachments for new tickets and new ticket messages [chilan]
- helpdesk messages: image attachment preview in popup [chilan]
- documents: copy division data to documents [michu006/chilan]

version 1.11.13 Dira (2011-04-07)

Expand Down
14 changes: 13 additions & 1 deletion doc/lms.mysql
Expand Up @@ -348,6 +348,18 @@ CREATE TABLE documents (
closed tinyint(1) NOT NULL DEFAULT '0',
reference int(11) NOT NULL DEFAULT '0',
reason varchar(255) NOT NULL DEFAULT '',
div_name text NOT NULL DEFAULT '',
div_address varchar(255) NOT NULL DEFAULT '',
div_city varchar(255) NOT NULL DEFAULT '',
div_zip varchar(255) NOT NULL DEFAULT '',
div_countryid int(11) NOT NULL DEFAULT '0',
div_ten varchar(255) NOT NULL DEFAULT '',
div_regon varchar(255) NOT NULL DEFAULT '',
div_account varchar(48) NOT NULL DEFAULT '',
div_inv_header text NOT NULL DEFAULT '',
div_inv_footer text NOT NULL DEFAULT '',
div_inv_author text NOT NULL DEFAULT '',
div_inv_cplace text NOT NULL DEFAULT '',
PRIMARY KEY (id),
INDEX cdate (cdate),
INDEX numberplanid (numberplanid),
Expand Down Expand Up @@ -1845,4 +1857,4 @@ INSERT INTO nastypes (name) VALUES ('usrhiper');
INSERT INTO nastypes (name) VALUES ('other');

# --------------------------------------------------------
INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2013051700');
INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2013101400');
14 changes: 13 additions & 1 deletion doc/lms.pgsql
Expand Up @@ -620,6 +620,18 @@ CREATE TABLE documents (
closed smallint DEFAULT 0 NOT NULL,
reference integer DEFAULT 0 NOT NULL,
reason varchar(255) DEFAULT '' NOT NULL,
div_name text DEFAULT '' NOT NULL,
div_address varchar(255) DEFAULT '' NOT NULL,
div_city varchar(255) DEFAULT '' NOT NULL,
div_zip varchar(255) DEFAULT '' NOT NULL,
div_countryid integer DEFAULT 0 NOT NULL,
div_ten varchar(255) DEFAULT '' NOT NULL,
div_regon varchar(255) DEFAULT '' NOT NULL,
div_account varchar(48) DEFAULT '' NOT NULL,
div_inv_header text DEFAULT '' NOT NULL,
div_inv_footer text DEFAULT '' NOT NULL,
div_inv_author text DEFAULT '' NOT NULL,
div_inv_cplace text DEFAULT '' NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX documents_cdate_idx ON documents(cdate);
Expand Down Expand Up @@ -1946,4 +1958,4 @@ INSERT INTO nastypes (name) VALUES ('tc');
INSERT INTO nastypes (name) VALUES ('usrhiper');
INSERT INTO nastypes (name) VALUES ('other');

INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2013051700');
INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2013101400');
53 changes: 35 additions & 18 deletions lib/LMS.class.php
Expand Up @@ -2654,7 +2654,11 @@ function AddInvoice($invoice) {
$sdate = $invoice['invoice']['sdate'] ? $invoice['invoice']['sdate'] : $currtime;
$number = $invoice['invoice']['number'];
$type = $invoice['invoice']['type'];


$division = $this->DB->GetRow('SELECT name, address, city, zip, countryid, ten, regon,
account, inv_header, inv_footer, inv_author, inv_cplace
FROM divisions WHERE id = ? ;',array($invoice['customer']['divisionid']));

$args = array(
'number' => $number,
$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_NUMPLAN] => $invoice['invoice']['numberplanid'] ? $invoice['invoice']['numberplanid'] : 0,
Expand All @@ -2673,19 +2677,34 @@ function AddInvoice($invoice) {
'city' => $invoice['customer']['city'],
$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_COUNTRY] => $invoice['customer']['countryid'],
$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_DIV] => $invoice['customer']['divisionid'],
'div_name' => ($division['name'] ? $division['name'] : ''),
'div_address' => ($division['address'] ? $division['address'] : ''),
'div_city' => ($division['city'] ? $division['city'] : ''),
'div_zip' => ($division['zip'] ? $division['zip'] : ''),
'div_' . $SYSLOG_RESOURCE_KEYS[SYSLOG_RES_COUNTRY] => ($division['countryid'] ? $division['countryid'] : 0),
'div_ten'=> ($division['ten'] ? $division['ten'] : ''),
'div_regon' => ($division['regon'] ? $division['regon'] : ''),
'div_account' => ($division['account'] ? $division['account'] : ''),
'div_inv_header' => ($division['inv_header'] ? $division['inv_header'] : ''),
'div_inv_footer' => ($division['inv_footer'] ? $division['inv_footer'] : ''),
'div_inv_author' => ($division['inv_author'] ? $division['inv_author'] : ''),
'div_inv_cplace' => ($division['inv_cplace'] ? $division['inv_cplace'] : ''),
);

$this->DB->Execute('INSERT INTO documents (number, numberplanid, type,
cdate, sdate, paytime, paytype, userid, customerid, name, address,
ten, ssn, zip, city, countryid, divisionid)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array_values($args));
ten, ssn, zip, city, countryid, divisionid,
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)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array_values($args));
$iid = $this->DB->GetLastInsertID('documents');
if ($this->SYSLOG) {
unset($args[$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_USER]]);
$args[$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_DOC]] = $iid;
$this->SYSLOG->AddMessage(SYSLOG_RES_DOC, SYSLOG_OPER_ADD, $args,
array($SYSLOG_RESOURCE_KEYS[SYSLOG_RES_DOC], $SYSLOG_RESOURCE_KEYS[SYSLOG_RES_NUMPLAN],
$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_CUST], $SYSLOG_RESOURCE_KEYS[SYSLOG_RES_COUNTRY],
$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_DIV]));
$SYSLOG_RESOURCE_KEYS[SYSLOG_RES_DIV], 'div_' . $SYSLOG_RESOURCE_KEYS[SYSLOG_RES_COUNTRY]));
}

$itemid = 0;
Expand Down Expand Up @@ -2827,18 +2846,17 @@ function GetInvoiceContent($invoiceid) {
d.ten, d.ssn, d.cdate, d.sdate, d.paytime, d.paytype, d.numberplanid,
d.closed, d.reference, d.reason, d.divisionid,
(SELECT name FROM users WHERE id = d.userid) AS user, n.template,
ds.name AS division_name, ds.shortname AS division_shortname,
ds.address AS division_address, ds.zip AS division_zip,
ds.city AS division_city, ds.countryid AS division_countryid,
ds.ten AS division_ten, ds.regon AS division_regon, ds.account AS account,
ds.inv_header AS division_header, ds.inv_footer AS division_footer,
ds.inv_author AS division_author, ds.inv_cplace AS division_cplace,
d.div_name AS division_name, d.div_name AS division_shortname,
d.div_address AS division_address, d.div_zip AS division_zip,
d.div_city AS division_city, d.div_countryid AS division_countryid,
d.div_ten AS division_ten, d.div_regon AS division_regon, d.div_account AS account,
d.div_inv_header AS division_header, d.div_inv_footer AS division_footer,
d.div_inv_author AS division_author, d.div_inv_cplace AS division_cplace,
c.pin AS customerpin, c.divisionid AS current_divisionid,
c.post_name, c.post_address, c.post_zip, c.post_city, c.post_countryid
FROM documents d
JOIN customers c ON (c.id = d.customerid)
LEFT JOIN countries cn ON (cn.id = d.countryid)
LEFT JOIN divisions ds ON (ds.id = d.divisionid)
LEFT JOIN numberplans n ON (d.numberplanid = n.id)
WHERE d.id = ? AND (d.type = ? OR d.type = ?)', array($invoiceid, DOC_INVOICE, DOC_CNOTE))) {
$result['pdiscount'] = 0;
Expand Down Expand Up @@ -2947,18 +2965,17 @@ function GetNoteContent($id) {
d.userid, d.address, d.zip, d.city, d.countryid, cn.name AS country,
d.ten, d.ssn, d.cdate, d.numberplanid, d.closed, d.divisionid, d.paytime,
(SELECT name FROM users WHERE id = d.userid) AS user, n.template,
ds.name AS division_name, ds.shortname AS division_shortname,

This comment has been minimized.

Copy link
@netarea

netarea Mar 31, 2014

Contributor

Dane wystawcy z tabeli divisions

ds.address AS division_address, ds.zip AS division_zip,
ds.city AS division_city, ds.countryid AS division_countryid,
ds.ten AS division_ten, ds.regon AS division_regon, ds.account AS account,
ds.inv_header AS division_header, ds.inv_footer AS division_footer,
ds.inv_author AS division_author, ds.inv_cplace AS division_cplace,
d.div_name AS division_name, d.div_name AS division_shortname,

This comment has been minimized.

Copy link
@netarea

netarea Mar 31, 2014

Contributor

Dane wystawcy z tabeli documents

d.div_address AS division_address, d.div_zip AS division_zip,
d.div_city AS division_city, d.div_countryid AS division_countryid,
d.div_ten AS division_ten, d.div_regon AS division_regon, d.div_account AS account,
d.div_inv_header AS division_header, d.div_inv_footer AS division_footer,
d.div_inv_author AS division_author, d.div_inv_cplace AS division_cplace,
c.pin AS customerpin, c.divisionid AS current_divisionid,
c.post_name, c.post_address, c.post_zip, c.post_city, c.post_countryid
FROM documents d
JOIN customers c ON (c.id = d.customerid)
LEFT JOIN countries cn ON (cn.id = d.countryid)
LEFT JOIN divisions ds ON (ds.id = d.divisionid)
LEFT JOIN numberplans n ON (d.numberplanid = n.id)
WHERE d.id = ? AND d.type = ?', array($id, DOC_DNOTE))) {
$result['value'] = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/upgradedb.php
Expand Up @@ -24,7 +24,7 @@
* $Id$
*/

define('DBVERSION', '2013051700'); // here should be always the newest version of database!
define('DBVERSION', '2013101400'); // here should be always the newest version of database!
// it placed here to avoid read disk every time when we call this file.

/*
Expand Down
71 changes: 71 additions & 0 deletions lib/upgradedb/mysql.2013101400.php
@@ -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();
?>
71 changes: 71 additions & 0 deletions lib/upgradedb/postgres.2013101400.php
@@ -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

@netarea
Copy link
Contributor

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

@chilek
Copy link
Owner Author

@chilek chilek commented on 9d58511 Mar 31, 2014

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?

@netarea
Copy link
Contributor

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ć.

@frychlich
Copy link

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

@chilek
Copy link
Owner Author

@chilek chilek commented on 9d58511 Apr 1, 2014

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.

Please sign in to comment.