Fix is_reversed per abilitazione pulsante crea fattura

This commit is contained in:
Luca 2020-07-24 10:14:23 +02:00
parent 7994264fd2
commit 835457ba55
1 changed files with 2 additions and 5 deletions

View File

@ -3,10 +3,7 @@
include_once __DIR__.'/../../core.php';
echo '
<button type="button" class="btn btn-primary ask btn-primary" '.(empty($record['reversed']) ? '' : 'disabled').' data-msg="'.tr('Duplicare questa fattura?').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-warning" data-backto="record-edit" >
<button type="button" class="btn btn-primary ask btn-primary" '.(empty($record['is_reversed']) ? '' : 'disabled').' data-msg="'.tr('Duplicare questa fattura?').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-warning" data-backto="record-edit" >
<i class="fa fa-copy"></i> '.tr('Duplica fattura').'
</button>';
@ -22,7 +19,7 @@ if ($module->name == 'Fatture di vendita') {
if ($dir == 'entrata') {
echo '
<div class="btn-group">
<button type="button" class="btn btn-primary unblockable dropdown-toggle '.(((!empty($record['ref_documento']) || $record['stato'] != 'Bozza') and empty($record['reversed'])) ? '' : 'disabled').'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="btn btn-primary unblockable dropdown-toggle '.(((!empty($record['ref_documento']) || $record['stato'] != 'Bozza') and empty($record['is_reversed'])) ? '' : 'disabled').'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-magic"></i> '.tr('Crea').' <span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>