diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 72f7612cd68..16bc2672b28 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -1,6 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,12 +29,10 @@ $langs->load("main"); $langs->load("admin"); $langs->load("cashdesk"); -$username = $_POST['txtUsername']; -$password = $_POST['pwdPassword']; -$thirdpartyid = isset($_POST['socid'])?$_POST['socid']:$conf->global->CASHDESK_ID_THIRDPARTY; -$warehouseid = isset($_POST['warehouseid'])?$_POST['warehouseid']:$conf->global->CASHDESK_ID_WAREHOUSE; - -$error = ''; +$username = GETPOST("txtUsername"); +$password = GETPOST("pwdPassword"); +$thirdpartyid = (GETPOST("socid")!='')?GETPOST("socid"):$conf->global->CASHDESK_ID_THIRDPARTY; +$warehouseid = (GETPOST("warehouseid")!='')?GETPOST("warehouseid"):$conf->global->CASHDESK_ID_WAREHOUSE; // Check username if (empty($username)) @@ -51,17 +50,18 @@ if (! ($thirdpartyid > 0)) } // If we setup stock module to ask movement on invoices, we must not allow access if required setup not finished. -if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0)) +if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0)) { - $retour=$langs->trans("You ask to decrease stock on invoice creation but warehouse for this is was not defined (Change stock module setup, or choose a warehouse)."); + $retour=$langs->trans("CashDeskSetupStock"); header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username); exit; } if (! empty($_POST['txtUsername']) && $conf->banque->enabled && (empty($conf_fkaccount_cash) || empty($conf_fkaccount_cheque) || empty($conf_fkaccount_cb))) { -// $error.= '
'; - header("Location: index.php?err=".urlencode('Setup of Point of Sale module not complete. Bank account not defined').'&user='.$username); + $langs->load("errors"); + $retour=$langs->trans("ErrorModuleSetupNotComplete"); + header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username); exit; } diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 381f6ca9959..52f11764d31 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -64,7 +64,7 @@ $Id$ $label = $tab_designations[$i]['label']; print ''."\n "; } @@ -82,7 +82,7 @@ $Id$ $label = $tab_designations[$i]['label']; print ''."\n "; } diff --git a/htdocs/langs/ca_ES/cashdesk.lang b/htdocs/langs/ca_ES/cashdesk.lang index 9334c916daf..4ff9b421321 100755 --- a/htdocs/langs/ca_ES/cashdesk.lang +++ b/htdocs/langs/ca_ES/cashdesk.lang @@ -9,6 +9,7 @@ CashDeskBankCB=Compte bancari (targetes) CashDeskBankCheque=Compte bancari (xecs) CashDeskWarehouse=Magatzem CashDeskProducts=Productes +CashDeskStock=Estoc CashDeskOn=de CashDeskThirdParty=Tercer ShoppingCart=Cistella @@ -28,4 +29,5 @@ Article=Article Difference=Diferència TotalTicket=Total ticket Change=Canvi -CalTip=Feu clic per veure el calendari \ No newline at end of file +CalTip=Feu clic per veure el calendari +CashDeskSetupStock=La configuració decrementa l'estoc en la creació de factures, però no ha indicat magatzem.
Canvieu la configuració del mòdul estoc, o esculli un magatzem \ No newline at end of file diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 53c8ef249fb..631590c9fd7 100755 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -9,6 +9,7 @@ CashDeskBankCB=Bank account (card) CashDeskBankCheque=Bank account (cheque) CashDeskWarehouse=Warehouse CashDeskProducts=Products +CashDeskStock=Stock CashDeskOn=on CashDeskThirdParty=Third party ShoppingCart=Shopping cart @@ -28,4 +29,5 @@ Article=Article Difference=Difference TotalTicket=Total ticket Change=Excess received -CalTip=Click to view the calendar \ No newline at end of file +CalTip=Click to view the calendar +CashDeskSetupStock=You ask to decrease stock on invoice creation but warehouse for this is was not defined
Change stock module setup, or choose a warehouse \ No newline at end of file diff --git a/htdocs/langs/es_ES/cashdesk.lang b/htdocs/langs/es_ES/cashdesk.lang index e3caf2f3994..408a35d072e 100755 --- a/htdocs/langs/es_ES/cashdesk.lang +++ b/htdocs/langs/es_ES/cashdesk.lang @@ -9,6 +9,7 @@ CashDeskBankCB=Cuenta bancaria (tarjetas) CashDeskBankCheque=Cuenta bancaria (cheques) CashDeskWarehouse=Almacén CashDeskProducts=Productos +CashDeskStock=Stock CashDeskOn=de CashDeskThirdParty=Tercero ShoppingCart=Cesta @@ -28,4 +29,5 @@ Article=Artículo Difference=Diferencia TotalTicket=Total ticket Change=Cambio -CalTip=Haga clic para ver el calendario \ No newline at end of file +CalTip=Haga clic para ver el calendario +CashDeskSetupStock=La configuración decrementa el stock en la creación de facturas, pero no ha indicado almacén.
Cambie la configuración del módulo stock, o escoja un almacén \ No newline at end of file diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index b6ff0e68cea..96167e01f51 100755 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -9,6 +9,7 @@ CashDeskBankCB=Compte bancaire (cartes) CashDeskBankCheque=Compte bancaire (chèques) CashDeskWarehouse=Entrepôt CashDeskProducts=Produits +CashDeskStock=Stock CashDeskOn=de CashDeskThirdParty=Tiers ShoppingCart=Panier @@ -28,4 +29,5 @@ Article=Article Difference=Difference TotalTicket=Total ticket Change=Trop perçu -CalTip=Cliquez pour afficher le calendrier \ No newline at end of file +CalTip=Cliquez pour afficher le calendrier +CashDeskSetupStock=Le conf. diminue le stock lors la création de factures, mais vous ne spécifiez pas entrepôt .
Vous devez modifier la conf. du module de stock, ou vous choisissez un entrepôt \ No newline at end of file