Parser csv-inteligo
------------------------------------------
<?php
/*
* LMS version 1.11-cvs
*
* (C) Copyright 2001-2011 LMS Developers
*
* Please, see the doc/AUTHORS for more information about authors!
*
* 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.
*
* $Id: cashimportcfg.php,v 1.18++inteligo 2011/01/18 08:12:20 alec Exp $
*/
$patterns[] = array(
'id' => NULL, // import source identifier (from 'cashsources' table)
'pattern' => "/^\"([0-9]+)\",\"(2[0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9])\",\"2[0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]\",\"Przelew na rachunek\",\"\+(\d+,\d+)\",\"PLN\",\".+,[0-9]{2}\",\"[0-9]+\",\"([^\"]+)\",\"[^\"]+\",\"([^\"]+)\",\".+:(.+)\"/",
'pid' => 0, // customer ID position in expression
// if zero - we try to search ID by regexp,
// invoice number or customer name and forename in entire line
'pname' => 4, // name position
'plastname' => 4, // forename position
'pvalue' => 3, // value position
'pcomment' => 6, // operation comment position
'pdate' => 2, // date position
'importid' => 1,
'date_regexp' => '/(20[0-9][0-9])-([0-1][0-9])-([0-3][0-9])/',
'pday' => 3,
'pmonth' => 2,
'pyear' => 1,
'pid_regexp' => '/.*ID[:\-\/]([0-9]{0,4}).*/i', // if 'pid' is not specified
// try to find it by regexp
'invoice_regexp' => '/.*(\d+)\/LMS\/([0-9]{4}).*/',// format of invoice number
// default %N/LMS/%Y
'pinvoice_number' => 1, // position of invoice number in $invoice_regexp
'pinvoice_year' => 2, // year position in $invoice_regexp
'pinvoice_month' => 0, // month position in $invoice_regexp
'encoding' => 'WINDOWS-1250', // imported data encoding (for conversion)
'modvalue' => 1.00, // if not zero do value = value * modvalue
'use_line_hash' => TRUE, // create md5 hash for whole import line instead of
// time, value, customer name and comment
'line_idx_hash' => FALSE, // include line number into hash data
);
?>
------------------------------------------
Miłosz
re
UWAGA !!!
w skrypcie który wysłalem jest błąd, kwoty importowane sa tylko do przecinka zamiast 39.32 tylko 39.
przepraszam za usterki, pośpiech jak zawsze niewskazany
pozdrawiam
Łukasz Łuczak
Administrator sieci MAXNET
jeszcze wyjdzie tal jak ostatnio, że znowu wrócą do poprzedniej wersji
Inteligo - najbardziej niestabilny system, znowu pozmieniali. Tym razem
nie
idzie się nawet zalogować.
Miłosz
W dniu 22 marca 2012 12:08 użytkownik Łukasz Łuczak
<lukasz@maxnet.66.pl>napisał:
witam_______________________________________________
skrypt poprawiony działa, jednak u mnie problem z polskimi znakami, jak
ktoś może zerknąć to będę wdzięczny
skrypt jest z moja modyfikacja, dla niezainteresowanych trzeba sobie
wywalić modyfikacje.
btw. no i co do 27 :)
Pozdrawiam
Łukasz Łuczak
Administrator sieci MAXNET
_______________________________________________
lms mailing list
lms@lists.lms.org.pl
http://lists.lms.org.pl/mailman/listinfo/lms
lms mailing list
lms@lists.lms.org.pl
http://lists.lms.org.pl/mailman/listinfo/lms
_______________________________________________
lms mailing list
lms@lists.lms.org.pl
http://lists.lms.org.pl/mailman/listinfo/lms
_______________________________________________
lms mailing list
lms@lists.lms.org.pl
http://lists.lms.org.pl/mailman/listinfo/lms