| '.$langs->trans('Date').' | '; + print ''.$langs->trans('provider').' | '; + print ''.$langs->trans('EInvDirection').' | '; + print ''.$langs->trans('Status').' | '; + print ''.$langs->trans('Comments').' | '; + print ''.$langs->trans('EInvValidationStatus').' | '; + print '
|---|---|---|---|---|---|
| '.dol_print_date($evt['date_creation'], 'dayhour').' | '; + print ''.dol_escape_htmltag((string) $evt['provider']).' | '; + print ''.($isOut ? img_picto($langs->trans('EInvDirectionOut'), 'sign-out', 'class="paddingright"') : img_picto($langs->trans('EInvDirectionIn'), 'sign-in-alt', 'class="paddingright"')).dol_escape_htmltag(strtoupper((string) $evt['direction'])).' | '; + print ''.dol_escape_htmltag($einvoicing->getStatusLabel((int) $evt['lc_status'])); + if (!empty($evt['lc_reason_code'])) { + print ' ('.dol_escape_htmltag((string) $evt['lc_reason_code']).')'; + } + print ' | '; + print ''.dol_escape_htmltag((string) $evt['lc_status_message']);
+ if (!empty($evt['lc_validation_message'])) {
+ print ' '.dol_escape_htmltag((string) $evt['lc_validation_message']).''; + } + print ' | ';
+ print ''; + // lc_validation_status is only filled for outbound ('out') events; an inbound row has it + // empty by construction and that must not be read as a failed validation. + if ($isOut && !empty($evt['lc_validation_status'])) { + print dol_escape_htmltag((string) $evt['lc_validation_status']); + } + print ' | '; + print '
| '.$langs->trans('EInvNoLifecycleEvent').' | |||||
| '.$langs->trans("ThirdParty").' | '.$langs->trans("MatchedOn").' | ||||
|---|---|---|---|---|---|
| '.dol_escape_htmltag($cinfo['name']).' (#'.((int) $csocid).') | '; - print ''.dol_escape_htmltag(implode(', ', array_keys($cinfo['crit']))).' | '; - print ''.$langs->trans("AssociateWithThisThirdparty").' → | '; + print ''.dol_escape_htmltag($cinfo['name']).' (#'.((int) $csocid).') | '; + print ''.dol_escape_htmltag(implode(', ', array_keys($cinfo['crit']))).' | '; + print ''.$langs->trans("AssociateWithThisThirdparty").' → | '; print '
| '.$langs->trans("Field").' | '; print ''.$langs->trans("ValueFromInvoice").' | '; @@ -630,8 +635,7 @@ if (!$anyapplicable) { print ''; -print $form->select_company($search_socid, 'search_socid', '(s.fournisseur:=:1)', '1', 0, 0, array(), 0, 'maxwidth200'); +// Form::select_company() does not read this filter the same way on every version. Until Dolibarr 18 +// the criteria is appended to the query as it stands, so it has to be plain SQL; from 18 a criteria +// holding parentheses is converted by forgeSQLFromUniversalSearchCriteria(), and on 24 that conversion +// is no longer conditional - every criteria goes through it. Passing the Universal Search syntax to 17 +// therefore ends the page on "DB_ERROR_SYNTAX ... near ':=:1))'", and passing plain SQL to 24 would be +// mangled the other way round. +$vendorfilter = ((float) DOL_VERSION < 18) ? 's.fournisseur = 1' : '(s.fournisseur:=:1)'; +print $form->select_company($search_socid, 'search_socid', $vendorfilter, '1', 0, 0, array(), 0, 'maxwidth200'); print ' | '; print ''; print ' | '; |
|---|