|
66 | 66 | $mancanti = 0; |
67 | 67 | $delete = 'delete_riga'; |
68 | 68 |
|
| 69 | + $row_disable = in_array($riga->id, [$fattura->rigaBollo->id, $fattura->id_riga_spese_incasso]); |
| 70 | + |
69 | 71 | // Individuazione dei seriali |
70 | 72 | if ($riga->isArticolo() && !empty($riga->abilita_serial)) { |
71 | 73 | $serials = $riga->serials; |
|
115 | 117 | echo ' |
116 | 118 | <tr data-id="'.$riga->id.'" data-type="'.$riga::class.'" '.$extra.'> |
117 | 119 | <td class="text-center">'; |
118 | | - if (!$block_edit) { |
| 120 | + if (!$block_edit && !$row_disable) { |
119 | 121 | echo ' |
120 | 122 | <input class="check" type="checkbox"/>'; |
121 | 123 | } |
|
220 | 222 | // Quantità e unità di misura |
221 | 223 | echo ' |
222 | 224 | <td> |
223 | | - {[ "type": "number", "name": "qta_'.$riga->id.'", "value": "'.$riga->qta.'", "min-value": "0", "onchange": "aggiornaInline($(this).closest(\'tr\').data(\'id\'))", "disabled": "'.($riga->isSconto() ? 1 : 0).'", "disabled": "'.($block_edit || $riga->isSconto()).'", "decimals": "qta" ]} |
| 225 | + {[ "type": "number", "name": "qta_'.$riga->id.'", "value": "'.$riga->qta.'", "min-value": "0", "onchange": "aggiornaInline($(this).closest(\'tr\').data(\'id\'))", "disabled": "'.($riga->isSconto() ? 1 : 0).'", "disabled": "'.($block_edit || $riga->isSconto() || $row_disable).'", "decimals": "qta" ]} |
224 | 226 | </td>'; |
225 | 227 |
|
226 | 228 | if ($riga->isArticolo()) { |
|
236 | 238 | } else { |
237 | 239 | echo ' |
238 | 240 | <td> |
239 | | - {[ "type": "number", "name": "costo_'.$riga->id.'", "value": "'.$riga->costo_unitario.'", "onchange": "aggiornaInline($(this).closest(\'tr\').data(\'id\'))", "icon-after": "'.currency().'", "disabled": "'.$block_edit.'" ]} |
| 241 | + {[ "type": "number", "name": "costo_'.$riga->id.'", "value": "'.$riga->costo_unitario.'", "onchange": "aggiornaInline($(this).closest(\'tr\').data(\'id\'))", "icon-after": "'.currency().'", "disabled": "'.($block_edit || $row_disable).'" ]} |
240 | 242 | </td>'; |
241 | 243 | } |
242 | 244 | } |
|
249 | 251 | echo ' |
250 | 252 | <td class="text-center"> |
251 | 253 | '.($show_notifica['show_notifica_prezzo'] ? '<i class="fa fa-info-circle notifica-prezzi"></i>' : '').' |
252 | | - {[ "type": "number", "name": "prezzo_'.$riga->id.'", "value": "'.$riga->prezzo_unitario_corrente.'", "onchange": "aggiornaInline($(this).closest(\'tr\').data(\'id\'))", "icon-before": "'.(abs($riga->provvigione_unitaria) > 0 ? '<span class=\'tip text-info\' title=\''.provvigioneInfo($riga).'\'><small><i class=\'fa fa-handshake-o\'></i></small></span>' : '').'", "icon-after": "'.currency().'", "disabled": "'.$block_edit.'" ]}'; |
| 254 | + {[ "type": "number", "name": "prezzo_'.$riga->id.'", "value": "'.$riga->prezzo_unitario_corrente.'", "onchange": "aggiornaInline($(this).closest(\'tr\').data(\'id\'))", "icon-before": "'.(abs($riga->provvigione_unitaria) > 0 ? '<span class=\'tip text-info\' title=\''.provvigioneInfo($riga).'\'><small><i class=\'fa fa-handshake-o\'></i></small></span>' : '').'", "icon-after": "'.currency().'", "disabled": "'.($block_edit || $row_disable).'" ]}'; |
253 | 255 |
|
254 | 256 | // Prezzo inferiore al minimo consigliato |
255 | 257 | if ($riga->isArticolo()) { |
|
303 | 305 | } |
304 | 306 |
|
305 | 307 | if ($record['stato'] != 'Pagato' && $record['stato'] != 'Emessa') { |
306 | | - if ($riga->id != $fattura->rigaBollo->id) { |
| 308 | + if (!$row_disable) { |
307 | 309 | echo ' |
308 | 310 | <a class="btn btn-xs btn-info" title="'.tr('Aggiungi informazioni FE per questa riga').'" onclick="apriInformazioniFE(this)"> |
309 | 311 | <i class="fa fa-file-code-o"></i> |
|
0 commit comments