NEW Can change customer from POS
This commit is contained in:
parent
160f8c3085
commit
49fc8129ac
@ -34,6 +34,8 @@ if ( $_SESSION['uid'] <= 0 )
|
||||
exit;
|
||||
}
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("compta");
|
||||
$langs->load("cashdesk");
|
||||
|
||||
|
||||
@ -41,6 +43,8 @@ $langs->load("cashdesk");
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
//header("Content-type: text/html; charset=UTF-8");
|
||||
//header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
|
||||
|
||||
@ -22,8 +22,21 @@
|
||||
*/
|
||||
|
||||
?>
|
||||
<!-- affPied.php -->
|
||||
<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');
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -19,7 +19,6 @@ body {
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
@ -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.'/product/class/product.class.php';
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
|
||||
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
|
||||
unset ($_SESSION['serObjFacturation']);
|
||||
|
||||
|
||||
switch ( $_GET['action'] )
|
||||
switch($action)
|
||||
{
|
||||
default:
|
||||
if ( $_POST['hdnSource'] != 'NULL' )
|
||||
@ -162,6 +164,16 @@ switch ( $_GET['action'] )
|
||||
|
||||
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"
|
||||
|
||||
if (! empty($obj_facturation->id)) // A product was previously selected and stored in session, so we can add it
|
||||
|
||||
@ -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.'/product/stock/class/entrepot.class.php';
|
||||
|
||||
if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
|
||||
/*if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
|
||||
{
|
||||
$company=new Societe($db);
|
||||
$company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]);
|
||||
$companyLink = $company->getNomUrl(1);
|
||||
}
|
||||
}*/
|
||||
if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))
|
||||
{
|
||||
$bankcash=new Account($db);
|
||||
@ -59,6 +59,7 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
|
||||
$langs->load("cashdesk");
|
||||
$langs->load("main");
|
||||
|
||||
print "\n".'<!-- menu.tpl.php -->'."\n";
|
||||
print '<div class="menu_bloc">';
|
||||
print '<ul class="menu">';
|
||||
// Link to new sell
|
||||
@ -68,7 +69,13 @@ print '<li class="menu_choix2"><a href=".." target="backoffice"><span class="hid
|
||||
// Disconnect
|
||||
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 $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("CashDeskBankCB").': '.$bankcbLink.'<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 '</div>';
|
||||
print "\n".'<!-- menu.tpl.php end -->'."\n";
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
$langs->load("banks");
|
||||
|
||||
// Object $form must de defined
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ Difference=Difference
|
||||
TotalTicket=Total ticket
|
||||
NoVAT=No VAT for this sale
|
||||
Change=Excess received
|
||||
BankToPay=Charge Account
|
||||
BankToPay=Account for payment
|
||||
ShowCompany=Show company
|
||||
ShowStock=Show warehouse
|
||||
DeleteArticle=Click to remove this article
|
||||
|
||||
Loading…
Reference in New Issue
Block a user