Trad: Quelques traductions de plus
This commit is contained in:
parent
0f76961de6
commit
f03dde7b43
@ -657,7 +657,7 @@ else
|
||||
print '<input type="hidden" name="action" value="addligne">';
|
||||
print "<tr $bc[$var]>".'<td><textarea name="desc" cols="60" rows="1"></textarea></td>';
|
||||
print '<td align="center">';
|
||||
print $html->select_tva("tva_tx");
|
||||
print $html->select_tva("tva_tx",$conf->defaulttx);
|
||||
print '</td>';
|
||||
print '<td align="center"><input type="text" name="qty" value="1" size="2"></td>';
|
||||
print '<td align="right"><input type="text" name="remise_percent" size="4" value="0"> %</td>';
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/contrat/contrat.class.php
|
||||
\ingroup contrat
|
||||
\brief Fichier de la classe des contrats
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
|
||||
/*! \class Contrat
|
||||
/** \class Contrat
|
||||
\brief Classe permettant la gestion des contrats
|
||||
*/
|
||||
|
||||
@ -51,7 +51,7 @@ class Contrat
|
||||
$this->user_cloture = new User($DB);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Modifie date de mise en service d'un contrat
|
||||
* Si la duree est renseignée, date_start=date_start et date_end=date_start+duree
|
||||
* sinon date_start=date_start et date_end=date_end
|
||||
@ -97,10 +97,11 @@ class Contrat
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
/**
|
||||
* \brief Active une ligne detail d'un contat
|
||||
* \param user objet User qui avtice le contrat
|
||||
* \param line_id id de la ligne de detail à activer
|
||||
* \param date date d'ouverture
|
||||
*/
|
||||
function active_line($user, $line_id, $date)
|
||||
{
|
||||
@ -126,7 +127,7 @@ class Contrat
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Cloture un contrat
|
||||
* \param user objet User qui cloture
|
||||
*
|
||||
@ -140,7 +141,7 @@ class Contrat
|
||||
$result = $this->db->query($sql) ;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Annule un contrat
|
||||
* \param user objet User qui annule
|
||||
*
|
||||
@ -154,7 +155,7 @@ class Contrat
|
||||
$result = $this->db->query($sql) ;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Charge de la base les données du contrat
|
||||
* \param id id du contrat à charger
|
||||
*/
|
||||
@ -200,10 +201,9 @@ class Contrat
|
||||
return $result;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
/**
|
||||
* \brief Crée un contrat vierge
|
||||
* \param user utilisateur qui crée
|
||||
*/
|
||||
function create($user)
|
||||
{
|
||||
@ -219,68 +219,69 @@ class Contrat
|
||||
else
|
||||
{
|
||||
$result = 1;
|
||||
dolibarr_syslog("Contrat::create_from_facture - 10");
|
||||
dolibarr_print_error($this->db,"Contrat::create_from_facture - 10");
|
||||
dolibarr_syslog("Contrat::create - 10");
|
||||
dolibarr_print_error($this->db,"Contrat::create - 10");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Crée autant de contrats que de lignes de facture, pour une facture donnée
|
||||
*
|
||||
* \param factureid id de la facture
|
||||
* \param user utilisateur qui crée
|
||||
* \param socid id société
|
||||
*/
|
||||
function create_from_facture($factureid, $user, $socid)
|
||||
function create_from_facture($factureid, $user, $socid)
|
||||
{
|
||||
$sql = "SELECT p.rowid as rowid, fd.rowid as fdrowid FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql .= " WHERE p.rowid = fd.fk_product AND p.fk_product_type = 1 AND fd.fk_facture = ".$factureid;
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$num = $this->db->num_rows();
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object();
|
||||
$prowid[$i] = $objp->rowid;
|
||||
$fdrowid[$i] = $objp->fdrowid;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$this->db->free();
|
||||
|
||||
while (list($i, $value) = each ($prowid))
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (fk_product, fk_facture, fk_facturedet, fk_soc, fk_user_author)";
|
||||
$sql .= " VALUES (".$prowid[$i].", $factureid, ".$fdrowid[$i].", $socid, $user->id)";
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
dolibarr_syslog("Contrat::create_from_facture - 10");
|
||||
dolibarr_print_error($this->db,"Contrat::create_from_facture - 10");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->free();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_syslog("Contrat::create_from_facture - 20");
|
||||
dolibarr_print_error($this->db,"Contrat::create_from_facture - 20");
|
||||
}
|
||||
|
||||
return $result;
|
||||
$sql = "SELECT p.rowid as rowid, fd.rowid as fdrowid FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql .= " WHERE p.rowid = fd.fk_product AND p.fk_product_type = 1 AND fd.fk_facture = ".$factureid;
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$num = $this->db->num_rows();
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object();
|
||||
$prowid[$i] = $objp->rowid;
|
||||
$fdrowid[$i] = $objp->fdrowid;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$this->db->free();
|
||||
while (list($i, $value) = each ($prowid))
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (fk_product, fk_facture, fk_facturedet, fk_soc, fk_user_author)";
|
||||
$sql .= " VALUES (".$prowid[$i].", $factureid, ".$fdrowid[$i].", $socid, $user->id)";
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
dolibarr_syslog("Contrat::create_from_facture - 10");
|
||||
dolibarr_print_error($this->db,"Contrat::create_from_facture - 10");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->free();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_syslog("Contrat::create_from_facture - 20");
|
||||
dolibarr_print_error($this->db,"Contrat::create_from_facture - 20");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajoute une ligne de commande
|
||||
* \brief Ajoute une ligne de commande
|
||||
*
|
||||
*/
|
||||
function addline($desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0)
|
||||
@ -316,18 +317,12 @@ class Contrat
|
||||
$price = $pu - $remise;
|
||||
}
|
||||
|
||||
/*
|
||||
* Insertion dans la base
|
||||
*/
|
||||
|
||||
// Insertion dans la base
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."contratdet ";
|
||||
$sql .= "(fk_contrat,label,description,fk_product, price_ht,qty,tva_tx, remise_percent, subprice, remise)";
|
||||
$sql .= " VALUES ($this->id, '" . addslashes($label) . "','" . addslashes($desc) . "',$fk_product,".ereg_replace(",",".",$price).", '$qty', $txtva, $remise_percent,'".ereg_replace(",",".",$subprice)."','".ereg_replace(",",".", $remise)."') ;";
|
||||
|
||||
/*
|
||||
* Retour
|
||||
*/
|
||||
|
||||
// Retour
|
||||
if ( $this->db->query( $sql) )
|
||||
{
|
||||
//$this->update_price();
|
||||
@ -342,8 +337,8 @@ class Contrat
|
||||
}
|
||||
|
||||
/**
|
||||
* Supprime une ligne du contrat
|
||||
*
|
||||
* \brief Supprime une ligne de detail du contrat
|
||||
* \param idligne id de la ligne detail de contrat à supprimer
|
||||
*/
|
||||
function delete_line($idligne)
|
||||
{
|
||||
|
||||
@ -602,7 +602,7 @@ else
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$opt = "<option value=\"0\" SELECTED></option>";
|
||||
$opt = "<option value=\"0\" selected></option>";
|
||||
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
@ -625,8 +625,8 @@ else
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td width="54%">'.$langs->trans("Description").'</td>';
|
||||
print '<td width="8%" align="center">Tva</td>';
|
||||
print '<td width="8%" align="center">Quantité</td>';
|
||||
print '<td width="8%" align="center">'.$langs->trans("VAT").'</td>';
|
||||
print '<td width="8%" align="center">'.$langs->trans("Qty").'</td>';
|
||||
print '<td width="8%" align="right">Remise</td>';
|
||||
print '<td width="12%" align="right">P.U.</TD>';
|
||||
print '<td> </td><td> </td>'."</tr>\n";
|
||||
@ -635,7 +635,7 @@ else
|
||||
/*
|
||||
print "<tr $bc[$var]>".'<td><textarea name="desc" cols="60" rows="1"></textarea></td>';
|
||||
print '<td align="center">';
|
||||
print $html->select_tva("tva_tx");
|
||||
print $html->select_tva("tva_tx",$conf->defaulttx);
|
||||
print '</td>';
|
||||
print '<td align="center"><input type="text" name="qty" value="1" size="2"></td>';
|
||||
print '<td align="right"><input type="text" name="remise_percent" size="4" value="0"> %</td>';
|
||||
@ -670,7 +670,7 @@ else
|
||||
|
||||
if ($contrat->statut == 0 && $user->rights->contrat->supprimer)
|
||||
{
|
||||
print '<a class="tabAction" href="fiche.php?id='.$id.'&action=delete">Supprimer</a>';
|
||||
print '<a class="tabAction" href="fiche.php?id='.$id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
if ($contrat->statut > 0 && $contrat->statut < 3 && $user->rights->expedition->creer)
|
||||
@ -683,7 +683,7 @@ else
|
||||
{
|
||||
if ($user->rights->contrat->valider)
|
||||
{
|
||||
print '<a class="tabAction" href="fiche.php?id='.$id.'&action=valid">Valider</a>';
|
||||
print '<a class="tabAction" href="fiche.php?id='.$id.'&action=valid">'.$langs->trans("Valid").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ else
|
||||
$nb_expedition = $contrat->nb_expedition();
|
||||
if ($user->rights->contrat->valider && $nb_expedition == 0)
|
||||
{
|
||||
print '<a class="tabAction" href="fiche.php?id='.$id.'&action=annuler">Annuler la contrat</a>';
|
||||
print '<a class="tabAction" href="fiche.php?id='.$id.'&action=annuler">'.$langs->trans("Cancel").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -707,10 +707,11 @@ else
|
||||
*/
|
||||
if ($_GET["action"] == 'classer')
|
||||
{
|
||||
$langs->load("project");
|
||||
print '<p><form method="post" action="fiche.php?id='.$contrat->id.'">';
|
||||
print '<input type="hidden" name="action" value="classin">';
|
||||
print '<table cellspacing="0" class="border" cellpadding="3">';
|
||||
print '<tr><td>Projet</td><td>';
|
||||
print '<table class="border">';
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
|
||||
$proj = new Project($db);
|
||||
$html->select_array("projetid",$proj->liste_array($contrat->soc_id));
|
||||
@ -726,7 +727,7 @@ else
|
||||
else
|
||||
{
|
||||
/* Contrat non trouvée */
|
||||
print "Contrat inexistante ou accés refusé";
|
||||
print "Contrat inexistant ou accés refusé";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ if ($_GET["action"] == 'create' or $_GET["action"] == 'copy')
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input size="30" name="libelle" type="text"></td></tr>';
|
||||
}
|
||||
print "<tr>".'<td>Date</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
||||
$html->select_date();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -254,7 +254,7 @@ if ($_GET["action"] == 'create' or $_GET["action"] == 'copy')
|
||||
print "</table><br>";
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr class="liste_titre"><td> </td><td>'.$langs->trans("Label").'</td><td align="center">P.U. HT</td><td align="center">Quantité</td><td align="center">Tx TVA</td></tr>';
|
||||
print '<tr class="liste_titre"><td> </td><td>'.$langs->trans("Label").'</td><td align="center">P.U. HT</td><td align="center">'.$langs->trans("Qty").'</td><td align="center">'.$langs->trans("VATRate").'</td></tr>';
|
||||
|
||||
for ($i = 1 ; $i < 9 ; $i++)
|
||||
{
|
||||
@ -344,7 +344,7 @@ else
|
||||
*/
|
||||
print "<p><form action=\"fiche.php?facid=$fac->id&action=add_ligne\" method=\"post\">";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Label").'</td><td align="center">P.U. HT</td><td align="center">Quantité</td><td align="center">Total HT</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Label").'</td><td align="center">P.U. HT</td><td align="center">'.$langs->trans("Qty").'</td><td align="center">'.$langs->trans("TotalHT").'</td>';
|
||||
print '<td align="center">'.$langs->trans("VATRate").'</td>';
|
||||
print '<td align="center">'.$langs->trans("VAT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TotalTTC").'</td><td> </td></tr>';
|
||||
@ -467,9 +467,9 @@ else
|
||||
$objp = $db->fetch_object();
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%d %B %Y",$objp->dp)."</TD>\n";
|
||||
print "<td>$objp->paiement_type $objp->num_paiement</TD>\n";
|
||||
print "<td align=\"right\">".price($objp->amount)."</TD><td>".MAIN_MONNAIE."</td>\n";
|
||||
print "<td>".strftime("%d %B %Y",$objp->dp)."</td>\n";
|
||||
print "<td>$objp->paiement_type $objp->num_paiement</td>\n";
|
||||
print "<td align=\"right\">".price($objp->amount)."</td><td>".MAIN_MONNAIE."</td>\n";
|
||||
|
||||
if ($fac->statut == 1 && $fac->paye == 0 && $user->societe_id == 0)
|
||||
{
|
||||
|
||||
@ -273,7 +273,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
|
||||
|
||||
$langs->load("bills");
|
||||
print '<tr><td>'.$langs->trans("VATRate").'</td><td>';
|
||||
print $html->select_tva("tva_tx");
|
||||
print $html->select_tva("tva_tx",$conf->defaulttx);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user