<?php


session_start();
if($_SESSION['dbName']==""){
header("location:../index.php");
}

echo"test test test  done ";
include("config.inc.php");


$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");



$CompanyName= $_POST["CompanyName"];
$CompanyMemo= $_POST["CompanyMemo"];
$CompanyTelephone= $_POST["CompanyTelephone"];
$CompanyFax= $_POST["CompanyFax"];
$CompanyCity= $_POST["CompanyCity"];
$CompanyState= $_POST["CompanyState"];
$CompanyCountry= $_POST["CompanyCountry"];
$BASE1= $_POST["BASE1"];
$BASE2= $_POST["BASE2"];
$DecimalBase= $_POST["DecimalBase"];
$Decimalbase1= $_POST["Decimalbase1"];
$Decimalbase2= $_POST["Decimalbase2"];
$CompanyLogo= $_POST["CompanyLogo"];
$MainCompany= $_POST["MainCompany"];
$Clientaccount= $_POST["Clientaccount"];
$CheckAccount= $_POST["CheckAccount"];
$SetupVatNo= $_POST["SetupVatNo"];
$Vatstartdate= $_POST["Vatstartdate"];
$SetupVatPercentage= $_POST["SetupVatPercentage"];
$DirectStock= $_POST["DirectStock"];
$CompanyLogo1= $_POST["CompanyLogo1"];
$DiscountAccount= $_POST["DiscountAccount"];
$SupplierFirstDigit= $_POST["SupplierFirstDigit"];
$ClientFirstDigit= $_POST["ClientFirstDigit"];
$SalesmenFirstDigit= $_POST["SalesmenFirstDigit"];
$NbrOfDigitInLedger= $_POST["NbrOfDigitInLedger"];
$WarehouseCode= $_POST["WarehouseCode"];
$PRINTOPTION= $_POST["PRINTOPTION"];
$Itemcurrency= $_POST["Itemcurrency"];
$PathArchive= $_POST["PathArchive"];
$Defaultw= $_POST["Defaultw"];
$ShowSlipNumber= $_POST["ShowSlipNumber"];
$ItemTargetDate= $_POST["ItemTargetDate"];
$ChkCommissionAcc= $_POST["ChkCommissionAcc"];
$Salesttc= $_POST["Salesttc"];
$DelinventoryJvTransaction= $_POST["DelinventoryJvTransaction"];
$JournalDefaultCur= $_POST["JournalDefaultCur"];
$SupplierDefaultCur= $_POST["SupplierDefaultCur"];
$SupplierPaymentTerms= $_POST["SupplierPaymentTerms"];
$SupplierCreditLimit= $_POST["SupplierCreditLimit"];
$ClientDefaultCur= $_POST["ClientDefaultCur"];
$ClientPaymentTerms= $_POST["ClientPaymentTerms"];
$ClientCreditLimit= $_POST["ClientCreditLimit"];
$SalesmanDefaultCur= $_POST["SalesmanDefaultCur"];
$SalesmanCreditLimit= $_POST["SalesmanCreditLimit"];
$CustomerPaymentTerms= $_POST["CustomerPaymentTerms"];
$CustomerCreditLimit= $_POST["CustomerCreditLimit"];
$SetupTax1Active= $_POST["SetupTax1Active"];
$SetupTax2Active= $_POST["SetupTax2Active"];
$SetupTax3Active= $_POST["SetupTax3Active"];
$SetupTax4Active= $_POST["SetupTax4Active"];
$SetupTax5Active= $_POST["SetupTax5Active"];
$SetupTax1Name= $_POST["SetupTax1Name"];
$SetupTax2Name= $_POST["SetupTax2Name"];
$SetupTax3Name= $_POST["SetupTax3Name"];
$SetupTax4Name= $_POST["SetupTax4Name"];
$SetupTax5Name= $_POST["SetupTax5Name"];
$SupplierValidateProject= $_POST["SupplierValidateProject"];
$ClientValidateProject= $_POST["ClientValidateProject"];
$StmtOfItemRMaskQty= $_POST["StmtOfItemRMaskQty"];
$InventoryRMaskqty= $_POST["InventoryRMaskqty"];
$ClientSalesRMaskQty= $_POST["ClientSalesRMaskQty"];
$PurchaseRMaskQty= $_POST["PurchaseRMaskQty"];
$ListOfProductionMaskQty= $_POST["ListOfProductionMaskQty"];
$PorderReportMaskQty= $_POST["PorderReportMaskQty"];
$MaskQty= $_POST["MaskQty"];
$Synchronized= $_POST["Synchronized"];
$Barcode= $_POST["Barcode"];
$ApplyLedgerDeactivate= $_POST["ApplyLedgerDeactivate"];
$RMAIn= $_POST["RMAIn"];
$RMAOut= $_POST["RMAOut"];
$SalesmanIsLedger= $_POST["SalesmanIsLedger"];
$LedgerValidateProject= $_POST["LedgerValidateProject"];
$setupGCIExp= $_POST["setupGCIExp"];
$DefaultBase= $_POST["DefaultBase"];
$AccessLabels= $_POST["AccessLabels"];
$gridcolor1= $_POST["gridcolor1"];
$gridcolor2= $_POST["gridcolor2"];
$setupbranch= $_POST["setupbranch"];
$SetupTipsMaxAmount= $_POST["SetupTipsMaxAmount"];
$SetupSorderMailMsg= $_POST["SetupSorderMailMsg"];
$CashRegWeight= $_POST["CashRegWeight"];
$CashRegStartBarcode= $_POST["CashRegStartBarcode"];
$CashRegEndBarcode= $_POST["CashRegEndBarcode"];
$CashRegStartQty= $_POST["CashRegStartQty"];
$CashRegEndQty= $_POST["CashRegEndQty"];
$CashRegPrice= $_POST["CashRegPrice"];
$CashRegStartPrice= $_POST["CashRegStartPrice"];
$CashRegEndPrice= $_POST["CashRegEndPrice"];
$CashRegDispLedMsg= $_POST["CashRegDispLedMsg"];
$maxperpage= $_POST["maxperpage"];
$showcompanylogo= $_POST["showcompanylogo"];
$showcompanyname= $_POST["showcompanyname"];
$showprintdatetime= $_POST["showprintdatetime"];
$showuser= $_POST["showuser"];
$showcompanymemo= $_POST["showcompanymemo"];
$CompanyNameF= $_POST["CompanyNameF"];
$CompanyMemoF= $_POST["CompanyMemoF"];
$CompanyCapital= $_POST["CompanyCapital"];
$CompanyCapitalF= $_POST["CompanyCapitalF"];
$SetupMultiLangPrint= $_POST["SetupMultiLangPrint"];
$SetupSlipFooter= $_POST["SetupSlipFooter"];
$CashRegBgColorOffer= $_POST["CashRegBgColorOffer"];
$CashRegBgColorQty= $_POST["CashRegBgColorQty"];
$CashRegBgColorOrderQty= $_POST["CashRegBgColorOrderQty"];
$CashRegBgColorZeroPrice= $_POST["CashRegBgColorZeroPrice"];
$CashRegBgColorZeroQty= $_POST["CashRegBgColorZeroQty"];
$CashRegBgColorHasDiscount= $_POST["CashRegBgColorHasDiscount"];
$SetupLicenseNo= $_POST["SetupLicenseNo"];
$SetupClientSerialNo= $_POST["SetupClientSerialNo"];
$CashRegApplyColorOffer= $_POST["CashRegApplyColorOffer"];
$CashRegApplyColorQty= $_POST["CashRegApplyColorQty"];
$CashRegApplyColorOrderQty= $_POST["CashRegApplyColorOrderQty"];
$CashRegApplyColorZeroPrice= $_POST["CashRegApplyColorZeroPrice"];
$CashRegApplyColorZeroQty= $_POST["CashRegApplyColorZeroQty"];
$CashRegApplyColorHasDiscount= $_POST["CashRegApplyColorHasDiscount"];



