Fix logica creazione fattura e ddt da ordine

This commit is contained in:
Bacca97 2018-08-01 18:45:32 +02:00
parent 08f9d4792b
commit 74c0109175
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
if (!in_array($records[0]['stato'], ['Bozza', 'Evaso', 'Fatturato'])) { if (!in_array($records[0]['stato'], ['Evaso', 'Fatturato'])) {
echo ' echo '
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-info dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <button class="btn btn-info dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
@ -11,7 +11,7 @@ if (!in_array($records[0]['stato'], ['Bozza', 'Evaso', 'Fatturato'])) {
</button> </button>
<ul class="dropdown-menu dropdown-menu-right">'; <ul class="dropdown-menu dropdown-menu-right">';
if (in_array($records[0]['stato'], ['Parzialmente evaso'])){ if (in_array($records[0]['stato'], ['Bozza', 'Parzialmente evaso'])){
echo ' echo '
<li> <li>
<a data-href="'.$rootdir.'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-toggle="modal" data-title="'.tr('Crea ddt').'" data-target="#bs-popup"><i class="fa fa-file-o"></i>&nbsp;'.tr('ddt').' <a data-href="'.$rootdir.'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-toggle="modal" data-title="'.tr('Crea ddt').'" data-target="#bs-popup"><i class="fa fa-file-o"></i>&nbsp;'.tr('ddt').'
@ -19,7 +19,7 @@ if (!in_array($records[0]['stato'], ['Bozza', 'Evaso', 'Fatturato'])) {
</li>'; </li>';
} }
if (in_array($records[0]['stato'], ['Parzialmente fatturato'])){ if (in_array($records[0]['stato'], ['Bozza', 'Parzialmente fatturato'])){
echo ' echo '
<li> <li>
<a data-href="'.$rootdir.'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-toggle="modal" data-title="'.tr('Crea fattura').'" data-target="#bs-popup"><i class="fa fa-file"></i>&nbsp;'.tr('fattura').' <a data-href="'.$rootdir.'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-toggle="modal" data-title="'.tr('Crea fattura').'" data-target="#bs-popup"><i class="fa fa-file"></i>&nbsp;'.tr('fattura').'