*** empty log message ***
This commit is contained in:
parent
14f90115a1
commit
e82125bc23
@ -344,93 +344,92 @@ print '</table>';
|
||||
*
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre( "Mode de règlement à afficher sur les factures");
|
||||
print_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"));
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
$var=True;
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>Mode règlement à proposer</td>';
|
||||
print '<td>'.$langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print "<td>Proposer paiement par RIB sur le compte</td>";
|
||||
print "<td>";
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql.= " where clos = 0";
|
||||
$sql.= " and courant = 1";
|
||||
if ($db->query($sql))
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
if ($num > 0) {
|
||||
print "<select name=\"rib\">";
|
||||
print '<option value="0">'.$langs->trans("DoNotShow").'</option>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$row = $db->fetch_row($i);
|
||||
|
||||
if ($conf->global->FACTURE_RIB_NUMBER == $row[0])
|
||||
{
|
||||
print '<option value="'.$row[0].'" selected="true">'.$row[1].'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<option value="'.$row[0].'">'.$row[1].'</option>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print "</select>";
|
||||
} else {
|
||||
print "<i>Aucun compte bancaire actif créé</i>";
|
||||
}
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql.= " where clos = 0";
|
||||
$sql.= " and courant = 1";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num > 0) {
|
||||
print "<select name=\"rib\">";
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected="true"':'';
|
||||
print '>'.$row[1].'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</select>";
|
||||
} else {
|
||||
print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("BankModuleNotActive");
|
||||
}
|
||||
print "</td></tr>";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print "<td>Proposer paiement par chèque à l'ordre et adresse du titulaire du compte</td>";
|
||||
print "<td>Proposer paiement par chèque à l'ordre et adresse de</td>";
|
||||
print "<td>";
|
||||
print '<select name="chq">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER?' selected="true"':'').'>'.$langs->trans("Company").' ('.$mysoc->nom.')</option>';
|
||||
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql.= " where clos = 0";
|
||||
$sql.= " and courant = 1";
|
||||
$var=True;
|
||||
if ($db->query($sql))
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num > 0)
|
||||
{
|
||||
print "<select name=\"chq\">";
|
||||
print '<option value="0">'.$langs->trans("DoNotShow").'</option>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$row = $db->fetch_row($i);
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
if ($conf->global->FACTURE_CHQ_NUMBER == $row[0])
|
||||
{
|
||||
print '<option value="'.$row[0].'" selected="true">'.$row[1].'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<option value="'.$row[0].'">'.$row[1].'</option>';
|
||||
}
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected="true"':'';
|
||||
print '>'.$langs->trans("OwnerOfBankAccount",$row[1]).'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</select>";
|
||||
} else {
|
||||
print "<i>Aucun compte bancaire actif créé</i>";
|
||||
}
|
||||
}
|
||||
print "</select>";
|
||||
print "</td></tr>";
|
||||
print "</form>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -121,7 +121,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
*/
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
global $user,$langs,$conf,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
@ -329,13 +329,12 @@ class pdf_crabe extends ModelePDFFactures
|
||||
/*
|
||||
* Mode de règlement
|
||||
*/
|
||||
if ($conf->banque->enable && (! $conf->global->FACTURE_CHQ_NUMBER && ! $conf->global->FACTURE_RIB_NUMBER))
|
||||
if (! $conf->global->FACTURE_CHQ_NUMBER && ! $conf->global->FACTURE_RIB_NUMBER)
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, 228);
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->MultiCell(90, 3, $langs->trans("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->MultiCell(90, 3, $langs->trans("ErrorCreateBankAccount"),0,'L',0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
}
|
||||
|
||||
@ -356,6 +355,15 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->MultiCell(80, 3, $account->adresse_proprio, 0, 'L', 0);
|
||||
}
|
||||
if ($conf->global->FACTURE_CHQ_NUMBER == -1)
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, 227);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->MultiCell(90, 3, "Règlement par chèque à l'ordre de ".$mysoc->nom." envoyé à:",0,'L',0);
|
||||
$pdf->SetXY($this->marge_gauche, 231);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->MultiCell(80, 3, $mysoc->adresse_full, 0, 'L', 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -338,15 +338,16 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
/*
|
||||
* Mode de règlement
|
||||
*/
|
||||
if ($conf->banque->enable && (! $conf->global->FACTURE_CHQ_NUMBER && ! $conf->global->FACTURE_RIB_NUMBER))
|
||||
/*
|
||||
if (! $conf->global->FACTURE_CHQ_NUMBER && ! $conf->global->FACTURE_RIB_NUMBER)
|
||||
{
|
||||
$pdf->SetXY ($this->marge_gauche, 228);
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->MultiCell(90, 3, $langs->trans("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->MultiCell(90, 3, $langs->trans("ErrorCreateBankAccount"),0,'L',0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Propose mode règlement par CHQ
|
||||
|
||||
@ -328,6 +328,10 @@ CompanyTown=Town
|
||||
CompanyCountry=Country
|
||||
CompanyCurrency=Main currency
|
||||
DoNotShow=Do not show
|
||||
DoNotSuggestPaymentMode=Do not suggest
|
||||
NoActiveBankAccountDefined=No active bank account defined
|
||||
OwnerOfBankAccount=Owner of bank account %s
|
||||
BankModuleNotActive=Bank accounts module not enabled
|
||||
ShowBugTrackLink=Show link "Report a bug"
|
||||
ShowWorkBoard=Show "work board" on home page
|
||||
Alerts=Alerts
|
||||
@ -391,6 +395,7 @@ DiscountsPDFModules=Credit note document models
|
||||
Discounts=Discounts
|
||||
ForceInvoiceDate=Force invoice date to validation date
|
||||
DisableRepeatable=Disable repeatable invoices
|
||||
SuggestedPaymentModesIfNotDefinedInInvoice=Suggested Payments mode on invoices if not explicitely defined
|
||||
##### Proposals #####
|
||||
PropalSetup=Commercial proposals module setup
|
||||
CreateForm=Create forms
|
||||
|
||||
@ -328,6 +328,10 @@ CompanyTown=Ville
|
||||
CompanyCountry=Pays
|
||||
CompanyCurrency=Devise principale
|
||||
DoNotShow=Ne pas afficher
|
||||
DoNotSuggestPaymentMode=Ne pas suggérer
|
||||
NoActiveBankAccountDefined=Aucun compte bancaire actif défini
|
||||
OwnerOfBankAccount=Propriétaire du compte %s
|
||||
BankModuleNotActive=Module comptes bancaires non activé
|
||||
ShowBugTrackLink=Afficher le lien "Signaler un bug"
|
||||
ShowWorkBoard=Affiche le tableau de bord de travail sur page accueil
|
||||
Alerts=Alertes
|
||||
@ -391,6 +395,7 @@ DiscountsPDFModules=Mod
|
||||
Discounts=Avoirs
|
||||
ForceInvoiceDate=Forcer la date de facture à la date de validation
|
||||
DisableRepeatable=Désactiver les factures récurrentes
|
||||
SuggestedPaymentModesIfNotDefinedInInvoice=Modes de paiements suggérés sur les factures si non défini explicitement
|
||||
##### Proposals #####
|
||||
PropalSetup=Configuration du module Propositions Commerciales
|
||||
CreateForm=Création formulaire
|
||||
|
||||
@ -484,6 +484,7 @@ $mysoc->tva_intra=$conf->global->MAIN_INFO_TVAINTRA;
|
||||
$mysoc->capital=$conf->global->MAIN_INFO_CAPITAL;
|
||||
$mysoc->forme_juridique_code=$conf->global->MAIN_INFO_FORME_JURIDIQUE;
|
||||
$mysoc->email=$conf->global->MAIN_INFO_SOCIETE_MAIL;
|
||||
$mysoc->adresse_full=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville;
|
||||
|
||||
/* \todo Ajouter une option Gestion de la TVA dans le module compta qui permet de désactiver la fonction TVA
|
||||
* (pour particuliers ou libéraux en franchise)
|
||||
@ -512,4 +513,4 @@ $yesno[0]="no";
|
||||
$yesno[1]="yes";
|
||||
|
||||
if ( ! defined('MENTION_NPR') ) define('MENTION_NPR','(npr)');
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user