mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Merge
This commit is contained in:
commit
93c684b4dd
@ -289,5 +289,27 @@ function initDynamicSelectInput(input) {
|
||||
},
|
||||
width: '100%'
|
||||
});
|
||||
|
||||
// Rimozione delle option presenti nell'HTML per permettere l'aggiornamento dei dati via AJAX
|
||||
// Rimozione per select multipli
|
||||
if ($input.prop("multiple")) {
|
||||
$input.on('select2:unselecting', function (e) {
|
||||
let data = e.params ? e.params.data : null;
|
||||
if (data) {
|
||||
let option = $input.find('option[value="' + data.id + '"]');
|
||||
option.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
// Rimozione per select singoli
|
||||
else {
|
||||
$input.on('select2:selecting', function (e) {
|
||||
let data = $input.selectData();
|
||||
if (data) {
|
||||
let option = $input.find('option[value="' + data.id + '"]');
|
||||
option.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,6 @@ class Anagrafiche extends Resource implements RetrieveInterface, CreateInterface
|
||||
'an_anagrafiche.deleted_at'
|
||||
)->orderBy('an_anagrafiche.ragione_sociale');
|
||||
|
||||
$filters = [];
|
||||
if ($request['resource'] != 'anagrafiche') {
|
||||
$type = 'Cliente';
|
||||
|
||||
|
@ -148,6 +148,9 @@ switch ($resource) {
|
||||
$data = AJAX::selectResults($query, $where, $filter, $search_fields, $limit, $custom);
|
||||
$rs = $data['results'];
|
||||
|
||||
// Utilizzo dell'impostazione per disabilitare articoli con quantità <= 0
|
||||
$permetti_movimenti_sotto_zero = setting('Permetti selezione articoli con quantità minore o uguale a zero in Documenti di Vendita') ? true : $superselect['permetti_movimento_a_zero'];
|
||||
|
||||
// IVA da impostazioni
|
||||
foreach ($rs as $k => $r) {
|
||||
// Lettura movimenti delle mie sedi
|
||||
@ -164,7 +167,7 @@ switch ($resource) {
|
||||
|
||||
$rs[$k] = array_merge($r, [
|
||||
'text' => $r['codice'].' - '.$r['descrizione'].' '.(!$r['servizio'] ? '('.Translator::numberToLocale($qta).(!empty($r['um']) ? ' '.$r['um'] : '').')' : ''),
|
||||
'disabled' => $r['qta'] <= 0 && !$superselect['permetti_movimento_a_zero'] && !$r['servizio'],
|
||||
'disabled' => $r['qta'] <= 0 && !$permetti_movimenti_sotto_zero && !$r['servizio'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,11 @@ namespace Modules\Articoli\Import;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Importer\CSVImporter;
|
||||
use Modules\Anagrafiche\Anagrafica;
|
||||
use Modules\Anagrafiche\Sede;
|
||||
use Modules\Articoli\Articolo;
|
||||
use Modules\Articoli\Categoria;
|
||||
use Modules\Iva\Aliquota;
|
||||
use Modules\Anagrafiche\Anagrafica;
|
||||
use Plugins\DettagliArticolo\DettaglioPrezzo;
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,6 @@ function renderChecklist($check, $level = 0)
|
||||
|
||||
<span class="text">'.$check->content.'</span>';
|
||||
|
||||
|
||||
if (empty($check->user) || $check->user->id == $user->id) {
|
||||
$result .= '
|
||||
<div class="tools">
|
||||
|
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
use Modules\Anagrafiche\Anagrafica;
|
||||
use Modules\Iva\Aliquota;
|
||||
use Modules\Fatture\Gestori\Bollo;
|
||||
use Modules\Iva\Aliquota;
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
@ -893,7 +893,7 @@ if($dir=='entrata'){
|
||||
function bolloAutomatico() {
|
||||
let bollo_automatico = input("bollo_automatico");
|
||||
let addebita_bollo = input("addebita_bollo");
|
||||
let has_bollo ='.($bollo->getBollo()>0 ? "true" : "false").';
|
||||
let has_bollo ='.($bollo->getBollo() > 0 ? 'true' : 'false').';
|
||||
if(bollo_automatico.get()==0){
|
||||
$(".bollo").show();
|
||||
input("bollo").enable();
|
||||
@ -902,7 +902,7 @@ if($dir=='entrata'){
|
||||
} else {
|
||||
$(".bollo").show();
|
||||
input("bollo").disable();
|
||||
$("#bollo").val('.setting("Importo marca da bollo").');
|
||||
$("#bollo").val('.setting('Importo marca da bollo').');
|
||||
}
|
||||
}
|
||||
$(document).ready(function() {
|
||||
|
@ -89,7 +89,7 @@ echo '
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{[ "type": "checkbox", "label": "'.tr("Imposta prezzo per questa anagrafica").'", "name": "modifica_prezzi", "value": "'.intval(!empty($dettaglio_predefinito)).'" ]}
|
||||
{[ "type": "checkbox", "label": "'.tr('Imposta prezzo per questa anagrafica').'", "name": "modifica_prezzi", "value": "'.intval(!empty($dettaglio_predefinito)).'" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -126,3 +126,6 @@ DELETE FROM `zz_segments` WHERE name='Scadenzario Ri.Ba.';
|
||||
INSERT INTO `zz_segments` (`id_module`, `name`, `clause`, `position`, `pattern`, `note`, `predefined`, `predefined_accredito`, `predefined_addebito`, `is_fiscale`) VALUES
|
||||
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Scadenzario'), 'Scadenzario Ri.Ba. Clienti', 'co_pagamenti.riba=1 AND co_tipidocumento.dir=\"entrata\"', 'WHR', '####', '', 0, 0, 0, 0),
|
||||
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Scadenzario'), 'Scadenzario Ri.Ba. Fornitori', 'co_pagamenti.riba=1 AND co_tipidocumento.dir=\"uscita\"', 'WHR', '####', '', 0, 0, 0, 0);
|
||||
|
||||
-- Aggiunta impostazione per disabilitare articoli con quantità <= 0
|
||||
INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`, `order`, `help`) VALUES (NULL, 'Permetti selezione articoli con quantità minore o uguale a zero in Documenti di Vendita', '0', 'boolean', '1', 'Generali', '20', NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user