<?php

    include("../../classes/database.class.php");
    include("../../classes/facturaModel.class.php");
    include("../../classes/facturaController.class.php");
    
    $idUsuario = $_POST["idUsuario"];
    $montanteTotal = $_POST["montanteTotal"];
    $descontoTotal = $_POST["descontoTotal"];
    $subTotal = $_POST["subTotal"];
    $entregueTotal = $_POST["entregueTotal"];
    $tipoPagamento = $_POST["tipoPagamento"];
    
    $factura = new FacturaController($idUsuario, $montanteTotal, $descontoTotal, $subTotal, $entregueTotal, $tipoPagamento);
    $id = $factura->createFactura();

   echo $id;