if ( is_array( $this -> fakturownia_last_summary ) && isset( $this -> fakturownia_last_summary['summary'] ) ): ?>
Ostatni import: = $esc( $this -> fakturownia_last_summary['at'] ?? '-' ); ?>
Zaimportowano: = (int)( $this -> fakturownia_last_summary['summary']['imported'] ?? 0 ); ?>,
pominieto: = (int)( $this -> fakturownia_last_summary['summary']['skipped'] ?? 0 ); ?>,
brak mapowan: = (int)( $this -> fakturownia_last_summary['summary']['unmapped'] ?? 0 ); ?>,
bledy: = (int)( $this -> fakturownia_last_summary['summary']['errors'] ?? 0 ); ?>
endif; ?>
if ( is_array( $this -> fakturownia_pending_clients ) && count( $this -> fakturownia_pending_clients ) ): ?>
Brakujace mapowania klientow
| Klient z Fakturowni |
CRM klient |
Akcja |
foreach ( $this -> fakturownia_pending_clients as $row ): ?>
= $esc( $row['external_name'] ); ?>
$payload = is_array( $row['payload'] ?? null ) ? $row['payload'] : []; ?>
if ( !empty( $payload['tax_no'] ) ): ?>
NIP: = $esc( $payload['tax_no'] ); ?>
endif; ?>
if ( !empty( $payload['document_number'] ) ): ?>
Ostatnia faktura: = $esc( $payload['document_number'] ); ?>
endif; ?>
if ( !empty( $payload['positions'] ) && is_array( $payload['positions'] ) ): ?>
$positions = $payload['positions']; ?>
$shown = array_slice( $positions, 0, 10 ); ?>
Pozycje z faktury:
foreach ( $shown as $positionName ): ?>
- = $esc( $positionName ); ?>
endforeach; ?>
if ( count( $positions ) > count( $shown ) ): ?>
- ... i = count( $positions ) - count( $shown ); ?> wiecej
endif; ?>
endif; ?>
Klucz: = $esc( $row['external_key'] ); ?> | wystapienia: = (int)$row['hits']; ?>
|
|
|
endforeach; ?>
endif; ?>
if ( is_array( $this -> fakturownia_pending_items ) && count( $this -> fakturownia_pending_items ) ): ?>
Brakujace mapowania produktow/uslug
| Pozycja z faktury |
Kategoria finansowa (mapuje globalnie) |
Akcja |
$renderedRows = 0; ?>
foreach ( $this -> fakturownia_pending_items as $itemIdx => $row ): ?>
$payload = is_array( $row['payload'] ?? null ) ? $row['payload'] : []; ?>
$occurrences = ( isset( $payload['occurrences'] ) && is_array( $payload['occurrences'] ) ) ? $payload['occurrences'] : []; ?>
if ( empty( $occurrences ) ) continue; ?>
$saveFormId = 'fi-save-' . $itemIdx; ?>
$occCount = count( $occurrences ); ?>
foreach ( $occurrences as $occIdx => $occ ): ?>
$isFirst = $occIdx === 0; ?>
= $esc( $row['external_name'] ); ?>
if ( !empty( $occ['document_number'] ) ): ?>
Faktura: = $esc( $occ['document_number'] ); ?> (ID = $esc( $occ['document_id'] ?? '' ); ?>)
endif; ?>
if ( !empty( $occ['buyer_name'] ) || !empty( $occ['seller_name'] ) ): ?>
Nabywca: = $esc( $occ['buyer_name'] ?? '-' ); ?> |
Sprzedawca: = $esc( $occ['seller_name'] ?? '-' ); ?>
endif; ?>
if ( $isFirst ): ?>
Klucz: = $esc( $row['external_key'] ); ?> | wystapien w kolejce: = $occCount; ?>
endif; ?>
|
if ( $isFirst ): ?>
if ( $occCount > 1 ): ?>
Zapis mapowania kategorii rozwiazuje wszystkie = $occCount; ?> wystapien tej pozycji.
endif; ?>
|
endif; ?>
|
$renderedRows++; ?>
endforeach; ?>
endforeach; ?>
if ( $renderedRows === 0 ): ?>
| (brak wystapien do rozwiazania) |
endif; ?>
endif; ?>