Fix: A lot of fix on point of sale module

This commit is contained in:
Laurent Destailleur 2009-09-13 22:24:46 +00:00
parent cc290e13ab
commit 76173cfd4b
13 changed files with 71 additions and 52 deletions

View File

@ -5,4 +5,9 @@ CashDesk=Point of sale
CashDesks=Point of sales
CashDeskBank=Bank account
CashDeskWarehouse=Warehouse
CashDeskThirdParty=Third party
CashDeskThirdParty=Third party
ShoppingCart=Shopping cart
NewSell=New sell
BackOffice=Back office
AddThisArticle=Add this article
RestartSelling=Go back on sell

View File

@ -5,4 +5,9 @@ CashDesk=Caisse enregistreuse
CashDesks=Caisse enregistreuses
CashDeskBank=Compte bancaire
CashDeskWarehouse=Entrepôt
CashDeskThirdParty=Tiers
CashDeskThirdParty=Tiers
ShoppingCart=Panier
NewSell=Nouvelle vente
BackOffice=Back office
AddThisArticle=Ajouter cet article
RestartSelling=Reprendre la vente

View File

@ -468,4 +468,5 @@ p.titre {
.dhtml_selection {
background-color: #3366cc;
color: white ! important;
}
}

View File

@ -1,3 +1,7 @@
<?php
$langs->load("main");
$langs->load("bills");
?>
<!--Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
This program is free software; you can redistribute it and/or modify
@ -18,14 +22,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<script type="text/javascript" src="javascript/dhtml.js"></script>
<!-- ========================= Cadre "Article" ============================= -->
<fieldset class="cadre_facturation"><legend class="titre1">Article</legend>
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Article"); ?></legend>
<form id="frmFacturation" class="formulaire1" method="post" action="facturation_verif.php">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<input type="hidden" name="hdnSource" value="NULL" />
<table>
<tr><th class="label1">Code</th><th class="label1">Designation</th></tr>
<tr><th class="label1"><?php echo $langs->trans("Code"); ?></th><th class="label1"><?php echo $langs->trans("Designation"); ?></th></tr>
<tr>
<!-- Affichage de la reference et de la designation -->
<td><input class="texte_ref" type="text" id ="txtRef" name="txtRef" autocomplete="off" value="<?php echo $obj_facturation->ref() ?>"
@ -106,7 +110,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<form id="frmQte" class="formulaire1" method="post" action="facturation_verif.php?action=ajout_article" onsubmit ="javascript: return verifSaisie();">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<table>
<tr><th class="label1">Quantite</th><th class="label1">Stock</th><th class="label1">Prix unitaire</th><th></th><th class="label1">Taux TVA</th><th class="label1">Remise (%)</th><th class="label1">Prix total</th></tr>
<tr><th class="label1"><?php echo $langs->trans("Qty"); ?></th><th class="label1"><?php echo $langs->trans("Stock"); ?></th><th class="label1"><?php echo $langs->trans("PriceUHT"); ?></th><th></th><th class="label1"><?php echo $langs->trans("VATRate"); ?></th><th class="label1"><?php echo $langs->trans("Discount"); ?> (%)</th><th class="label1"><?php echo $langs->trans("TotalHT"); ?></th></tr>
<tr>
<td><input class="texte1" type="text" name="txtQte" value="1" onkeyup="javascript: modif();" onfocus="javascript: this.select();" /></td>
<!-- Affichage du stock pour l'article courant -->
@ -141,7 +145,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</tr>
</table>
<input class="bouton_ajout_article" type="submit" id="sbmtEnvoyer" value="Ajouter cet article" />
<input class="bouton_ajout_article" type="submit" id="sbmtEnvoyer" value="<?php echo $langs->trans("AddThisArticle"); ?>" />
</form>
</fieldset>
@ -149,12 +153,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<form id="frmDifference" class="formulaire1" method="post" onsubmit="javascript: return verifReglement()" action="validation_verif.php?action=valide_achat">
<input type="hidden" name="hdnChoix" value="" />
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<fieldset class="cadre_facturation"><legend class="titre1">Difference</legend>
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Difference"); ?></legend>
<table>
<tr><th class="label1">Montant du</th><th class="label1">Encaisse</th><th class="label1">Rendu</th></tr>
<tr><th class="label1"><?php echo $langs->trans("DueAmount"); ?></th><th class="label1"><?php echo $langs->trans("Received"); ?></th><th class="label1"><?php echo $langs->trans("RemainderToPay"); ?></th></tr>
<tr>
<!-- Affichage du montant du -->
<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo number_format ($obj_facturation->prix_total_ttc (), 2, '.', ''); ?>" disabled="disabled" /></td>
<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prix_total_ttc (), 'MT'); ?>" disabled="disabled" /></td>
<!-- Choix du montant encaisse -->
<td><input class="texte2" type="text" name="txtEncaisse" value="" onkeyup="javascript: verifDifference();" onfocus="javascript: this.select();" /></td>
<!-- Affichage du montant rendu -->
@ -164,19 +168,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</table>
</fieldset>
<fieldset class="cadre_facturation"><legend class="titre1">Mode de paiement</legend>
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("PaymentMode"); ?></legend>
<table>
<tr>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="Especes" onclick="javascript: verifClic('ESP');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="Carte" onclick="javascript: verifClic('CB');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="Cheque" onclick="javascript: verifClic('CHQ');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Cash"); ?>" onclick="javascript: verifClic('ESP');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("CreditCard"); ?>" onclick="javascript: verifClic('CB');" /></td>
<td><input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Cheque"); ?>" onclick="javascript: verifClic('CHQ');" /></td>
</tr>
</table>
<table>
<tr>
<td>
<input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="Differe" onclick="javascript: verifClic('DIF');" />
Date limite de paiement :
<input class="bouton_mode_reglement" type="submit" name="btnModeReglement" value="<?php echo $langs->trans("Reported"); ?>" onclick="javascript: verifClic('DIF');" />
<?php echo $langs->trans("DateEcheance"); ?> :
<input class="texte2" type="text" id="txtDatePaiement" name="txtDatePaiement" value="" />
<input class="bouton_cal" type="image" src="images/calendrier.png" id="btnCalendrier" value="..." title="Cliquez pour afficher le calendrier" />
</td>

