Widziałem wątek, gdzie ktoś się pytał o import płatności po numerze umowy (domyślnie przez numer id klienta).
Jeżeli jeszcze ktoś jest zainteresowany takim importem to pisać, nie chcę się niepotrzebnie pocić i pisać :).
$patterns[] = array(
'id' => NULL, // import source identifier (from 'cashsources' table)
'pattern' => "/^2,([0-9]{8}),([0-9]+),([0-9]+),([0-9]+),([0-9][0-9](\s[0-9][0-9][0-9][0-9]){6}),\"([^\"]+)\",\"([^\"]+)\",\"([0-9]+)\"/",
'pid' => 2, // 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' => 7, // name position
'plastname' => 7, // forename position
'pvalue' => 4, // value position
'pcomment' => 8, // operation comment position
'pdate' => 1, // date position
'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' => 0.01, // if not zero do value = value * modvalue
'use_line_hash' => FALSE, // 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
);