W dniu 20.04.2012 18:18, JOYNET napisał(a):
eksport faktur probuje sobie zrobic ekport faktur z finanse --> eksport --> Rejestr sprzedaży
tylko chcialbym dodac do tego jeszcze numer yahoo (imessengers.uid)
z kontaktow klienta
zrobilem w tym celu patcha do pliku modules/export.php, ale cos w nim nie gra, moze ktos na to wpadnie:
Nie może to działać skoro ładujesz wyniki zapytania pod $docs, a potem pobierasz z $row. Spróbuj zastąpić $row['nrvf'] poprzez $doc['nrfv'].
@@ -208,8 +208,9 @@ ORDER BY cdate, docid', array(DOC_INVOICE, DOC_CNOTE, $unixfrom, $unixto));
// get documents data
- $docs = $DB->GetAllByKey('SELECT documents.id AS id, number,
cdate, customerid, userid, name, address, zip, city, ten, ssn, template, reference, extnumber, paytime, closed
- $docs = $DB->GetAllByKey('SELECT documents.id AS id,
imessengers.uid AS nrfv, number, cdate, customerid, userid, name, address, zip, city, ten, ssn, template, reference, extnumber, paytime, closed FROM documents
- LEFT JOIN imessengers ON (imessengers.customerid =
documents.customerid) AND (imessengers.type = 1) LEFT JOIN numberplans ON numberplanid = numberplans.id WHERE (type = ? OR type = ?) AND (cdate BETWEEN ? AND ?) ', 'id', array(DOC_INVOICE, DOC_CNOTE, $unixfrom, $unixto));
@@ -288,6 +289,7 @@ $line = str_replace('%CITY', $doc['city'], $line); $line = str_replace('%TEN', $doc['ten'], $line); $line = str_replace('%SSN', $doc['ssn'], $line);
- $line = str_replace('%nr_fv', $row['nrvf'], $line);
// $line = str_replace('%DESC', $row['description'], $line); $line = str_replace('%VALUE', form_num($rec['brutto']), $line); $line = str_replace('%ABSVALUE', str_replace('-','',form_num($rec['brutto'])), $line);