mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Migliorie su import fattura elettronica
This commit is contained in:
parent
1dda24dbe9
commit
fafa068cca
@ -41,7 +41,17 @@ switch (filter('op')) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'generate':
|
case 'generate':
|
||||||
$fattura_pa = new FatturaElettronica(post('filename'));
|
$filename = post('filename');
|
||||||
|
|
||||||
|
//Processo il file ricevuto
|
||||||
|
$process_result = Interaction::processXML($filename);
|
||||||
|
if($process_result!=''){
|
||||||
|
flash()->error($process_result);
|
||||||
|
redirect(ROOTDIR.'/controller.php?id_module='.$id_module);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fattura_pa = new FatturaElettronica($filename);
|
||||||
|
|
||||||
$id_record = $fattura_pa->saveFattura(post('pagamento'), post('id_segment'), post('id_tipo'));
|
$id_record = $fattura_pa->saveFattura(post('pagamento'), post('id_segment'), post('id_tipo'));
|
||||||
$fattura_pa->saveRighe(post('articoli'), post('iva'), post('conto'));
|
$fattura_pa->saveRighe(post('articoli'), post('iva'), post('conto'));
|
||||||
|
@ -125,7 +125,7 @@ if (!empty($righe)) {
|
|||||||
echo '
|
echo '
|
||||||
<h4>
|
<h4>
|
||||||
'.tr('Righe').'
|
'.tr('Righe').'
|
||||||
<button type="button" class="btn btn-info btn-sm pull-right" onclick="copy()"><i class="fa fa-copy"></i> '.tr('Copia IVA e conto dalla prima riga').'</button>
|
<button type="button" class="btn btn-info btn-sm pull-right" onclick="copy()"><i class="fa fa-copy"></i> '.tr('Copia dati contabili dalla prima riga').'</button>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
@ -135,8 +135,7 @@ if (!empty($righe)) {
|
|||||||
<th>'.tr('Descrizione').'</th>
|
<th>'.tr('Descrizione').'</th>
|
||||||
<th width="10%">'.tr('Q.tà').'</th>
|
<th width="10%">'.tr('Q.tà').'</th>
|
||||||
<th width="10%">'.tr('Prezzo unitario').'</th>
|
<th width="10%">'.tr('Prezzo unitario').'</th>
|
||||||
<th width="15%">'.tr('Iva associata').'*</th>
|
<th width="15%">'.tr('Dati contabili').'*</th>
|
||||||
<th width="15%">'.tr('Conto').'*</th>
|
|
||||||
<th width="25%">'.tr('Articolo').'</th>
|
<th width="25%">'.tr('Articolo').'</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
@ -155,10 +154,9 @@ if (!empty($righe)) {
|
|||||||
<td>'.Translator::numberToLocale($riga['Quantita']).' '.$riga['UnitaMisura'].'</td>
|
<td>'.Translator::numberToLocale($riga['Quantita']).' '.$riga['UnitaMisura'].'</td>
|
||||||
<td>'.Translator::numberToLocale($riga['PrezzoUnitario']).' €<small class="help-block">Aliquota iva: '.$riga['AliquotaIVA'].'%</small></td>
|
<td>'.Translator::numberToLocale($riga['PrezzoUnitario']).' €<small class="help-block">Aliquota iva: '.$riga['AliquotaIVA'].'%</small></td>
|
||||||
<td>
|
<td>
|
||||||
{[ "type": "select", "name": "iva['.$key.']", "values": "query='.str_replace('"', '\"', $query).'", "required": 1 ]}
|
{[ "type": "select", "name": "iva['.$key.']", "values": "query='.str_replace('"', '\"', $query).'", "required": 1, "placeholder": "Aliquota iva" ]}
|
||||||
</td>
|
<br>
|
||||||
<td>
|
{[ "type": "select", "name": "conto['.$key.']", "ajax-source": "conti-acquisti", "required": 1, "placeholder": "Conto acquisti" ]}
|
||||||
{[ "type": "select", "name": "conto['.$key.']", "ajax-source": "conti-acquisti", "required": 1 ]}
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{[ "type": "select", "name": "articoli['.$key.']", "ajax-source": "articoli", "class": "", "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
|
{[ "type": "select", "name": "articoli['.$key.']", "ajax-source": "articoli", "class": "", "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
|
||||||
|
@ -44,4 +44,9 @@ UPDATE `zz_emails` SET `cc` = 'sdi24@pec.fatturapa.it' WHERE `zz_emails`.`name`
|
|||||||
ALTER TABLE `co_preventivi` ADD `codice_cig` VARCHAR(15) AFTER `master_revision`, ADD `codice_cup` VARCHAR(15) AFTER `codice_cig`, ADD `id_documento_fe` VARCHAR(20) AFTER `codice_cup`;
|
ALTER TABLE `co_preventivi` ADD `codice_cig` VARCHAR(15) AFTER `master_revision`, ADD `codice_cup` VARCHAR(15) AFTER `codice_cig`, ADD `id_documento_fe` VARCHAR(20) AFTER `codice_cup`;
|
||||||
|
|
||||||
-- Migliorata visualizzazione impostazione
|
-- Migliorata visualizzazione impostazione
|
||||||
UPDATE `zz_settings` SET `tipo` = 'query=SELECT codice AS id, CONCAT_WS(\' - \', codice, descrizione) AS descrizione FROM fe_causali_pagamento_ritenuta' WHERE `zz_settings`.`nome` = 'Causale ritenuta d\'acconto';
|
UPDATE `zz_settings` SET `tipo` = 'query=SELECT codice AS id, CONCAT_WS(\' - \', codice, descrizione) AS descrizione FROM fe_causali_pagamento_ritenuta' WHERE `zz_settings`.`nome` = 'Causale ritenuta d\'acconto';
|
||||||
|
|
||||||
|
UPDATE `fe_stati_documento` SET `descrizione`='In elaborazione' WHERE `codice`='WAIT';
|
||||||
|
|
||||||
|
INSERT INTO `fe_stati_documento`( `codice`, `descrizione`, `icon` ) VALUES
|
||||||
|
( 'ERVAL', 'Errore di validazione', 'fa fa-edit text-danger' );
|
Loading…
x
Reference in New Issue
Block a user