<?php session_start(); include_once "../model/PriceList.php"; $opcion = $_GET["opcion"]; switch ($opcion) { case "addPriceList": $priceList = new PriceList(); $priceList->setName(trim($_POST["txtName"])); $priceList->setDescription($_POST["txtDesc"]); $priceList->setBaseCost($_POST["cmbBaseCost"]); $priceList->setType($_POST["rdoType"]); $priceList->setBaseList($_POST["cmbBaseList"]); $priceList->setFlag($_POST["txtFlag"]); $priceList->setMain_list($_POST["chkMainList"]); $priceList->setPrint_type($_POST["cmbPrintType"]); if ($_SESSION['profile'] == '3') { $priceList->setIdcustomer($_POST["cmbCustomer"]); } else { $priceList->setIdcustomer('null'); } $count = $_POST["count"]; $max = $_POST["max"]; include_once "../model/Item.php"; $itemObj = new Item(); $classArr = $itemObj->getClasses(); $classes = array(); foreach ($classArr as $class => $value) { $classes[$class] = $_POST["txtClass" . $class]; } $items = array();