/*
//updating the data inside the setup table 



 
$queryupdatesetup="UPDATE setup 
				   SET COMPANY_NAME=$CompanyName,Company_memo=$CompanyMemo,COMPANY_TELEPHONE=$CompanyTelephone,COMPANY_FAX=$CompanyFax,COMPANY_CITY=$CompanyCity,COMPANY_STAT=$CompanyState,COMPANY_COUNTRY=$CompanyCountry,BASE1=$BASE1,
					BASE2=$BASE2,DecimalBase=$DecimalBase,Decimalbase1=$Decimalbase1,Decimalbase2=$Decimalbase2,COMPANY_LOGO=$CompanyLogo,MainCompany=$MainCompany,Clientaccount=$Clientaccount,Checkaccount=$CheckAccount,	
					Setup_VatNo=$SetupVatNo,Setup_VatStartDate=$Vatstartdate,Setup_VatPercentage=$SetupVatPercentage,DirectStock=$DirectStock,Company_Logo1=$CompanyLogo1,DiscountAccount=$DiscountAccount,
					SupplierFirstDigit=$SupplierFirstDigit,ClientFirstDigit=$ClientFirstDigit,SalesmenFirstDigit=$SalesmenFirstDigit,NbrOfDigitInLedger=$NbrOfDigitInLedger,Warehouse_Code=$WarehouseCode,PRINTOPTION=$PRINTOPTION,
					Itemcurrency=$Itemcurrency,PathArchive=$PathArchive,Defaultw=$Defaultw,ShowSlipNumber=$ShowSlipNumber,ItemTargetDate=$ItemTargetDate,ChkCommissionAcc=$ChkCommissionAcc,Salesttc-$Salesttc,
					DelinventoryJvTransaction=$DelinventoryJvTransaction,Journal_DefaultCur=$JournalDefaultCur,Supplier_DefaultCur=$SupplierDefaultCur,Supplier_PaymentTerms=$SupplierPaymentTerms,Supplier_CreditLimit=$SupplierCreditLimit,
					Client_DefaultCur=$ClientDefaultCur,Client_PaymentTerms=$ClientPaymentTerms,Client_CreditLimit=$ClientCreditLimit,Salesman_DefaultCur=$SalesmanDefaultCur,Salesman_CreditLimit=$SalesmanCreditLimit,Customer_PaymentTerms=$CustomerPaymentTerms,
					Customer_CreditLimit=$CustomerCreditLimit,Setup_Tax1Active=$SetupTax1Active,Setup_Tax2Active=$SetupTax2Active,Setup_Tax3Active=$SetupTax3Active,Setup_Tax4Active=$SetupTax4Active,Setup_Tax5Active=$SetupTax5Active,
					Setup_Tax1Name=$SetupTax1Name,Setup_Tax2Name=$SetupTax2Name,Setup_Tax3Name=$SetupTax3Name,Setup_Tax4Name=$SetupTax4Name,Setup_Tax5Name=$SetupTax5Name,Supplier_ValidateProject=$SupplierValidateProject,Client_ValidateProject=$ClientValidateProject,
					StmtOfItemRMaskQty=$StmtOfItemRMaskQty,InventoryRMaskqty=$InventoryRMaskqty,ClientSalesRMaskQty=$ClientSalesRMaskQty,PurchaseRMaskQty=$PurchaseRMaskQty,ListOfProductionMaskQty=$ListOfProductionMaskQty,PorderReportMaskQty=$PorderReportMaskQty,
					MaskQty=$MaskQty,Synchronized=$Synchronized,Barcode=$Barcode,ApplyLedger_Deactivate=$ApplyLedgerDeactivate,RMA_In=$RMAIn,RMA_Out=$RMAOut,Salesman_IsLedger=$SalesmanIsLedger,Ledger_ValidateProject=$LedgerValidateProject,
					setup_GCIExp=$setupGCIExp,DefaultBase=$DefaultBase,AccessLabels=$AccessLabels,grid_color1=$gridcolor1,grid_color2=$gridcolor2,setup_branch=$setupbranch,Setup_TipsMaxAmount=$SetupTipsMaxAmount,Setup_SorderMailMsg=$SetupSorderMailMsg,
					CashReg_Weight=$CashRegWeight,CashReg_StartBarcode=$CashRegStartBarcode,CashReg_EndBarcode=$CashRegEndBarcode,CashReg_StartQty=$CashRegStartQty,CashReg_EndQty=$CashRegEndQty,CashReg_Price=$CashRegPrice,CashReg_StartPrice=$CashRegStartPrice,
					CashReg_EndPrice=$CashRegEndPrice,CashReg_DispLedMsg=$CashRegDispLedMsg,maxperpage=$maxperpage,show_companylogo=$showcompanylogo,show_companyname=$showcompanyname,show_printdatetime=$showprintdatetime,show_user=$showuser,
					show_companymemo=$showcompanymemo,Company_NameF=$CompanyNameF,Company_MemoF=$CompanyMemoF,Company_Capital=$CompanyCapital,Company_CapitalF=$CompanyCapitalF,Setup_MultiLangPrint=$SetupMultiLangPrint,Setup_SlipFooter=$SetupSlipFooter,
					CashReg_BgColorOffer=$CashRegBgColorOffer,CashReg_BgColorQty=$CashRegBgColorQty,CashReg_BgColorOrderQty=$CashRegBgColorOrderQty,CashReg_BgColorZeroPrice=$CashRegBgColorZeroPrice,CashReg_BgColorZeroQty=$CashRegBgColorZeroQty,
					CashReg_BgColorHasDiscount=$CashRegBgColorHasDiscount,Setup_LicenseNo=$SetupLicenseNo,Setup_ClientSerialNo=$SetupClientSerialNo,CashReg_ApplyColorOffer=$CashRegApplyColorOffer,CashReg_ApplyColorQty=$CashRegApplyColorQty,CashReg_ApplyColorOrderQty=$CashRegApplyColorOrderQty,
					CashReg_ApplyColorZeroPrice=$CashRegApplyColorZeroPrice,CashReg_ApplyColorZeroQty=$CashRegApplyColorZeroQty,CashReg_ApplyColorHasDiscount=$CashRegApplyColorHasDiscount";
	
*/


	//getting the values from the purshase setup

	
