NEW Can change customer from POS

This commit is contained in:
Laurent Destailleur 2017-01-18 01:37:12 +01:00
parent 160f8c3085
commit 49fc8129ac
7 changed files with 44 additions and 7 deletions

View File

@ -34,6 +34,8 @@ if ( $_SESSION['uid'] <= 0 )
exit; exit;
} }
$langs->load("companies");
$langs->load("compta");
$langs->load("cashdesk"); $langs->load("cashdesk");
@ -41,6 +43,8 @@ $langs->load("cashdesk");
* View * View
*/ */
$form = new Form($db);
//header("Content-type: text/html; charset=UTF-8"); //header("Content-type: text/html; charset=UTF-8");
//header("Content-type: text/html; charset=".$conf->file->character_set_client); //header("Content-type: text/html; charset=".$conf->file->character_set_client);

View File

@ -22,8 +22,21 @@
*/ */
?> ?>
<!-- affPied.php -->
<div class="pied"> <div class="pied">
<?php <?php
// Wrapper to show tooltips
if (! empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover))
{
print "\n<!-- JS CODE TO ENABLE tipTip on all object with class classfortooltip -->\n";
print '<script type="text/javascript">
jQuery(document).ready(function () {
jQuery(".classfortooltip").tipTip({maxWidth: "'.dol_size(($conf->browser->layout == 'phone' ? 400 : 700),'width').'px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50});
});
</script>' . "\n";
}
printCommonFooter('private'); printCommonFooter('private');
?> ?>
</div> </div>

View File

@ -19,7 +19,6 @@ body {
color: #333; color: #333;
margin: 0; margin: 0;
padding: 0; padding: 0;
text-align: center;
} }
p { p {

View File

@ -28,11 +28,13 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$action = GETPOST('action','alpha');
$obj_facturation = unserialize($_SESSION['serObjFacturation']); $obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset ($_SESSION['serObjFacturation']); unset ($_SESSION['serObjFacturation']);
switch ( $_GET['action'] ) switch($action)
{ {
default: default:
if ( $_POST['hdnSource'] != 'NULL' ) if ( $_POST['hdnSource'] != 'NULL' )
@ -162,6 +164,16 @@ switch ( $_GET['action'] )
break; break;
case 'change_thirdparty': // We have clicked on button "Modify" a thirdparty
$newthirdpartyid = GETPOST('CASHDESK_ID_THIRDPARTY','int');
if ($newthirdpartyid > 0)
{
$_SESSION["CASHDESK_ID_THIRDPARTY"] = $newthirdpartyid;
}
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
break;
case 'ajout_article': // We have clicked on button "Add product" case 'ajout_article': // We have clicked on button "Add product"
if (! empty($obj_facturation->id)) // A product was previously selected and stored in session, so we can add it if (! empty($obj_facturation->id)) // A product was previously selected and stored in session, so we can add it

View File

@ -23,12 +23,12 @@ include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"])) /*if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
{ {
$company=new Societe($db); $company=new Societe($db);
$company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]); $company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]);
$companyLink = $company->getNomUrl(1); $companyLink = $company->getNomUrl(1);
} }*/
if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"])) if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))
{ {
$bankcash=new Account($db); $bankcash=new Account($db);
@ -59,6 +59,7 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
$langs->load("cashdesk"); $langs->load("cashdesk");
$langs->load("main"); $langs->load("main");
print "\n".'<!-- menu.tpl.php -->'."\n";
print '<div class="menu_bloc">'; print '<div class="menu_bloc">';
print '<ul class="menu">'; print '<ul class="menu">';
// Link to new sell // Link to new sell
@ -68,7 +69,13 @@ print '<li class="menu_choix2"><a href=".." target="backoffice"><span class="hid
// Disconnect // Disconnect
print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname']; print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname'];
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>'; print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>'; print '<form id="frmThirdparty" class="formulaire1 inline-block" method="post" action="facturation_verif.php?action=change_thirdparty">';
print $langs->trans("CashDeskThirdParty").': ';
print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', 's.client IN (1,3)', '', 0, 0, null, 0, 'valignmiddle inline-block');
print '<input class="button bouton_change_thirdparty inline-block valignmiddle" type="submit" id="bouton_change_thirdparty" value="'.$langs->trans("Modify").'">';
//print $companyLink;
print '<br>';
print '</form>';
/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>'; /*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>'; print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/ print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
@ -78,3 +85,4 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
} }
print '</li></ul>'; print '</li></ul>';
print '</div>'; print '</div>';
print "\n".'<!-- menu.tpl.php end -->'."\n";

View File

@ -18,6 +18,7 @@
$langs->load("main"); $langs->load("main");
$langs->load("bills"); $langs->load("bills");
$langs->load("banks");
// Object $form must de defined // Object $form must de defined

View File

@ -25,7 +25,7 @@ Difference=Difference
TotalTicket=Total ticket TotalTicket=Total ticket
NoVAT=No VAT for this sale NoVAT=No VAT for this sale
Change=Excess received Change=Excess received
BankToPay=Charge Account BankToPay=Account for payment
ShowCompany=Show company ShowCompany=Show company
ShowStock=Show warehouse ShowStock=Show warehouse
DeleteArticle=Click to remove this article DeleteArticle=Click to remove this article