aa
This commit is contained in:
@@ -525,18 +525,25 @@ function showOrdini()
|
||||
|
||||
function setOrdine($idinternet, $mode)
|
||||
{
|
||||
$str = "";
|
||||
$ordine = Orderdetail::where('IdInternet', $idinternet)->get();
|
||||
try {
|
||||
$str = "";
|
||||
$ordine = Orderdetail::where('IdInternet', $idinternet)->get();
|
||||
|
||||
$prodotto = Product::where('sku', $ordine["CodArticoloGM"])->first();
|
||||
if ($ordine)
|
||||
$str .= getarraystr($ordine) . "<br>";
|
||||
|
||||
$str .= getarraystr($prodotto) . "<br>";
|
||||
$str .= getarraystr($ordine) . "<br>";
|
||||
$prodotto = Product::where('sku', $ordine["CodArticoloGM"])->first();
|
||||
|
||||
if ($mode === 'del' && $ordine) {
|
||||
// delete record $ordine
|
||||
$deletedCount = Orderdetail::where('IdInternet', $idinternet)->delete();
|
||||
$str = "<br><span style='color: red;'>Numero di record eliminati: " . $deletedCount . "</span>";
|
||||
if ($prodotto)
|
||||
$str .= getarraystr($prodotto) . "<br>";
|
||||
|
||||
if ($mode === 'AAAdel' && $ordine) {
|
||||
// delete record $ordine
|
||||
$deletedCount = Orderdetail::where('IdInternet', $idinternet)->delete();
|
||||
$str = "<br><span style='color: red;'>Numero di record eliminati: " . $deletedCount . "</span>";
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$str .= "Errore: " . $e->getMessage();
|
||||
}
|
||||
|
||||
return $str;
|
||||
@@ -1760,7 +1767,6 @@ function getClienteByIdInternet_Ordine($idInternet)
|
||||
|
||||
try {
|
||||
$clienteinGM = Clientegm::where('IdInternet', $idInternet)->first();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
@@ -1773,7 +1779,6 @@ function getClienteByIdCodClienteInternet($codClienteInternet)
|
||||
|
||||
try {
|
||||
$clienteinGM = Clientegm::where('codClienteInternet', $codClienteInternet)->first();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
@@ -1781,13 +1786,13 @@ function getClienteByIdCodClienteInternet($codClienteInternet)
|
||||
return $clienteinGM;
|
||||
}
|
||||
|
||||
function getClienti() {
|
||||
function getClienti()
|
||||
{
|
||||
try {
|
||||
$clienti = Clientegm::all();
|
||||
|
||||
dd($clienti);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user