$Warehouse= $_POST["Warehouse"];
$Project= $_POST["Project"];
$Costcenter= $_POST["Costcenter"];
$PaymentMode= $_POST["PaymentMode"];
$Charges= $_POST["Charges"];
$SupplierCur= $_POST["SupplierCur"];
$FreightCur= $_POST["FreightCur"];
$FreightDebitAccount= $_POST["FreightDebitAccount"];
$FreightCreditAccount= $_POST["FreightCreditAccount"];
$CommissionsCur= $_POST["CommissionsCur"];
$CommissionsDebitAccount= $_POST["CommissionsDebitAccount"];
$CommissionsCreditAccount= $_POST["CommissionsCreditAccount"];
$InsuranceCur= $_POST["InsuranceCur"];
$InsuranceDebitAccount= $_POST["InsuranceDebitAccount"];
$InsuranceCreditAccount= $_POST["InsuranceCreditAccount"];
$ClearingCur= $_POST["ClearingCur"];
$ClearingDebitAccount= $_POST["ClearingDebitAccount"];
$ClearingCreditAccount= $_POST["ClearingCreditAccount"];
$TransportCur= $_POST["TransportCur"];
$TransportDebitAccount= $_POST["TransportDebitAccount"];
$TransportCreditAccount= $_POST["TransportCreditAccount"];
$OtherDebitAccount= $_POST["OtherDebitAccount"];
$OtherCreditAccount= $_POST["OtherCreditAccount"];
$DebitCur= $_POST["DebitCur"];
$DebitCurdefault= $_POST["DebitCurdefault"];
$DebitAccount= $_POST["DebitAccount"];
$DebitAccountVat= $_POST["DebitAccountVat"];
$CashCur= $_POST["CashCur"];
$CashCurDefault= $_POST["CashCurDefault"];
$CashAccount= $_POST["CashAccount"];
$CheckCur= $_POST["CheckCur"];
$CheckAccount1= $_POST["CheckAccount1"];
$CustomsDebitAccount= $_POST["CustomsDebitAccount"];
$CustomsCreditAccount= $_POST["CustomsCreditAccount"];
$CustomsCur= $_POST["CustomsCur"];
$VatAccount= $_POST["VatAccount"];
$DiscountAccount1= $_POST["DiscountAccount1"];
$PurchaseTTC= $_POST["PurchaseTTC"];
$Barcode1= $_POST["Barcode1"];
$Directstockdebit= $_POST["Directstockdebit"];
$Directstockcredit= $_POST["Directstockcredit"];
$Directstockcurrency_code= $_POST["Directstockcurrency_code"];
$Purchasejv_chargedebit= $_POST["Purchasejv_chargedebit"];
$Purchasejv_chargecredit= $_POST["Purchasejv_chargecredit"];
$TipsAccount= $_POST["TipsAccount"];
$TipsMaxBase1= $_POST["TipsMaxBase1"];
$PurchaseJV_VatAccount= $_POST["PurchaseJV_VatAccount"];
$PurchaseDefaultType= $_POST["PurchaseDefaultType"];
$Purchase_Acctax1= $_POST["Purchase_Acctax1"];
$Purchase_Acctax2= $_POST["Purchase_Acctax2"];
$Purchase_Acctax3= $_POST["Purchase_Acctax3"];
$Purchase_Acctax4= $_POST["Purchase_Acctax4"];
$Purchase_Acctax5= $_POST["Purchase_Acctax5"];
$Synchronized1= $_POST["Synchronized1"];
$VATAccountNonStock= $_POST["VATAccountNonStock"];
$ShowCostCentLayout= $_POST["ShowCostCentLayout"];

