Stavo provando a generare più linee, ed ho visto che in alcuni file xml di altri programmi, ci sono i
i DatiRiepilogo quante volte sono le DettaglioLinee. ho provato questo, ma non va =(
foreach ($invoice->field()->get() as $key => $field) {
/** Dettaglio linee, foreach Invoice as Field */
$FatturaElettronica->setValues('DettaglioLinee[' . ($key + 1) . ']', array(
'NumeroLinea' => ($key + 1),
'Descrizione' => $field->description,
'Quantita' => $field->quantity . '.00',
'PrezzoUnitario' => $field->amount,
'PrezzoTotale' => $field->total,
'AliquotaIVA' => $field->vat . '.00',
));
/** Dati Riepilogo, foreach Invoice as Field */
$FatturaElettronica->setValues('DatiRiepilogo[' . ($key + 1) . ']', array(
'AliquotaIVA' => $field->vat . '.00',
'ImponibileImporto' => $field->total,
'Imposta' => $field->total_vat,
'EsigibilitaIVA' => ($invoice->split_pyment > 0) ? 'S' : 'I'
));
}