View File

@ -1,3 +1,8 @@
<?php
$langs->load("main");
$langs->load("bills");
$langs->load("cashdesk");
?>
<!--Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
This program is free software; you can redistribute it and/or modify
@ -17,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<div class="liste_articles_haut">
<div class="liste_articles_bas">
<p class="titre">Panier</p>
<p class="titre"><?php echo $langs->trans("ShoppingCart"); ?></p>
<?php
// Recuperation du contenu de la vente

View File

@ -35,9 +35,9 @@ $logout='<img class="login" border="0" src="'.DOL_URL_ROOT.'/theme/'.$conf->them
print '<div class="menu_bloc">';
print '<ul class="menu">';
print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><span>Nouvelle vente</span></a></li>';
print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>';
print '<li class="menu_choix2"><a href="'.eregi_replace('cashdesk','',$conf_url_racine).'"><span>Gestion commerciale</span></a></li>';
print '<li class="menu_choix2"><a href="'.eregi_replace('cashdesk','',$conf_url_racine).'"><span>'.$langs->trans("BackOffice").'</span></a></li>';
print '<li class="menu_choix0">'.$langs->trans("User").' : '.$_SESSION['prenom'].' '.$_SESSION['nom'].' <a href="deconnexion.php">'.$logout.'</a><br>';
print $langs->trans("CashDeskThirdParty").' : '.$company->getNomUrl(1).'<br>';

View File