/*
//update purshasesetup


$queryupdatepurshasesetupp="UPDATE purchasesetup   
				SET Warehouse=$Warehouse,Project=$Project, Costcenter=$Costcenter, PaymentMode=$PaymentMode,Charges=$Charges, SupplierCur=$SupplierCur, FreightCur=$FreightCur, FreightDebitAccount=$FreightDebitAccount, FreightCreditAccount=$FreightCreditAccount,".
			"CommissionsCur=$CommissionsCur, CommissionsDebitAccount=$CommissionsDebitAccount, CommissionsCreditAccount=$CommissionsCreditAccount, InsuranceCur=$InsuranceCur, InsuranceDebitAccount=$InsuranceDebitAccount, InsuranceCreditAccount=$InsuranceCreditAccount,".
			"ClearingCur=$ClearingCur, ClearingDebitAccount=$ClearingDebitAccount, ClearingCreditAccount=$ClearingCreditAccount, TransportCur=$TransportCur, TransportDebitAccount=$TransportDebitAccount, TransportCreditAccount=$TransportCreditAccount,".
			"OtherDebitAccount=$OtherDebitAccount, OtherCreditAccount=$OtherCreditAccount, DebitCur=$DebitCur, DebitCurdefault=$DebitCurdefault, DebitAccount=$DebitAccount, DebitAccountVat=$DebitAccountVat, CashCur=$CashCur, CashCurDefault=$CashCurDefault,".
			"CashAccount=$CashAccount, CheckCur=$CheckCur, CheckAccount=$CheckAccount1, CustomsDebitAccount=$CustomsDebitAccount, CustomsCreditAccount=$CustomsCreditAccount, CustomsCur=$CustomsCur, VatAccount=$VatAccount, DiscountAccount=$DiscountAccount1, ".
			"PurchaseTTC=$PurchaseTTC, Barcode=$Barcode1, Directstockdebit=$Directstockdebit, Directstockcredit=$Directstockcredit, Directstockcurrency_code=$Directstockcurrency_code, Purchasejv_chargedebit=$Purchasejv_chargedebit, Purchasejv_chargecredit=$Purchasejv_chargecredit,".
			"TipsAccount=$TipsAccount, TipsMaxBase1=$TipsMaxBase1, PurchaseJV_VatAccount=$PurchaseJV_VatAccount, PurchaseDefaultType=$PurchaseDefaultType, Purchase_Acctax1=$Purchase_Acctax1, Purchase_Acctax2=$Purchase_Acctax2, Purchase_Acctax3=$Purchase_Acctax3, Purchase_Acctax4=$Purchase_Acctax4,".
			"Purchase_Acctax5=$Purchase_Acctax5, Synchronized=$Synchronized1, VATAccountNonStock=$VATAccountNonStock, ShowCostCentLayout=$ShowCostCentLayout";

*/

