Compare commits
6 Commits
432d781ce2
...
4b8a12e164
Author | SHA1 | Date |
---|---|---|
Pek5892 | 4b8a12e164 | |
Pek5892 | 137a5e6ffe | |
Pek5892 | 8c20974e5b | |
Pek5892 | 01cf1379d0 | |
Pek5892 | 158d463232 | |
Pek5892 | d2bdd6cc19 |
|
@ -799,9 +799,7 @@ class Fattura extends Document
|
|||
$pagamento = $this->pagamento;
|
||||
|
||||
if ($pagamento->isRiBa()) {
|
||||
$banca = Banca::where('id_anagrafica', $this->idanagrafica)
|
||||
->where('predefined', 1)
|
||||
->first();
|
||||
$banca = Banca::find($this->id_banca_controparte) ?: Banca::where('id_anagrafica', $this->idanagrafica)->where('predefined', 1)->first();;
|
||||
} else {
|
||||
$banca = Banca::find($this->id_banca_azienda);
|
||||
}
|
||||
|
|
|
@ -74,10 +74,10 @@ echo '
|
|||
<input type="hidden" name="id_record" value="'.$id_record.'">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
{[ "type": "select", "label": "'.tr('Tags').'", "multiple": "1", "name": "tags[]", "values": "query=SELECT `id`, `name` as descrizione FROM `in_tags` ORDER BY `name`", "value": "'.implode(',', $tags).'", "icon-after": "add|'.(new Module())->getByField('title', 'Tags').'|" ]}
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="col-md-4">
|
||||
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` ='.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "$idstatointervento$", "class": "unblockable" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1662,8 +1662,8 @@ class FatturaElettronica
|
|||
$co_scadenziario = $database->fetchArray('SELECT * FROM `co_scadenziario` WHERE `iddocumento` = '.prepare($documento['id']));
|
||||
foreach ($co_scadenziario as $scadenza) {
|
||||
$co_pagamenti = Pagamento::find($scadenza['id_pagamento']);
|
||||
$banca = Banca::find($scadenza['id_banca_azienda']);
|
||||
|
||||
$banca = ($co_pagamenti->isRiBa()) ? Banca::find($scadenza['id_banca_controparte']) ?: Banca::where('id_anagrafica', $scadenza['idanagrafica'])->where('predefined', 1)->first() : Banca::find($scadenza['id_banca_azienda']);
|
||||
|
||||
$pagamento = [
|
||||
'ModalitaPagamento' => $co_pagamenti['codice_modalita_pagamento_fe'],
|
||||
'DataScadenzaPagamento' => $scadenza['scadenza'],
|
||||
|
|
|
@ -56,6 +56,10 @@ class Autofill
|
|||
$count += substr_count($text, PHP_EOL);
|
||||
$count += substr_count($text, '<br>');
|
||||
|
||||
// Ricerca dei caratteri a capo
|
||||
preg_match_all("/(\r\n|\r|\n)/", $text, $matches);
|
||||
$count += count($matches[0]);
|
||||
|
||||
if ($small) {
|
||||
$count = $count / 3;
|
||||
}
|
||||
|
|
|
@ -26,10 +26,7 @@ $prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
|||
|
||||
// Creazione righe fantasma
|
||||
$autofill = new Util\Autofill(6, 40);
|
||||
$rows_per_page = $fattura_accompagnatoria ? 13 : 18;
|
||||
if (!empty($options['last-page-footer'])) {
|
||||
$rows_per_page += 7;
|
||||
}
|
||||
$rows_per_page = $fattura_accompagnatoria ? 13 : 25;
|
||||
$autofill->setRows($rows_per_page);
|
||||
|
||||
// Intestazione tabella per righe
|
||||
|
@ -55,6 +52,13 @@ if (setting('Raggruppa attività per tipologia in fattura')) {
|
|||
$righe = $documento->getRighe();
|
||||
}
|
||||
|
||||
if (count($righe) > 25) {
|
||||
if (!empty($options['last-page-footer'])) {
|
||||
$rows_per_page += 5;
|
||||
$autofill->setRows($rows_per_page);
|
||||
}
|
||||
}
|
||||
|
||||
$num = 0;
|
||||
|
||||
if (!setting('Visualizza riferimento su ogni riga in stampa')) {
|
||||
|
|
Loading…
Reference in New Issue