Exemple #1
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$item = $_REQUEST['itemId'];
if ($item == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
if (getItemTicketCount($conexion, $item) > 0) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, 'The item you want to delete has assigned tickets. Please delete the tickets first.'));
}
//die(wrapError(-2,'Feature not ready'));
$itemId = deleteTruck($conexion, $item);
mysql_close($conexion);
echo wrapSubmitResponse(0, $item);
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a material', 'newItemMaterialId'));
}
$fromId = $_REQUEST['fromId'];
$toId = $_REQUEST['toId'];
$fromText = $_REQUEST['fromDisplay'];
$toText = $_REQUEST['toDisplay'];
$materialPrice = $_REQUEST['materialPrice'];
if ($materialPrice == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a material price', 'newItemMaterialPrice'));
}
$brokerCost = $_REQUEST['brokerCost'];
if ($brokerCost == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a broker cost', 'newItemBrokerCost'));
}
$customerCost = $_REQUEST['customerCost'];
if ($customerCost == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a customer cost', 'newItemCustomerCost'));
}
$type = $_REQUEST['type'];
if ($type == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a type', 'type'));
}
$description = $_REQUEST['description'];
$existing = objectQuery($conexion, '*', 'item_proposal', "projectId = '{$project}' AND supplierId = '{$supplier}' AND materialId = '{$material}' AND itemProposalType = '{$type}' AND itemProposalMaterialPrice = '{$materialPrice}' AND itemProposalBrokerCost = '{$brokerCost}' AND itemProposalCustomerCost = '{$customerCost}'");
if ($existing != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The proposal already exists"));
}
//die(wrapError(-2,'Feature not ready'));
$itemProposalId = saveNewItemProposal($conexion, $project, $supplier, $material, $fromId, $toId, $fromText, $toText, $material, $broker, $customer, $type, $description);
echo wrapSubmitResponse(SUCCESS_CODE, $itemProposalId);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$responseCode = 0;
$customer = $_REQUEST['customer'];
if ($customer == '0' || $customer == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a customer', ''));
}
$number = $_REQUEST['number'];
if ($number == '0' || $number == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a number', ''));
}
$existing = mysql_fetch_assoc(mysql_query("SELECT * FROM customer_super_check WHERE customerId = '{$customer}' AND customerSuperCheckNumber = '{$number}'", $conexion));
if ($existing != null) {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, "The number '{$number}' is already used by the check with ID [" . $existing['customerSuperCheckId'] . "]", ''));
}
$amount = $_REQUEST['amount'];
if ($amount == '0' || $amount == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a amount', ''));
}
$date = $_REQUEST['date'];
if ($date == '0' || $date == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a date', ''));
}
$note = $_REQUEST['note'];
$checkId = saveNewCustomerSuperCheck($conexion, $customer, $number, $amount, $date, $note);
echo wrapSubmitResponse(SUCCESS_CODE, $checkId);
Exemple #4
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$ticket = $_REQUEST['ticketId'];
if ($ticket == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
$inVendorInvoice = objectQuery($conexion, '*', 'supplierinvoiceticket JOIN supplierinvoice USING (supplierInvoiceId)', "ticketId = '{$ticketId}'");
if ($inVendorInvoice != null) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, "This ticket is in vendor invoice [" . $inVendorInvoice['supplierInvoiceNumber'] . "]. Please delete the invoice first."));
}
$inBrokerInvoice = objectQuery($conexion, '*', 'reportticket', "ticketId = '{$ticketId}'");
if ($inBrokerInvoice != null) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, "This ticket is in broker invoice [" . $inBrokerInvoice['reportId'] . "]. Please delete the invoice first."));
}
$inCustomerInvoice = objectQuery($conexion, '*', 'invoiceticket', "ticketId = '{$ticketId}'");
if ($inCustomerInvoice != null) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, "This ticket is in customer invoice [" . $inVendorInvoice['invoiceId'] . "]. Please delete the invoice first."));
}
//die(wrapError(-2,'Feature not ready'));
$ticketId = deleteTicket($conexion, $ticket);
mysql_close($conexion);
echo wrapSubmitResponse(0, $ticketId);
include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$responseCode = 0;
$vendor = $_REQUEST['vendor'];
if ($vendor == '' || $vendor == '0') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Vendor', 'newVendorId'));
}
$name = $_REQUEST['name'];
if ($name == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Supplier Name', 'newSupplierName'));
}
$existingSupplier = objectQuery($conexion, '*', 'supplier', "supplierName = '{$name}' AND vendorId = '{$vendor}'");
if ($existingSupplier != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The name '{$name}' is already in use by another supplier [" . $existingSupplier['supplierName'] . "] with ID [" . $existingSupplier['supplierId'] . "]", 'newSupplierName'));
}
$info = $_REQUEST['info'];
$dumptime = $_REQUEST['dumptime'];
$tel = $_REQUEST['tel'];
$fax = $_REQUEST['fax'];
$line1 = $_REQUEST['line1'];
$line2 = $_REQUEST['line2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$box = $_REQUEST['box'];
//die(wrapError(-2,'Feature not ready'));
$supplierId = saveNewSupplier($conexion, $vendor, $name, $tel, $fax, $info, $dumptime, $line1, $line2, $city, $state, $zip, $box);
echo wrapSubmitResponse(SUCCESS_CODE, $supplierId);
Exemple #6
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$truck = $_REQUEST['truckId'];
if ($truck == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
if (getTruckTicketCount($conexion, $truck) > 0) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, 'The truck you want to delete has assigned tickets. Please delete the tickets first.'));
}
//die(wrapError(-2,'Feature not ready'));
$truckId = deleteTruck($conexion, $truck);
mysql_close($conexion);
echo wrapSubmitResponse(0, $truck);
$term = $_REQUEST['term'];
if ($term == 0) {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Driver Terms', 'termId'));
}
$start = $_REQUEST['start'];
$percentage = $_REQUEST['percentage'];
if ($percentage == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Driver Percentage', 'percentage'));
}
$gender = $_REQUEST['gender'];
if ($gender == "0") {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Driver Gender', 'gender'));
}
$ethnicId = $_REQUEST['ethnic'];
if ($ethnicId == "0") {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Driver Ethnicity', 'ethnicId'));
}
$driverClass = $_REQUEST['class'];
if ($driverClass == "0") {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Driver Class', 'driverClass'));
}
$line1 = $_REQUEST['line1'];
$line2 = $_REQUEST['line2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$box = $_REQUEST['box'];
//die(wrapError(-2,'Feature not ready'));
$driverId = saveEditDriver($conexion, $driverId, $broker, $first, $last, $ssn, $tel, $mobile, $carrier, $email, $start, $percentage, $term, $gender, $ethnicId, $driverClass, $line1, $line2, $city, $state, $zip, $box);
echo wrapSubmitResponse(SUCCESS_CODE, $driverId);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$report = $_REQUEST['reportId'];
if ($report == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
//check fro payments here
//die(wrapError(-2,'Feature not ready'));
$report = deleteSupplierInvoice($conexion, $report);
mysql_close($conexion);
echo wrapSubmitResponse(0, $report);
$wcexp = $_REQUEST['wcexp'];
if ($wcexp == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Expirantion Date', 'brokerWcExpire'));
}
$inslb = $_REQUEST['inslb'];
if ($inslb == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Insurance Liability', 'brokerInsLiability'));
}
$lbexp = $_REQUEST['lbexp'];
if ($lbexp == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Expiration Date', 'brokerLbExpire'));
}
$genln = $_REQUEST['genln'];
$glexp = $_REQUEST['glexp'];
$start = $_REQUEST['start'];
$percentage = $_REQUEST['percentage'];
if ($percentage == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Broker Percentage', 'brokerPercentage'));
}
$gender = $_REQUEST['gender'];
if ($gender == "0") {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Broker Gender', 'gender'));
}
$ethnicId = $_REQUEST['ethnic'];
if ($ethnicId == "0") {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Broker Ethnicity', 'ethnicId'));
}
//die(wrapError(-2,'Feature not ready'));
$brokerId = saveNewBroker($conexion, $pid, $name, $contact, $tax, $tel, $fax, $radio, $mobile, $carrier, $email, $icc, $wc, $wcexp, $inslb, $lbexp, $genln, $glexp, $start, $percentage, $term, $gender, $ethnicId, $line1, $line2, $city, $state, $zip, $box);
echo wrapSubmitResponse(SUCCESS_CODE, $brokerId);
if ($materialPrice == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a material price', 'newItemMaterialPrice'));
}
$brokerCost = $_REQUEST['brokerCost'];
if ($brokerCost == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a broker cost', 'newItemBrokerCost'));
}
$customerCost = $_REQUEST['customerCost'];
if ($customerCost == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a customer cost', 'newItemCustomerCost'));
}
$type = $_REQUEST['type'];
if ($type == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a type', 'type'));
}
$description = $_REQUEST['description'];
$existing = objectQuery($conexion, '*', 'fakeitem', "fakeprojectId = '{$project}' AND supplierId = '{$supplier}' AND materialId = '{$material}' AND itemType = '{$type}' AND itemMaterialPrice = '{$materialPrice}' AND itemBrokerCost = '{$brokerCost}' AND itemCustomerCost = '{$customerCost}'");
if ($existing != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The proposal already exists"));
}
$number = "0";
$last = objectQuery($conexion, '*', 'fakeitem', "fakeprojectId = '{$project}' ORDER BY itemNumber desc limit 1");
if ($last != null) {
    $number = $last['itemNumber'] + 1;
} else {
    $number = "1";
}
//die(wrapError(-2,'Feature not ready'));
$itemId = saveNewProposal($conexion, $number, $project, $supplier, $material, 0, 0, $fromText, $toText, $materialPrice, $brokerCost, $customerCost, $type, $description);
echo wrapSubmitResponse(SUCCESS_CODE, $itemId);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$responseCode = 0;
$name = $_REQUEST['name'];
if ($name == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Customer Name', 'newCustomerName'));
}
$existingCustomer = objectQuery($conexion, '*', 'customer', "customerName = '{$name}'");
if ($existingCustomer != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The name '{$name}' is already in use by another customer [" . $existingCustomer['customerName'] . "] with ID [" . $existingCustomer['customerId'] . "]", 'newCustomerName'));
}
$term = $_REQUEST['term'];
if ($term == '0') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Customer Pay Terms', 'newCustomerTerm'));
}
$web = $_REQUEST['web'];
$tel = $_REQUEST['tel'];
$fax = $_REQUEST['fax'];
$line1 = $_REQUEST['line1'];
$line2 = $_REQUEST['line2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$box = $_REQUEST['box'];
//die(wrapError(-2,'Feature not ready'));
$customerId = saveNewCustomer($conexion, $name, $tel, $fax, $web, $term, $line1, $line2, $city, $state, $zip, $box);
echo wrapSubmitResponse(SUCCESS_CODE, $customerId);
}
$broker = $_REQUEST['broker'];
if ($broker == 0 || $broker == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a broker', 'brokerId'));
}
$number = $_REQUEST['number'];
if ($number == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please type the truck number', 'truckNumber'));
}
$existingTruck = objectQuery($conexion, '*', 'truck', "truckNumber = '{$number}' AND brokerId = '{$broker}' AND truckId <> '{$truckId}'");
if ($existingTruck != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The number '{$number}' is already in use by another truck with ID [" . $existingTruck['truckId'] . "]", 'truckNumber'));
}
$driver = $_REQUEST['driver'];
$plates = $_REQUEST['plates'];
$info = $_REQUEST['addinfo'];
$brand = $_REQUEST['brand'];
$year = $_REQUEST['year'];
$serial = $_REQUEST['serial'];
$tire = $_REQUEST['tire'];
$features = $_REQUEST['features'];
$line1 = $_REQUEST['line1'];
$line2 = $_REQUEST['line2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$box = $_REQUEST['box'];
//die(wrapError(-2,'Feature not ready'));
$truckId = saveEditTruck($conexion, $truckId, $broker, $number, $driver, $plates, $info, $brand, $year, $serial, $tire, $line1, $line2, $city, $state, $zip, $box, $features);
echo wrapSubmitResponse(SUCCESS_CODE, $truckId);
Exemple #13
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$estimate = $_REQUEST['estimateId'];
if ($estimate == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
//die(wrapError(-2,'Feature not ready'));
$estimateId = deleteEstimate($conexion, $estimate);
mysql_close($conexion);
echo wrapSubmitResponse(0, $estimateId);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$responseCode = 0;
$supplier = $_REQUEST['supplier'];
if ($supplier == '0' || $supplier == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
$material = $_REQUEST['material'];
if ($material == '0' || $material == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
//die(wrapError(-2,'Feature not ready'));
deleteSupplierMaterial($conexion, $supplier, $material);
echo wrapSubmitResponse(SUCCESS_CODE, '');
Exemple #15
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$vendor = $_REQUEST['vendorId'];
if ($vendor == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
if (getVendorSupplierCount($conexion, $vendor) > 0) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, 'The vendor you are trying to delete has assigned suppliers. Please delete the suppliers first.'));
}
//if(getBrokerTicketCount($conexion, $vendor) > 0) die(wrapError(ERROR_CODE_INVALID_VALUE, 'The vendor you want to delete has assigned tickets. Please delete the tickets first.'));
//die(wrapError(-2,'Feature not ready'));
$vendorId = deleteVendor($conexion, $vendor);
mysql_close($conexion);
echo wrapSubmitResponse(0, $vendorId);
Exemple #16
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$driver = $_REQUEST['driverId'];
if ($driver == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
if (getDriverTicketCount($conexion, $driver) > 0) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, 'The driver you want to delete has assigned tickets. Please delete the tickets first.'));
}
//die(wrapError(-2,'Feature not ready'));
$driverId = deleteDriver($conexion, $driver);
mysql_close($conexion);
echo wrapSubmitResponse(0, $driverId);
Exemple #17
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$broker = $_REQUEST['brokerId'];
if ($broker == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
if (getBrokerTicketCount($conexion, $broker) > 0) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, 'The broker you want to delete has assigned tickets. Please delete the tickets first.'));
}
//die(wrapError(-2,'Feature not ready'));
$brokerId = deleteBroker($conexion, $broker);
mysql_close($conexion);
echo wrapSubmitResponse(0, $brokerId);
//print_r($_REQUEST);
$responseCode = 0;
if ($_REQUEST['tickets'] == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please insert tickets to create the invoice', ''));
}
$tickets = explode('~', $_REQUEST['tickets']);
$supplier = $_REQUEST['supplierId'];
if ($supplier == '0' || $supplier == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please select a supplier', 'supplierId'));
}
$invoice = $_REQUEST['invoice'];
if ($invoice == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please type the invoice number', 'invoiceNumber'));
}
$date = $_REQUEST['date'];
if ($date == '0') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please type a valid date', 'invoiceDate'));
}
$amount = $_REQUEST['amount'];
if ($amount == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Please type a valid amount', 'invoiceAmount'));
}
$current = $_REQUEST['current'];
if ($current != $amount) {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'The current value is different to the amount typed', 'invoiceAmount'));
}
$comment = $_REQUEST['comment'];
//die(wrapError(-2,'Feature not ready'));
$invoiceId = saveNewVendorInvoice($conexion, $supplier, $invoice, $amount, $comment, $date, $tickets);
echo wrapSubmitResponse(SUCCESS_CODE, $invoiceId);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$responseCode = 0;
$customer = $_REQUEST['customer'];
if ($customer == '0' || $customer == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Customer', 'newEstimateCustomer'));
}
$name = $_REQUEST['name'];
if ($name == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Estimate Name', 'newEstimateName'));
}
$existingEstimate = objectQuery($conexion, '*', 'fakeproject', "customerId = '{$customer}' AND fakeprojectName = '{$name}'");
if ($existingEstimate != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The name '{$name}' is already in use by another estimate [" . $existingEstimate['fakeprojectName'] . "] with ID [" . $existingEstimate['fakeprojectIdId'] . "]", 'newEstimateName'));
}
$line1 = $_REQUEST['line1'];
$line2 = $_REQUEST['line2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$box = $_REQUEST['box'];
//die(wrapError(-2,'Feature not ready'));
$estimateId = saveNewEstimate($conexion, $name, $customer, $line1, $line2, $city, $state, $zip, $box);
echo wrapSubmitResponse(SUCCESS_CODE, $estimateId);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$check = $_REQUEST['paidchequesId'];
if ($check == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
//die(wrapError(-2,'Feature not ready'));
$checkId = deleteBrokerCheck($conexion, $check);
mysql_close($conexion);
echo wrapSubmitResponse(0, $check);
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$responseCode = 0;
$name = $_REQUEST['name'];
if ($name == '') {
    die(wrapFormError(ERROR_CODE_MISSING_PARAMETERS, 'Missing Vendor Name', 'newVendorName'));
}
$existingVendor = objectQuery($conexion, '*', 'vendor', "vendorName = '{$name}'");
if ($existingVendor != null) {
    die(wrapFormError(ERROR_CODE_DUPLICATE, "The name '{$name}' is already in use by another vendor [" . $existingVendor['vendorName'] . "] with ID [" . $existingVendor['vendorId'] . "]", 'newVendorName'));
}
$info = $_REQUEST['info'];
$comment = $_REQUEST['comment'];
$tel = $_REQUEST['tel'];
$fax = $_REQUEST['fax'];
$line1 = $_REQUEST['line1'];
$line2 = $_REQUEST['line2'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$box = $_REQUEST['box'];
//die(wrapError(-2,'Feature not ready'));
$vendorId = saveNewVendor($conexion, $name, $info, $comment, $tel, $fax, $line1, $line2, $city, $state, $zip, $box);
echo wrapSubmitResponse(SUCCESS_CODE, $vendorId);
Exemple #22
0
<?php

include_once '../function_header.php';
include '../common_server_functions.php';
//print_r($_REQUEST);
$response = array();
$supplier = $_REQUEST['supplierId'];
if ($supplier == '') {
    die(wrapError(ERROR_CODE_FIVE, 'INTERNAL ERROR'));
}
if (getSupplierTicketCount($conexion, $supplier) > 0) {
    die(wrapError(ERROR_CODE_INVALID_VALUE, 'The supplier you want to delete has assigned tickets. Please delete the tickets first.'));
}
//die(wrapError(-2,'Feature not ready'));
$supplierId = deleteSupplier($conexion, $supplier);
mysql_close($conexion);
echo wrapSubmitResponse(0, $supplierId);