//getting the values from the sales setup

			

$Warehouse2= $_POST["Warehouse2"];
$Project2= $_POST["Project2"];
$Costcenter2= $_POST["Costcenter2"];
$PaymentMode2= $_POST["PaymentMode2"];
$Charges2= $_POST["Charges2"];
$ClientCur= $_POST["ClientCur"];
$ClientAccount2= $_POST["ClientAccount2"];
$DebitCur2= $_POST["DebitCur2"];
$DebitCurDefault2= $_POST["DebitCurDefault2"];
$CreditCur= $_POST["CreditCur"];
$CreditCurdefault= $_POST["CreditCurdefault"];
$CreditAccount2= $_POST["CreditAccount2"];
$CreditAccountVAT= $_POST["CreditAccountVAT"];
$CustomsCur2= $_POST["CustomsCur2"];
$CashCur2= $_POST["CashCur2"];
$CashCurDefault2= $_POST["CashCurDefault2"];
$CashAccount2= $_POST["CashAccount2"];
$CheckCur2= $_POST["CheckCur2"];
$CheckAccount2= $_POST["CheckAccount2"];
$TipsAccount2= $_POST["TipsAccount2"];
$VatAccount2= $_POST["VatAccount2"];
$CreditAccountReturn= $_POST["CreditAccountReturn"];
$DiscountAccount2= $_POST["DiscountAccount2"];
$Directstockdebit2= $_POST["Directstockdebit2"];
$Directstockcredit2= $_POST["Directstockcredit2"];
$DirectStockCurrency_Code2= $_POST["DirectStockCurrency_Code2"];
$TipsMaxBase12= $_POST["TipsMaxBase12"];
$PrintPreview= $_POST["PrintPreview"];
$CreditVATReturn= $_POST["CreditVATReturn"];
$SalesSetup= $_POST["SalesSetup"];
$Salesttc2= $_POST["Salesttc2"];
$Sale_Remark= $_POST["Sale_Remark"];
$SalesJV_VatAccount= $_POST["SalesJV_VatAccount"];
$Sale_Acctax1= $_POST["Sale_Acctax1"];
$Sale_Acctax2= $_POST["Sale_Acctax2"];
$Sale_Acctax3= $_POST["Sale_Acctax3"];
$Sale_Acctax4= $_POST["Sale_Acctax4"];
$Sale_Acctax5= $_POST["Sale_Acctax5"];
$PromotionAccount= $_POST["PromotionAccount"];
$Sale_ExchangeSellPrice= $_POST["Sale_ExchangeSellPrice"];
$Synchronized2= $_POST["Synchronized2"];
$Barcode2= $_POST["Barcode2"];
$Sale_CLAAccount= $_POST["Sale_CLAAccount"];
$Sale_DCTAccount= $_POST["Sale_DCTAccount"];
$Sale_AWAccount= $_POST["Sale_AWAccount"];
$Sale_TRPAccount= $_POST["Sale_TRPAccount"];
$LoadItems= $_POST["LoadItems"];
$TransportAccount= $_POST["TransportAccount"];
$ExportTransportToJV= $_POST["ExportTransportToJV"];
$BonusAccount= $_POST["BonusAccount"];
$ExportBonusToJV= $_POST["ExportBonusToJV"];
$InvoiceComment= $_POST["InvoiceComment"];
$WaybillComment= $_POST["WaybillComment"];
$Sale_MinPendingQty= $_POST["Sale_MinPendingQty"];
$Sale_MaxExceedQty= $_POST["Sale_MaxExceedQty"];
$Sale_MarginPer= $_POST["Sale_MarginPer"];
$VATAccountNonStock2= $_POST["VATAccountNonStock2"];
$SorderComment= $_POST["SorderComment"];
$PriceDecimalBase= $_POST["PriceDecimalBase"];
$ShowCostCentLayout2= $_POST["ShowCostCentLayout2"];