@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-->
<html>
<head><title>Impression du ticket</title>
<head><title>Print ticket</title>
<style type="text/css">
@ -31,18 +31,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* position: relative; */
}
.logo {
background: url('<?php echo DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini); ?>') no-repeat top left;
height: 128px;
width: 650px;
}
.logo span {
display: none;
}
.adresse {
/* float: left; */
font-size: 12px;
}
.date_heure {
@ -99,17 +90,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<body>
<div class="entete">
<div class="logo"><span>Logo</span></div>
<div class="logo">
<?php print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?>
</div>
<div class="infos">
<p class="adresse">SOCIETE<br />
RUE DU PORT<br />
75000 PARIS</p>
<p class="adresse"><?php echo $mysoc->nom; ?><br />
<?php echo $mysoc->adresse; ?><br />
<?php echo $mysoc->cp.' '.$mysoc->ville; ?></p>
<?php
// Recuperation et affichage de la date et de l'heure
$date = date ('d/m/Y');
$heure = date ('H:i');
echo ('<p class="date_heure">Le '.$date.' à '.$heure.'</p>');
$now = mktime();
print '<p class="date_heure">'.dol_print_date($now,'dayhourtext').'</p>';
?>
</div>
</div>

View File

@ -14,46 +14,46 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-->
<fieldset class="cadre_facturation"><legend class="titre1">Resume</legend>
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Summary"); ?></legend>
<table class="table_resume">
<tr><td class="resume_label">Facture </td><td><?php echo $obj_facturation->num_facture(); ?></td></tr>
<tr><td class="resume_label">Prix HT :</td><td><?php echo price2num($obj_facturation->prix_total_ht()).' '.$conf->monnaie; ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("Invoice"); ?></td><td><?php echo $obj_facturation->num_facture(); ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prix_total_ht(),'MT').' '.$conf->monnaie; ?></td></tr>
<?php
// Affichage de la tva par taux
if ( $obj_facturation->montant_tva() ) {
echo ('<tr><td class="resume_label">Montant TVA 19.6% :</td><td>'.price2num($obj_facturation->montant_tva()).' '.$conf->monnaie.'</td></tr>');
echo ('<tr><td class="resume_label">'.$langs->trans("TotalVAT").' :</td><td>'.price2num($obj_facturation->montant_tva(),'MT').' '.$conf->monnaie.'</td></tr>');
}
else
{
echo ('<tr><td class="resume_label">Montant TVA :</td><td>Pas de TVA pour cette vente</td></tr>');
echo ('<tr><td class="resume_label">'.$langs->trans("TotalVAT").' :</td><td>Pas de TVA pour cette vente</td></tr>');
}
?>
<tr><td class="resume_label">A payer :</td><td><?php echo price2num($obj_facturation->prix_total_ttc()).' '.$conf->monnaie; ?></td></tr>
<tr><td class="resume_label">Mode de reglement :</td><td><?php echo $obj_facturation->mode_reglement(); ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("RemainderToPay"); ?> :</td><td><?php echo price2num($obj_facturation->prix_total_ttc(),'MT').' '.$conf->monnaie; ?></td></tr>
<tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> :</td><td><?php echo $obj_facturation->mode_reglement(); ?></td></tr>
<?php
// Affichage des infos en fonction du mode de paiement
if ( $obj_facturation->mode_reglement() == 'DIF' ) {
echo ('<tr><td class="resume_label">Paiement le :</td><td>'.$obj_facturation->paiement_le().'</td></tr>');
echo ('<tr><td class="resume_label">'.$langs->trans("DateEcheance").' :</td><td>'.$obj_facturation->paiement_le().'</td></tr>');
} else {
echo ('<tr><td class="resume_label">Encaisse :</td><td>'.price2num($obj_facturation->montant_encaisse()).' '.$conf->monnaie.'</td></tr>');
echo ('<tr><td class="resume_label">'.$langs->trans("Received").' :</td><td>'.price2num($obj_facturation->montant_encaisse(),'MT').' '.$conf->monnaie.'</td></tr>');
}
// Affichage du montant rendu (reglement en especes)
if ( $obj_facturation->montant_rendu() ) {
echo ('<tr><td class="resume_label">Rendu :</td><td>'.price2num($obj_facturation->montant_rendu()).' '.$conf->monnaie.'</td></tr>');
echo ('<tr><td class="resume_label">Rendu :</td><td>'.price2num($obj_facturation->montant_rendu(),'MT').' '.$conf->monnaie.'</td></tr>');
}
@ -64,10 +64,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<form id="frmValidation" class="formulaire2" method="post" action="validation_verif.php?action=valide_facture">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<p class="note_label">Notes<br /><textarea class="textarea_note" name="txtaNotes"></textarea></p>
<p class="note_label"><?php echo $langs->trans("Notes"); ?><br /><textarea class="textarea_note" name="txtaNotes"></textarea></p>
<span><input class="bouton_validation" type="submit" name="btnValider" value="Valider la facture" /></span>
<p><a class="lien1" href="affIndex.php?menu=facturation">Reprendre la vente</a></p>
<span><input class="bouton_validation" type="submit" name="btnValider" value="<?php echo $langs->trans("ValidateInvoice"); ?>" /></span>
<p><a class="lien1" href="affIndex.php?menu=facturation"><?php echo $langs->trans("RestartSelling"); ?></a></p>
</form>

View File

@ -350,6 +350,8 @@ CreditNoteConvertedIntoDiscount=This credit note or deposit invoice has been con
UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices
ShowUnpaidLateOnly=Show late unpaid invoice only
PaymentInvoiceRef=Payment invoice %s
ValidateInvoice=Validate invoice
# oursin PDF model
Of=du

View File

@ -528,6 +528,7 @@ Merge=Merge
PrintContentArea=Show page to print main content area
NoMenu=No sub-menu
WarningYouAreInMaintenanceMode=Warning, you are in a maintenance mode, so only login <b>%s</b> is allowed to use application at the moment.
CreditCard=Credit card
# Week day
Day1=Monday
Day2=Tuesday

View File

@ -352,6 +352,7 @@ UsBillingContactAsIncoiveRecipientIfExist=Utiliser l'adresse du contact facturat
ShowUnpaidAll=Afficher tous les impayés
ShowUnpaidLateOnly=Afficher impayés en retard uniquement
PaymentInvoiceRef=Paiement facture %s
ValidateInvoice=Valider facture
# oursin PDF model
Of=du

View File

@ -527,6 +527,7 @@ Merge=Fusion
PrintContentArea=Afficher page d'impression de la zone centrale
NoMenu=Aucun sous-menu
WarningYouAreInMaintenanceMode=Attention, vous êtes en mode maintenance, aussi seul le login <b>%s</b> est autorisé à utiliser l'application en ce moment.
CreditCard=Carte de crédit
# Week day
Day1=Lundi
Day2=Mardi

View File

@ -5,7 +5,7 @@
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
*
* 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,7 +28,6 @@
* \brief File for third party class
* \version $Id$
*/
require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
@ -104,6 +103,9 @@ class Societe extends CommonObject
var $import_key;
var $logo;
var $logo_small;
var $logo_mini;
/**
* \brief Constructeur de la classe