mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 20:10:50 +01:00
Fix minore
This commit is contained in:
parent
1f7569ce35
commit
58ae69e920
@ -46,7 +46,7 @@ switch (post('op')) {
|
|||||||
$descrizione = post('descrizione');
|
$descrizione = post('descrizione');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(AspettoBeni::where('id', '=', (new AspettoBeni())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(AspettoBeni::where('id', '=', (new AspettoBeni())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$aspetto = AspettoBeni::build();
|
$aspetto = AspettoBeni::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$aspetto->name = $descrizione;
|
$aspetto->name = $descrizione;
|
||||||
|
@ -54,7 +54,7 @@ switch (filter('op')) {
|
|||||||
$colore = filter('colore');
|
$colore = filter('colore');
|
||||||
$id_original = filter('id_original') ?: null;
|
$id_original = filter('id_original') ?: null;
|
||||||
|
|
||||||
$categoria_new = Categoria::where('id', '=', (new Categoria())->getByField('title', $nome)->orWhere('name', $nome));
|
$categoria_new = Categoria::where('id', '=', (new Categoria())->getByField('title', $nome));
|
||||||
if (!empty($id_original)) {
|
if (!empty($id_original)) {
|
||||||
$categoria_new = $categoria_new->where('parent', '=', $id_original);
|
$categoria_new = $categoria_new->where('parent', '=', $id_original);
|
||||||
} else {
|
} else {
|
||||||
|
@ -46,7 +46,7 @@ switch (post('op')) {
|
|||||||
|
|
||||||
case 'add':
|
case 'add':
|
||||||
$descrizione = post('descrizione');
|
$descrizione = post('descrizione');
|
||||||
$categoria_new = Categoria::where('id', '=', (new Categoria())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('deleted_at', '=', null)->first();
|
$categoria_new = Categoria::where('id', '=', (new Categoria())->getByField('title', $descrizione))->where('deleted_at', '=', null)->first();
|
||||||
|
|
||||||
if (!empty($categoria_new) && $categoria_new->id != $id_record) {
|
if (!empty($categoria_new) && $categoria_new->id != $id_record) {
|
||||||
flash()->error(tr('Categoria _NAME_ già esistente!', [
|
flash()->error(tr('Categoria _NAME_ già esistente!', [
|
||||||
|
@ -60,7 +60,7 @@ switch (filter('op')) {
|
|||||||
|
|
||||||
$id_original = filter('id_original') ?: null;
|
$id_original = filter('id_original') ?: null;
|
||||||
|
|
||||||
$categoria_new = Categoria::where('id', '=', (new Categoria())->getByField('title', $nome))->orWhere('name', $nome);
|
$categoria_new = Categoria::where('id', '=', (new Categoria())->getByField('title', $nome));
|
||||||
if (!empty($id_original)) {
|
if (!empty($id_original)) {
|
||||||
$categoria_new = $categoria_new->where('parent', '=', $id_original);
|
$categoria_new = $categoria_new->where('parent', '=', $id_original);
|
||||||
} else {
|
} else {
|
||||||
|
@ -50,7 +50,7 @@ switch (filter('op')) {
|
|||||||
$descrizione = filter('descrizione');
|
$descrizione = filter('descrizione');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(Causale::where('id', '=', (new Causale())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Causale::where('id', '=', (new Causale())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$causale = Causale::build();
|
$causale = Causale::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$causale->name = $descrizione;
|
$causale->name = $descrizione;
|
||||||
|
@ -46,7 +46,7 @@ switch (filter('op')) {
|
|||||||
|
|
||||||
case 'add':
|
case 'add':
|
||||||
$descrizione = post('descrizione');
|
$descrizione = post('descrizione');
|
||||||
if (empty(Causale::where('id', '=', (new Causale())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Causale::where('id', '=', (new Causale())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$causale = Causale::build();
|
$causale = Causale::build();
|
||||||
$causale->tipo_movimento = post('tipo_movimento');
|
$causale->tipo_movimento = post('tipo_movimento');
|
||||||
$causale->save();
|
$causale->save();
|
||||||
|
@ -10,7 +10,7 @@ switch (filter('op')) {
|
|||||||
$nome = post('nome');
|
$nome = post('nome');
|
||||||
|
|
||||||
// Ricerca combinazione con nome indicato
|
// Ricerca combinazione con nome indicato
|
||||||
$combinazione_new = Combinazione::where('id', '=', (new Combinazione())->getByField('title', $nome)->orWhere('name', $nome)->where('id', '!=', $id_record)->first());
|
$combinazione_new = Combinazione::where('id', '=', (new Combinazione())->getByField('title', $nome)->where('id', '!=', $id_record)->first());
|
||||||
|
|
||||||
if (!empty($combinazione_new)) {
|
if (!empty($combinazione_new)) {
|
||||||
flash()->error(tr('Questo nome è già stato utilizzato per un altra combinazione.'));
|
flash()->error(tr('Questo nome è già stato utilizzato per un altra combinazione.'));
|
||||||
|
@ -60,7 +60,7 @@ switch (post('op')) {
|
|||||||
$ora_fine = post('ora_fine');
|
$ora_fine = post('ora_fine');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(FasciaOraria::where('id', '=', (new FasciaOraria())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(FasciaOraria::where('id', '=', (new FasciaOraria())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$fascia_oraria = FasciaOraria::build();
|
$fascia_oraria = FasciaOraria::build();
|
||||||
|
|
||||||
$fascia_oraria->ora_inizio = $ora_inizio;
|
$fascia_oraria->ora_inizio = $ora_inizio;
|
||||||
|
@ -52,7 +52,7 @@ switch (filter('op')) {
|
|||||||
$title = filter('title');
|
$title = filter('title');
|
||||||
$id_original = filter('id_original') ?: null;
|
$id_original = filter('id_original') ?: null;
|
||||||
|
|
||||||
$marca_new = Marca::where('id', '=', (new Marca())->getByField('title', $title))->orWhere('name', $title);
|
$marca_new = Marca::where('id', '=', (new Marca())->getByField('title', $title));
|
||||||
if (!empty($id_original)) {
|
if (!empty($id_original)) {
|
||||||
$marca_new = $marca_new->where('parent', '=', $id_original);
|
$marca_new = $marca_new->where('parent', '=', $id_original);
|
||||||
} else {
|
} else {
|
||||||
|
@ -70,7 +70,7 @@ switch (filter('op')) {
|
|||||||
$esigibilita = post('esigibilita');
|
$esigibilita = post('esigibilita');
|
||||||
$indetraibile = post('indetraibile');
|
$indetraibile = post('indetraibile');
|
||||||
|
|
||||||
$aliquota = Aliquota::where('id', '=', (new Aliquota())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('codice', '=', $codice)->first();
|
$aliquota = Aliquota::where('id', '=', (new Aliquota())->getByField('title', $descrizione))->where('codice', '=', $codice)->first();
|
||||||
if (!$aliquota) {
|
if (!$aliquota) {
|
||||||
$iva = Aliquota::build($esente, $percentuale, $indetraibile, $dicitura, $codice, $codice_natura_fe, $esigibilita);
|
$iva = Aliquota::build($esente, $percentuale, $indetraibile, $dicitura, $codice, $codice_natura_fe, $esigibilita);
|
||||||
$id_record = $dbo->lastInsertedID();
|
$id_record = $dbo->lastInsertedID();
|
||||||
|
@ -27,7 +27,7 @@ include_once __DIR__.'/../../core.php';
|
|||||||
switch (filter('op')) {
|
switch (filter('op')) {
|
||||||
case 'add':
|
case 'add':
|
||||||
$name = post('name');
|
$name = post('name');
|
||||||
$lista_new = Lista::where('id', '=', (new Lista())->getByField('title', $name))->orWhere('name', $name)->where('id', '!=', $id_record)->first();
|
$lista_new = Lista::where('id', '=', (new Lista())->getByField('title', $name))->where('id', '!=', $id_record)->first();
|
||||||
|
|
||||||
if (!empty($lista_new)) {
|
if (!empty($lista_new)) {
|
||||||
flash()->error(tr('Esiste già una lista con questo nome.'));
|
flash()->error(tr('Esiste già una lista con questo nome.'));
|
||||||
|
@ -51,7 +51,7 @@ switch (filter('op')) {
|
|||||||
$descrizione = filter('descrizione');
|
$descrizione = filter('descrizione');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(Porto::where('id', '=', (new Porto())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Porto::where('id', '=', (new Porto())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$porto = Porto::build();
|
$porto = Porto::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$porto->name = $descrizione;
|
$porto->name = $descrizione;
|
||||||
|
@ -52,7 +52,7 @@ switch (filter('op')) {
|
|||||||
$colore = filter('colore');
|
$colore = filter('colore');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(Provenienza::where('id', '=', (new Provenienza())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Provenienza::where('id', '=', (new Provenienza())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$provenienza = Provenienza::build();
|
$provenienza = Provenienza::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$provenienza->name = $descrizione;
|
$provenienza->name = $descrizione;
|
||||||
|
@ -54,7 +54,7 @@ switch (filter('op')) {
|
|||||||
$is_bloccata = filter('is_bloccata_add');
|
$is_bloccata = filter('is_bloccata_add');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(Relazione::where('id', '=', (new Relazione())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Relazione::where('id', '=', (new Relazione())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$relazione = Relazione::build();
|
$relazione = Relazione::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$relazione->name = $descrizione;
|
$relazione->name = $descrizione;
|
||||||
|
@ -48,7 +48,7 @@ switch (filter('op')) {
|
|||||||
$descrizione = filter('descrizione');
|
$descrizione = filter('descrizione');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(Settore::where('id', '=', (new Settore())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Settore::where('id', '=', (new Settore())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$settore = Settore::build();
|
$settore = Settore::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$settore->name = $descrizione;
|
$settore->name = $descrizione;
|
||||||
|
@ -53,7 +53,7 @@ switch (filter('op')) {
|
|||||||
$descrizione = filter('descrizione');
|
$descrizione = filter('descrizione');
|
||||||
|
|
||||||
if (isset($descrizione)) {
|
if (isset($descrizione)) {
|
||||||
if (empty(Spedizione::where('id', '=', (new Spedizione())->getByField('title', $descrizione))->orWhere('name', $descrizione)->where('id', '!=', $id_record)->first())) {
|
if (empty(Spedizione::where('id', '=', (new Spedizione())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$spedizione = Spedizione::build();
|
$spedizione = Spedizione::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$spedizione->name = $descrizione;
|
$spedizione->name = $descrizione;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user