<?php 
session_start();
include_once '../../conexao/index.php';
error_reporting(E_ALL);
date_default_timezone_set('Africa/Maputo');
$data_hora = date("Y-m-d H:i:s");

/*Variaveis do Sistema*/
/*********************************************/
$userID = $_SESSION['idUsuario'] ?? null;
$userNOME = $_SESSION['nomeUsuario'] ?? null;
$userCATE = $_SESSION['categoriaUsuario'] ?? null;
/*********************************************/

$id = $_POST['id'];
$novoValor = $_POST['novoValor'];

$sql = "UPDATE pos_mesas_temp_artigos SET qtd = '$novoValor', total = qtd*preco, iva = (total*0.16), pronto = 0, entregue = 0 WHERE id = '$id'";
$rs = mysqli_query($db, $sql);