/*
//update salessetup

$queryupdatesalessetup="UPDATE salessetup   
					SET Warehouse=$Warehouse2,Project=$Project2,Costcenter =$Costcenter2,		
					PaymentMode=$PaymentMode2, Charges=$Charges2, ClientCur=$ClientCur, ClientAccount=$ClientAccount2, DebitCur=$DebitCur2, DebitCurDefault=$DebitCurDefault2,
					CreditCur=$CreditCur, CreditCurdefault=$CreditCurdefault, CreditAccount=$CreditAccount2, CreditAccountVAT=$CreditAccountVAT, CustomsCur=$CustomsCur2, CashCur=$CashCur2, 
					CashCurDefault=$CashCurDefault2, CashAccount=$CashAccount2,CheckCur=$CheckCur2, CheckAccount=$CheckAccount2, TipsAccount=$TipsAccount2, VatAccount=$VatAccount2,
					CreditAccountReturn=$CreditAccountReturn, DiscountAccount=$DiscountAccount2, Directstockdebit=$Directstockdebit2, Directstockcredit=$Directstockcredit2,
					DirectStockCurrency_Code=$DirectStockCurrency_Code2, TipsMaxBase1=$TipsMaxBase12, PrintPreview=$PrintPreview, CreditVATReturn=$CreditVATReturn, SalesSetup=$SalesSetup,  Salesttc=$Salesttc2,
					Sale_Remark=$Sale_Remark, SalesJV_VatAccount=$SalesJV_VatAccount, Sale_Acctax1=$Sale_Acctax1, Sale_Acctax2=$Sale_Acctax2, Sale_Acctax3=$Sale_Acctax3, Sale_Acctax4=$Sale_Acctax4,
					Sale_Acctax5=$Sale_Acctax5, PromotionAccount=$PromotionAccount, Sale_ExchangeSellPrice=$Sale_ExchangeSellPrice, Synchronized=$Synchronized2, Barcode=$Barcode2, Sale_CLAAccount=$Sale_CLAAccount, 
					Sale_DCTAccount=$Sale_DCTAccount, Sale_AWAccount=$Sale_AWAccount,Sale_TRPAccount=$Sale_TRPAccount, LoadItems=$LoadItems, TransportAccount=$TransportAccount, ExportTransportToJV=$ExportTransportToJV, 
					BonusAccount=$BonusAccount, ExportBonusToJV=$ExportBonusToJV, InvoiceComment=$InvoiceComment	,WaybillComment=$WaybillComment,Sale_MinPendingQty=$Sale_MinPendingQty,Sale_MaxExceedQty=$Sale_MaxExceedQty,
					Sale_MarginPer=$Sale_MarginPer,VATAccountNonStock=$VATAccountNonStock2,SorderComment=$SorderComment,PriceDecimalBase=$PriceDecimalBase,ShowCostCentLayout=$ShowCostCentLayout2";


*/
//getting the values from the transfer setup
					
$DebitAccount3= $_POST["DebitAccount3"];
$CreditAccount= $_POST["CreditAccount"];
$CurrencyBase= $_POST["CurrencyBase"];
$DefaultCur= $_POST["DefaultCur"];
$Synchronized3= $_POST["Synchronized3"];
$Barcode3= $_POST["Barcode3"];
$ShowCostCentLayout3= $_POST["ShowCostCentLayout3"];


/*
// update transfersetup



$queryupdatetransfersetup="UPDATE transfersetup   
					SET  DebitAccount=$DebitAccount3, CreditAccount=$CreditAccount, CurrencyBase=$CurrencyBase, DefaultCur]=$DefaultCur, Synchronized=$Synchronized3, Barcode=$Barcode3, ShowCostCentLayout=$ShowCostCentLayout3"; 

*/
					header('Location: ./../contract/form_utilities.php');
					
			
?>