New: Maxi debug of withdraw module.
Move module to stable to hope having more user testing/using it.
This commit is contained in:
parent
f6057890bd
commit
2921fc4f44
@ -44,7 +44,7 @@ $result = restrictedArea($user, 'prelevement', '', '', 'bons');*/
|
||||
|
||||
if ($_GET["action"] == "set")
|
||||
{
|
||||
for ($i = 6 ; $i < 7 ; $i++)
|
||||
for ($i = 0 ; $i < 9 ; $i++)
|
||||
{
|
||||
dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
@ -85,30 +85,81 @@ print_fiche_titre($langs->trans("WithdrawalsSetup"),$linkback,'setup');
|
||||
|
||||
print '<form method="post" action="prelevement.php?action=set">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="30%">'.$langs->trans("Parameter").'</td>';
|
||||
print '<td width="40%">'.$langs->trans("Value").'</td>';
|
||||
print '<td width="30%">'.$langs->trans("CurrentValue").'</td>';
|
||||
//print '<td width="30%">'.$langs->trans("CurrentValue").'</td>';
|
||||
print "</tr>\n";
|
||||
print '<tr class="impair"><td>'.$langs->trans("ResponsibleUser").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom6" value="PRELEVEMENT_USER">';
|
||||
print $html->select_users($conf->global->PRELEVEMENT_USER,'value6',1);
|
||||
print '<input type="hidden" name="nom0" value="PRELEVEMENT_USER">';
|
||||
print $html->select_users($conf->global->PRELEVEMENT_USER,'value0',1);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->global->PRELEVEMENT_USER > 0)
|
||||
{
|
||||
$cuser = new User($db);
|
||||
$cuser->fetch($conf->global->PRELEVEMENT_USER);
|
||||
print $cuser->getFullName($langs);
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="3"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="pair"><td>'.$langs->trans("NumeroNationalEmetter").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom1" value="PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR">';
|
||||
print '<input type="text" name="value1" value="'.$conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR.'" size="9" ></td>';
|
||||
print '</tr>';
|
||||
|
||||
/*print_fiche_titre($langs->trans("PleaseSelectCustomerBankBANToWithdraw"),'','');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="action" value="modify">';
|
||||
print '<table class="border" width="100%">';
|
||||
*/
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BankToReceiveWithdraw").'</td></tr>';
|
||||
|
||||
print '<tr class="impair"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom2" value="PRELEVEMENT_RAISON_SOCIALE">';
|
||||
print '<input type="text" name="value2" value="'.$conf->global->PRELEVEMENT_RAISON_SOCIALE.'" size="14" ></td>';
|
||||
print '</tr>';
|
||||
// RIB
|
||||
//print '<tr><td colspan="2">'.$langs->trans("ForCustomerWithBankUsingRIB").'</td></tr>';
|
||||
print '<tr class="pair"><td>'.$langs->trans("BankCode").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom3" value="PRELEVEMENT_CODE_BANQUE">';
|
||||
print '<input type="text" name="value3" value="'.$conf->global->PRELEVEMENT_CODE_BANQUE.'" size="6" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair"><td>'.$langs->trans("DeskCode").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom4" value="PRELEVEMENT_CODE_GUICHET">';
|
||||
print '<input type="text" name="value4" value="'.$conf->global->PRELEVEMENT_CODE_GUICHET.'" size="6" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair"><td>'.$langs->trans("AccountNumber").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom5" value="PRELEVEMENT_NUMERO_COMPTE">';
|
||||
print '<input type="text" name="value5" value="'.$conf->global->PRELEVEMENT_NUMERO_COMPTE.'" size="11" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair"><td>'.$langs->trans("BankAccountNumberKey").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom6" value="PRELEVEMENT_NUMBER_KEY">';
|
||||
print '<input type="text" name="value6" value="'.$conf->global->PRELEVEMENT_NUMBER_KEY.'" size="11" ></td>';
|
||||
print '</tr>';
|
||||
// BAN/BIC/SWIFT
|
||||
//print '<tr><td colspan="2">'.$langs->trans("ForCustomerWithBankUsingBANBIC").'</td></tr>';
|
||||
print '<tr class="pair"><td>'.$langs->trans("IBAN").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom7" value="PRELEVEMENT_IBAN">';
|
||||
print '<input type="text" name="value7" value="'.$conf->global->PRELEVEMENT_IBAN.'" size="11" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair"><td>'.$langs->trans("BIC").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom8" value="PRELEVEMENT_BIC">';
|
||||
print '<input type="text" name="value8" value="'.$conf->global->PRELEVEMENT_BIC.'" size="11" ></td>';
|
||||
print '</tr>';
|
||||
|
||||
/*print '<tr class="pair"><td colspan="2" align="center">';
|
||||
print '<input type="submit" class="button" name="modify" value="'.dol_escape_htmltag($langs->trans("Modify")).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
print '<tr><td align="center" colspan="3"><br><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
@ -177,15 +228,8 @@ if ($resql)
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.$obj->firstname." ".$obj->name.'</td>';
|
||||
print '<td>'.$obj->titre.'</td>';
|
||||
|
||||
if ($user->rights->prelevement->bons->configurer)
|
||||
{
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=deletenotif&notif='.$obj->code.'">'.img_delete().'</a></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '</tr>';
|
||||
}
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=deletenotif&notif='.$obj->code.'">'.img_delete().'</a></td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
@ -1937,7 +1937,7 @@ else
|
||||
$totaldeposits = $fac->getSumDepositsUsed();
|
||||
//print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits;
|
||||
|
||||
// We cal also use bcadd to avoid pb with floating points
|
||||
// We can also use bcadd to avoid pb with floating points
|
||||
// For example print 239.2 - 229.3 - 9.9; does not return 0.
|
||||
//$resteapayer=bcadd($fac->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
//$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
@ -2328,72 +2328,6 @@ else
|
||||
|
||||
$var=true;
|
||||
|
||||
// Payments already done (from deposits)
|
||||
/*
|
||||
$depositamount=0;
|
||||
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
|
||||
$sql.= " re.description, re.fk_facture_source, re.fk_facture_source";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re";
|
||||
$sql.= " WHERE fk_facture = ".$fac->id;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$numdeposits = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$invoice=new Facture($db);
|
||||
// Loop on each deposit applied
|
||||
while ($i < $numdeposits)
|
||||
{
|
||||
$objinvoice = $db->fetch_object($resql);
|
||||
$invoice->fetch($objinvoice->fk_facture_source);
|
||||
if ($invoice->type != 3) continue; // only deposits
|
||||
|
||||
// For each deposits, get payments
|
||||
$sql = 'SELECT datep as dp, pf.amount,';
|
||||
$sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p, '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf';
|
||||
$sql.= ' WHERE pf.fk_facture = '.$invoice->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid';
|
||||
$sql.= ' ORDER BY dp, tms';
|
||||
|
||||
$resqlpayment = $db->query($sql);
|
||||
if ($resqlpayment)
|
||||
{
|
||||
$numpayments = $db->num_rows($resqlpayment);
|
||||
$j = 0;
|
||||
while ($j < $numpayments)
|
||||
{
|
||||
$objpayment = $db->fetch_object($resqlpayement);
|
||||
$var=!$var;
|
||||
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objpayment->rowid.'">'.img_object($langs->trans('ShowPayment'),'payment').' ';
|
||||
print dol_print_date($db->jdate($objpayment->dp),'day').'</a>';
|
||||
|
||||
print ' ('.$langs->trans("Deposit").' ';
|
||||
print $invoice->getNomUrl(0).')';
|
||||
|
||||
print '</td>';
|
||||
print '<td>'.$objpayment->paiement_type.' '.$objpayement->num_paiement.'</td>';
|
||||
print '<td align="right">'.price($objpayment->amount).'</td>';
|
||||
// Remove deposit invoice
|
||||
print '<td align="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=unlinkdiscount&discountid='.$objinvoice->rowid.'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$j++;
|
||||
$depositamount += $obj->amount;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
*/
|
||||
|
||||
// Payments already done (from payment on this invoice)
|
||||
$sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid,';
|
||||
$sql.= ' c.code as payment_code, c.libelle as payment_label,';
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
require("../../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
|
||||
|
||||
if (!$user->rights->facture->lire)
|
||||
@ -41,8 +42,8 @@ $langs->load("withdrawals");
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
$socid = $user->societe_id;
|
||||
$action = '';
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
|
||||
@ -52,34 +53,34 @@ if ($user->societe_id > 0)
|
||||
|
||||
if ($_GET["action"] == "new")
|
||||
{
|
||||
$fact = new Facture($db);
|
||||
if ($fact->fetch($_GET["facid"]))
|
||||
{
|
||||
$result = $fact->demande_prelevement($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
Header("Location: prelevement.php?facid=".$fact->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg='<div class="error">'.$fact->error.'</div>';
|
||||
}
|
||||
}
|
||||
$fact = new Facture($db);
|
||||
if ($fact->fetch($_GET["facid"]))
|
||||
{
|
||||
$result = $fact->demande_prelevement($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
Header("Location: prelevement.php?facid=".$fact->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg='<div class="error">'.$fact->error.'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET["action"] == "delete")
|
||||
{
|
||||
$fact = new Facture($db);
|
||||
if ($fact->fetch($_GET["facid"]))
|
||||
{
|
||||
$result = $fact->demande_prelevement_delete($user,$_GET["did"]);
|
||||
if ($result == 0)
|
||||
{
|
||||
Header("Location: prelevement.php?facid=".$fact->id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$fact = new Facture($db);
|
||||
if ($fact->fetch($_GET["facid"]))
|
||||
{
|
||||
$result = $fact->demande_prelevement_delete($user,$_GET["did"]);
|
||||
if ($result == 0)
|
||||
{
|
||||
Header("Location: prelevement.php?facid=".$fact->id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -101,229 +102,457 @@ $html = new Form($db);
|
||||
|
||||
if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
|
||||
{
|
||||
$fac = new Facture($db);
|
||||
if ($fac->fetch($_REQUEST["facid"], $_REQUEST["ref"]) > 0)
|
||||
{
|
||||
if ($mesg) print $mesg.'<br>';
|
||||
$fac = new Facture($db);
|
||||
if ($fac->fetch($_REQUEST["facid"], $_REQUEST["ref"]) > 0)
|
||||
{
|
||||
if ($mesg) print $mesg.'<br>';
|
||||
|
||||
$soc = new Societe($db, $fac->socid);
|
||||
$soc->fetch($fac->socid);
|
||||
$soc = new Societe($db, $fac->socid);
|
||||
$soc->fetch($fac->socid);
|
||||
|
||||
$author = new User($db);
|
||||
if ($fac->user_author)
|
||||
{
|
||||
$author->fetch($fac->user_author);
|
||||
}
|
||||
$totalpaye = $fac->getSommePaiement();
|
||||
$totalcreditnotes = $fac->getSumCreditNotesUsed();
|
||||
$totaldeposits = $fac->getSumDepositsUsed();
|
||||
//print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits;
|
||||
|
||||
$head = facture_prepare_head($fac);
|
||||
dol_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer'),0,'bill');
|
||||
// We can also use bcadd to avoid pb with floating points
|
||||
// For example print 239.2 - 229.3 - 9.9; does not return 0.
|
||||
//$resteapayer=bcadd($fac->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
//$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
$resteapayer = price2num($fac->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT');
|
||||
|
||||
/*
|
||||
* Facture
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
if ($fac->paye) $resteapayer=0;
|
||||
$resteapayeraffiche=$resteapayer;
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="5">';
|
||||
$morehtmlref='';
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$result=$discount->fetch(0,$fac->id);
|
||||
if ($result > 0)
|
||||
{
|
||||
$morehtmlref=' ('.$langs->trans("CreditNoteConvertedIntoDiscount",$discount->getNomUrl(1,'discount')).')';
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error('',$discount->error);
|
||||
}
|
||||
print $html->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref);
|
||||
print "</td></tr>";
|
||||
$absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL');
|
||||
$absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL');
|
||||
$absolute_discount=price2num($absolute_discount,'MT');
|
||||
$absolute_creditnote=price2num($absolute_creditnote,'MT');
|
||||
|
||||
// Societe
|
||||
print '<tr><td width="20%">'.$langs->trans("Company").'</td>';
|
||||
print '<td colspan="5">'.$soc->getNomUrl(1,'compta');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$author = new User($db);
|
||||
if ($fac->user_author)
|
||||
{
|
||||
$author->fetch($fac->user_author);
|
||||
}
|
||||
|
||||
// Dates
|
||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||
print '<td colspan="3">'.dol_print_date($fac->date,"daytext").'</td>';
|
||||
print '<td>'.$langs->trans("DateMaxPayment").'</td><td>' . dol_print_date($fac->date_lim_reglement,"daytext");
|
||||
if ($fac->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $fac->paye && $fac->statut == 1 && ! $fac->am) print img_warning($langs->trans("Late"));
|
||||
print "</td></tr>";
|
||||
$head = facture_prepare_head($fac);
|
||||
|
||||
// Conditions et modes de r<>glement
|
||||
print '<tr><td>'.$langs->trans("PaymentConditions").'</td><td colspan="3">';
|
||||
$html->form_conditions_reglement($_SERVER["PHP_SELF"]."?facid=$fac->id",$fac->cond_reglement_id,"none");
|
||||
print '</td>';
|
||||
print '<td width="25%">'.$langs->trans("PaymentMode").'</td><td width="25%">';
|
||||
$html->form_modes_reglement($_SERVER["PHP_SELF"]."?facid=$fac->id",$fac->mode_reglement_id,"none");
|
||||
print '</td></tr>';
|
||||
dol_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer'),0,'bill');
|
||||
|
||||
print '<tr><td>'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right" colspan="2"><b>'.price($fac->total_ht).'</b></td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td><td colspan="2"> </td></tr>';
|
||||
/*
|
||||
* Facture
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td>'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right" colspan="2"><b>'.price($fac->total_ttc).'</b></td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td><td colspan="2"> </td></tr>';
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="5">';
|
||||
$morehtmlref='';
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$result=$discount->fetch(0,$fac->id);
|
||||
if ($result > 0)
|
||||
{
|
||||
$morehtmlref=' ('.$langs->trans("CreditNoteConvertedIntoDiscount",$discount->getNomUrl(1,'discount')).')';
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error('',$discount->error);
|
||||
}
|
||||
print $html->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref);
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans("RIB").'</td><td colspan="5">';
|
||||
print $soc->display_rib();
|
||||
print '</td></tr>';
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans('Company').'</td>';
|
||||
print '<td colspan="5">'.$soc->getNomUrl(1,'compta');
|
||||
print ' (<a href="'.DOL_URL_ROOT.'/compta/facture.php?socid='.$fac->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans('Type').'</td><td colspan="5">';
|
||||
print $fac->getLibType();
|
||||
if ($fac->type == 1)
|
||||
{
|
||||
$facreplaced=new Facture($db);
|
||||
$facreplaced->fetch($fac->fk_facture_source);
|
||||
print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')';
|
||||
}
|
||||
if ($fac->type == 2)
|
||||
{
|
||||
$facusing=new Facture($db);
|
||||
$facusing->fetch($fac->fk_facture_source);
|
||||
print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')';
|
||||
}
|
||||
|
||||
/*
|
||||
* Withdrawal request
|
||||
*/
|
||||
$facidavoir=$fac->getListIdAvoirFromInvoice();
|
||||
if (sizeof($facidavoir) > 0)
|
||||
{
|
||||
print ' ('.$langs->transnoentities("InvoiceHasAvoir");
|
||||
$i=0;
|
||||
foreach($facidavoir as $id)
|
||||
{
|
||||
if ($i==0) print ' ';
|
||||
else print ',';
|
||||
$facavoir=new Facture($db);
|
||||
$facavoir->fetch($id);
|
||||
print $facavoir->getNomUrl(1);
|
||||
}
|
||||
print ')';
|
||||
}
|
||||
if ($facidnext > 0)
|
||||
{
|
||||
$facthatreplace=new Facture($db);
|
||||
$facthatreplace->fetch($facidnext);
|
||||
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande";
|
||||
$sql .= " , pfd.date_traite as date_traite";
|
||||
$sql .= " , pfd.amount";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE fk_facture = ".$fac->id;
|
||||
$sql .= " AND pfd.fk_user_demande = u.rowid";
|
||||
$sql .= " AND pfd.traite = 0";
|
||||
$sql .= " ORDER BY pfd.date_demande DESC";
|
||||
// Discounts
|
||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="5">';
|
||||
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
|
||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
print '. ';
|
||||
if ($absolute_discount > 0)
|
||||
{
|
||||
if ($fac->statut > 0 || $fac->type == 2 || $fac->type == 3)
|
||||
{
|
||||
if ($fac->statut == 0)
|
||||
{
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie)).'. ';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($fac->statut < 1 || $fac->type == 2 || $fac->type == 3)
|
||||
{
|
||||
$text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
|
||||
print '<br>'.$text.'.<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
|
||||
$text2=$langs->trans("AbsoluteDiscountUse");
|
||||
print $html->textwithpicto($text,$text2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remise dispo de type non avoir
|
||||
$filter='fk_facture_source IS NULL';
|
||||
print '<br>';
|
||||
$html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id',$soc->id,$absolute_discount,$filter,$resteapayer);
|
||||
}
|
||||
}
|
||||
if ($absolute_creditnote > 0)
|
||||
{
|
||||
// If validated, we show link "add credit note to payment"
|
||||
if ($fac->statut != 1 || $fac->type == 2 || $fac->type == 3)
|
||||
{
|
||||
if ($fac->statut == 0 && $fac->type != 3)
|
||||
{
|
||||
$text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie));
|
||||
print $html->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
|
||||
}
|
||||
else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'.';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remise dispo de type avoir
|
||||
$filter='fk_facture_source IS NOT NULL';
|
||||
if (! $absolute_discount) print '<br>';
|
||||
$html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id_for_payment',$soc->id,$absolute_creditnote,$filter,$resteapayer);
|
||||
}
|
||||
}
|
||||
if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
|
||||
print '</td></tr>';
|
||||
|
||||
$result_sql = $db->query($sql);
|
||||
if ($result_sql)
|
||||
{
|
||||
$num = $db->num_rows($result_sql);
|
||||
}
|
||||
// Date invoice
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Date');
|
||||
print '</td>';
|
||||
if ($fac->type != 2 && $_GET['action'] != 'editinvoicedate' && $fac->brouillon && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editinvoicedate&facid='.$fac->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
|
||||
if ($fac->type != 2)
|
||||
{
|
||||
if ($_GET['action'] == 'editinvoicedate')
|
||||
{
|
||||
$html->form_date($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->date,'invoicedate');
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_print_date($fac->date,'daytext');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_print_date($fac->date,'daytext');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date payment term
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DateMaxPayment');
|
||||
print '</td>';
|
||||
if ($fac->type != 2 && $_GET['action'] != 'editpaymentterm' && $fac->brouillon && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editpaymentterm&facid='.$fac->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($fac->type != 2)
|
||||
{
|
||||
if ($_GET['action'] == 'editpaymentterm')
|
||||
{
|
||||
$html->form_date($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->date_lim_reglement,'paymentterm');
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_print_date($fac->date_lim_reglement,'daytext');
|
||||
if ($fac->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $fac->paye && $fac->statut == 1 && ! $fac->am) print img_warning($langs->trans('Late'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Conditions de reglement
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($fac->type != 2 && $_GET['action'] != 'editconditions' && $fac->brouillon && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&facid='.$fac->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($fac->type != 2)
|
||||
{
|
||||
if ($_GET['action'] == 'editconditions')
|
||||
{
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'cond_reglement_id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'none');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Mode de reglement
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editmode' && $fac->brouillon && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&facid='.$fac->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($_GET['action'] == 'editmode')
|
||||
{
|
||||
$html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'mode_reglement_id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'none');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Montants
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td>';
|
||||
print '<td align="right" colspan="2" nowrap>'.price($fac->total_ht).'</td>';
|
||||
print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right" colspan="2" nowrap>'.price($fac->total_tva).'</td>';
|
||||
print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->pays_code=='ES')
|
||||
{
|
||||
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>';
|
||||
print '<td align="right" colspan="2" nowrap>'.price($fac->total_localtax1).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>';
|
||||
print '<td align="right" colspan="2" nowrap>'.price($fac->total_localtax2).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right" colspan="2" nowrap>'.price($fac->total_ttc).'</td>';
|
||||
print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans('Status').'</td>';
|
||||
print '<td align="left" colspan="3">'.($fac->getLibStatut(4,$totalpaye)).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("RIB").'</td><td colspan="5">';
|
||||
print $soc->display_rib();
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
/*
|
||||
* Withdrawal request
|
||||
*/
|
||||
|
||||
// Add a withdraw request
|
||||
if ($fac->statut > 0 && $fac->paye == 0 && $num == 0)
|
||||
{
|
||||
if ($user->rights->prelevement->bons->configurer)
|
||||
{
|
||||
print '<a class="butAction" href="prelevement.php?facid='.$fac->id.'&action=new">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
}
|
||||
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande";
|
||||
$sql .= " , pfd.date_traite as date_traite";
|
||||
$sql .= " , pfd.amount";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE fk_facture = ".$fac->id;
|
||||
$sql .= " AND pfd.fk_user_demande = u.rowid";
|
||||
$sql .= " AND pfd.traite = 0";
|
||||
$sql .= " ORDER BY pfd.date_demande DESC";
|
||||
|
||||
print "</div><br/>";
|
||||
$result_sql = $db->query($sql);
|
||||
if ($result_sql)
|
||||
{
|
||||
$num = $db->num_rows($result_sql);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Withdrawals
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
print "\n<div class=\"tabsAction\">\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left">'.$langs->trans("DateRequest").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateProcess").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="center">'.$langs->trans("WithdrawalReceipt").'</td>';
|
||||
print '<td align="center">'.$langs->trans("User").'</td><td> </td><td> </td>';
|
||||
print '</tr>';
|
||||
$var=True;
|
||||
// Add a withdraw request
|
||||
if ($fac->statut > 0 && $fac->paye == 0 && $num == 0)
|
||||
{
|
||||
if ($user->rights->prelevement->bons->creer)
|
||||
{
|
||||
print '<a class="butAction" href="prelevement.php?facid='.$fac->id.'&action=new">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result_sql)
|
||||
{
|
||||
$i = 0;
|
||||
print "</div><br>\n";
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result_sql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td align="left">'.dol_print_date($db->jdate($obj->date_demande),'day')."</td>\n";
|
||||
print '<td align="center">'.$langs->trans("OrderWaiting").'</td>';
|
||||
print '<td align="center">'.price($obj->amount).'</td>';
|
||||
print '<td align="center">-</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print '<td> </td>';
|
||||
print '<td>';
|
||||
print '<a href="prelevement.php?facid='.$fac->id.'&action=delete&did='.$obj->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
/*
|
||||
* Withdrawals
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$db->free($result_sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left">'.$langs->trans("DateRequest").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateProcess").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="center">'.$langs->trans("WithdrawalReceipt").'</td>';
|
||||
print '<td align="center">'.$langs->trans("User").'</td><td> </td><td> </td>';
|
||||
print '</tr>';
|
||||
$var=True;
|
||||
|
||||
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande";
|
||||
$sql .= " , pfd.date_traite";
|
||||
$sql .= " , pfd.fk_prelevement_bons, pfd.amount";
|
||||
$sql .= " , u.rowid as user_id, u.name, u.firstname, u.login";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE fk_facture = ".$fac->id;
|
||||
$sql .= " AND pfd.fk_user_demande = u.rowid";
|
||||
$sql .= " AND pfd.traite = 1";
|
||||
$sql .= " ORDER BY pfd.date_demande DESC";
|
||||
if ($result_sql)
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result_sql);
|
||||
$var=!$var;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td align="left">'.dol_print_date($db->jdate($obj->date_demande),'day')."</td>\n";
|
||||
print '<td align="center">'.$langs->trans("OrderWaiting").'</td>';
|
||||
print '<td align="center">'.price($obj->amount).'</td>';
|
||||
print '<td align="center">-</td>';
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print '<td> </td>';
|
||||
print '<td>';
|
||||
print '<a href="prelevement.php?facid='.$fac->id.'&action=delete&did='.$obj->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
$db->free($result_sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_demande))."</td>\n";
|
||||
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande,";
|
||||
$sql.= " pfd.date_traite, pfd.fk_prelevement_bons, pfd.amount,";
|
||||
$sql.= " pb.ref,";
|
||||
$sql.= " u.rowid as user_id, u.name, u.firstname, u.login";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_bons as pb,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE fk_facture = ".$fac->id;
|
||||
$sql.= " AND pfd.fk_user_demande = u.rowid";
|
||||
$sql.= " AND pb.rowid = pfd.fk_prelevement_bons";
|
||||
$sql.= " AND pfd.traite = 1";
|
||||
$sql.= " ORDER BY pfd.date_demande DESC";
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_traite))."</td>\n";
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print '<td align="center">'.price($obj->amount).'</td>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
|
||||
print '<td align="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$obj->fk_prelevement_bons;
|
||||
print '">'.$obj->fk_prelevement_bons."</a></td>\n";
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
print '<td align="left">'.dol_print_date($db->jdate($obj->date_demande),'day')."</td>\n";
|
||||
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_traite),'day')."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print '<td align="center">'.price($obj->amount).'</td>';
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print '<td align="center">';
|
||||
$withdrawreceipt=new BonPrelevement($db);
|
||||
$withdrawreceipt->id=$obj->fk_prelevement_bons;
|
||||
$withdrawreceipt->ref=$obj->ref;
|
||||
print $withdrawreceipt->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print "</table>";
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Invoice not found */
|
||||
print $langs->trans("ErrorBillNotFound",$_GET["facid"]);
|
||||
}
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Invoice not found */
|
||||
print $langs->trans("ErrorBillNotFound",$_GET["facid"]);
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -47,6 +47,8 @@ class BonPrelevement extends CommonObject
|
||||
var $total;
|
||||
var $_fetched;
|
||||
|
||||
var $statut; // 0-Wait, 1-Trans, 2-Done
|
||||
|
||||
|
||||
function BonPrelevement($DB, $filename='')
|
||||
{
|
||||
@ -217,7 +219,7 @@ class BonPrelevement extends CommonObject
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.amount, p.note, p.credite";
|
||||
$sql = "SELECT p.rowid, p.ref, p.amount, p.note";
|
||||
$sql.= ", p.datec as dc";
|
||||
$sql.= ", p.date_trans as date_trans";
|
||||
$sql.= ", p.method_trans, p.fk_user_trans";
|
||||
@ -241,7 +243,6 @@ class BonPrelevement extends CommonObject
|
||||
$this->amount = $obj->amount;
|
||||
$this->note = $obj->note;
|
||||
$this->datec = $this->db->jdate($obj->dc);
|
||||
$this->credite = $obj->credite;
|
||||
|
||||
$this->date_trans = $this->db->jdate($obj->date_trans);
|
||||
$this->method_trans = $obj->method_trans;
|
||||
@ -271,8 +272,7 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function set_credite()
|
||||
{
|
||||
@ -282,9 +282,9 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
if ($this->db->begin())
|
||||
{
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_bons ";
|
||||
$sql.= " SET credite = 1";
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_bons";
|
||||
$sql.= " SET statut = 1";
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
$result=$this->db->query($sql);
|
||||
@ -301,7 +301,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
for ($i = 0 ; $i < sizeof($facs) ; $i++)
|
||||
{
|
||||
/* Tag la facture comme impay<61>e */
|
||||
/* Tag invoice as payed */
|
||||
dol_syslog("BonPrelevement::set_credite set_paid fac ".$facs[$i]);
|
||||
$fac = new Facture($this->db);
|
||||
$fac->fetch($facs[$i]);
|
||||
@ -312,7 +312,7 @@ class BonPrelevement extends CommonObject
|
||||
if ($error == 0)
|
||||
{
|
||||
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes ";
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes";
|
||||
$sql.= " SET statut = 2";
|
||||
$sql.= " WHERE fk_prelevement_bons = ".$this->id;
|
||||
|
||||
@ -334,18 +334,14 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->db->rollback();
|
||||
dol_syslog("BonPrelevement::set_credite ROLLBACK ");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
dol_syslog("BonPrelevement::set_credite Ouverture transaction SQL impossible ");
|
||||
return -2;
|
||||
}
|
||||
@ -602,18 +598,17 @@ class BonPrelevement extends CommonObject
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT sum(f.total_ttc)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
//$sql.= " ,".MAIN_DB_PREFIX."c_paiement as cp";
|
||||
$sql.= " WHERE f.fk_statut = 1";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.rowid = pfd.fk_facture";
|
||||
$sql.= " AND f.paye = 0";
|
||||
$sql.= " AND pfd.traite = 0";
|
||||
$sql.= " AND f.total_ttc > 0";
|
||||
$sql.= " AND f.fk_mode_reglement = 3";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if ( $resql )
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
@ -1171,10 +1166,6 @@ class BonPrelevement extends CommonObject
|
||||
*/
|
||||
$this->total = 0;
|
||||
|
||||
/*$sql = "SELECT rowid, client_nom, code_banque, code_guichet, number, amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes";
|
||||
$sql .= " WHERE fk_prelevement_bons = ".$this->id;
|
||||
*/
|
||||
$sql = "SELECT pl.rowid, pl.client_nom, pl.code_banque, pl.code_guichet, pl.number, pl.amount,";
|
||||
$sql.= " f.facnumber, pf.fk_facture";
|
||||
$sql.= " FROM";
|
||||
@ -1230,7 +1221,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Write recipient of withdraw (me)
|
||||
* Write recipient of request (customer)
|
||||
* @param rowid Id of line
|
||||
* @param client_nom Name of customer
|
||||
* @param rib_banque
|
||||
@ -1299,7 +1290,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Write sender (customer)
|
||||
* Write sender of request (me)
|
||||
*/
|
||||
function EnregEmetteur()
|
||||
{
|
||||
|
||||
@ -29,6 +29,7 @@ require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||
|
||||
$langs->load("widthdrawals");
|
||||
$langs->load("companies");
|
||||
@ -44,6 +45,15 @@ $result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Change customer bank information to withdraw
|
||||
if ($_POST["action"] == 'modify')
|
||||
{
|
||||
for ($i = 1 ; $i < 9 ; $i++)
|
||||
{
|
||||
dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'create')
|
||||
{
|
||||
$bprev = new BonPrelevement($db);
|
||||
@ -80,6 +90,7 @@ dol_fiche_head($head, $hselected, $langs->trans("StandingOrders"), 0, 'payment')
|
||||
$nb=$bprev->NbFactureAPrelever();
|
||||
$nb1=$bprev->NbFactureAPrelever(1);
|
||||
$nb11=$bprev->NbFactureAPrelever(1,1);
|
||||
$pricetowithdraw=$bprev->SommeAPrelever();
|
||||
if ($nb < 0 || $nb1 < 0 || $nb11 < 0)
|
||||
{
|
||||
dol_print_error($bprev->error);
|
||||
@ -91,102 +102,52 @@ print '<td align="right">';
|
||||
print $nb;
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print_fiche_titre($langs->trans("PleaseSelectCustomerBankBANToWithdraw"),'','');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr class="pair"><td>'.$langs->trans("NumeroNationalEmetter").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom1" value="PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR">';
|
||||
print '<input type="text" name="value1" value="'.$conf->global->PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR.'" size="9" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom2" value="PRELEVEMENT_RAISON_SOCIALE">';
|
||||
print '<input type="text" name="value2" value="'.$conf->global->PRELEVEMENT_RAISON_SOCIALE.'" size="14" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair"><td>'.$langs->trans("BankCode").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom3" value="PRELEVEMENT_CODE_BANQUE">';
|
||||
print '<input type="text" name="value3" value="'.$conf->global->PRELEVEMENT_CODE_BANQUE.'" size="6" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair"><td>'.$langs->trans("DeskCode").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom4" value="PRELEVEMENT_CODE_GUICHET">';
|
||||
print '<input type="text" name="value4" value="'.$conf->global->PRELEVEMENT_CODE_GUICHET.'" size="6" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair"><td>'.$langs->trans("AccountNumber").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<input type="hidden" name="nom5" value="PRELEVEMENT_NUMERO_COMPTE">';
|
||||
print '<input type="text" name="value5" value="'.$conf->global->PRELEVEMENT_NUMERO_COMPTE.'" size="11" ></td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair"><td colspan="2" align="center">';
|
||||
print '<input type="submit" class="button" name="modify" value="'.dol_escape_htmltag($langs->trans("Modify")).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdraw").' + '.$langs->trans("ThirdPartyBankCode").'='.$conf->global->PRELEVEMENT_CODE_BANQUE.'</td><td align="right">';
|
||||
print $nb1;
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdraw").' + '.$langs->trans("ThirdPartyBankCode").'='.$conf->global->PRELEVEMENT_CODE_BANQUE.' + '.$langs->trans("ThirdPartyDeskCode").'='.$conf->global->PRELEVEMENT_CODE_GUICHET.'</td><td align="right">';
|
||||
print $nb11;
|
||||
print '</td></tr>';
|
||||
|
||||
$pricetowithdraw=$bprev->SommeAPrelever();
|
||||
|
||||
print '<tr><td>'.$langs->trans("AmountToWithdraw").'</td>';
|
||||
print '<td align="right">';
|
||||
print price($pricetowithdraw);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
//print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdraw").' + '.$langs->trans("ThirdPartyBankCode").'='.$conf->global->PRELEVEMENT_CODE_BANQUE.'</td><td align="right">';
|
||||
//print $nb1;
|
||||
//print '</td></tr>';
|
||||
|
||||
//print '<tr><td>'.$langs->trans("NbOfInvoiceToWithdrawWithInfo").'</td><td align="right">';
|
||||
//print $nb11;
|
||||
//print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
|
||||
if ($nb)
|
||||
{
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
|
||||
if ($nb)
|
||||
{
|
||||
if ($pricetowithdraw) print '<a class="butAction" href="create.php?action=create">'.$langs->trans("CreateAll")."</a>\n";
|
||||
else print '<a class="butActionRefused" href="#">'.$langs->trans("CreateAll")."</a>\n";
|
||||
}
|
||||
if ($nb11) print '<a class="butAction" href="create.php?action=create&banque=1">'.$langs->trans("CreateBanque")."</a>\n";
|
||||
if ($nb1) print '<a class="butAction" href="create.php?action=create&banque=1&guichet=1">'.$langs->trans("CreateGuichet")."</a>\n";
|
||||
|
||||
print "</div>\n";
|
||||
if ($pricetowithdraw) print '<a class="butAction" href="create.php?action=create">'.$langs->trans("CreateAll")."</a>\n";
|
||||
else print '<a class="butActionRefused" href="#">'.$langs->trans("CreateAll")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoInvoiceToWithdraw").'<br>';
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NoInvoiceToWithdraw")).'">'.$langs->trans("CreateAll")."</a>\n";
|
||||
}
|
||||
print '<br>';
|
||||
//if ($nb11) print '<a class="butAction" href="create.php?action=create&banque=1">'.$langs->trans("CreateBanque")."</a>\n";
|
||||
//if ($nb1) print '<a class="butAction" href="create.php?action=create&banque=1&guichet=1">'.$langs->trans("CreateGuichet")."</a>\n";
|
||||
|
||||
print "</div>\n";
|
||||
print '<br>';
|
||||
|
||||
|
||||
/*
|
||||
* Invoices waiting for withdraw
|
||||
*/
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, s.nom, s.rowid as socid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, s.nom, s.rowid as socid,";
|
||||
$sql.= " pfd.date_demande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql.= " WHERE s.rowid = f.fk_soc";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND pfd.traite = 0";
|
||||
@ -208,6 +169,7 @@ if ($resql)
|
||||
print '<td>'.$langs->trans("Invoice").'</td>';
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateRequest").'</td>';
|
||||
print '</tr>';
|
||||
$var = True;
|
||||
while ($i < $num && $i < 20)
|
||||
@ -225,7 +187,11 @@ if ($resql)
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print price($obj->total_ttc).' '.$langs->trans("Currency".$conf->monnaie)."</td>\n";
|
||||
print price($obj->total_ttc).' '.$langs->trans("Currency".$conf->monnaie);
|
||||
print '</td>';
|
||||
// Date
|
||||
print '<td align="right">';
|
||||
print dol_print_date($db->jdate($obj->date_demande),'day');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -19,11 +19,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/prelevement/demandes.php
|
||||
\brief Page de la liste des demandes de prelevements
|
||||
\version $Id$
|
||||
* \file htdocs/compta/prelevement/demandes.php
|
||||
* \brief Page to list withdraw requests
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require('../../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT."/includes/modules/modPrelevement.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
||||
@ -62,15 +61,15 @@ if (! $sortfield) $sortfield="f.facnumber";
|
||||
|
||||
/*
|
||||
* Liste de demandes
|
||||
*
|
||||
*/
|
||||
|
||||
$sql= "SELECT f.facnumber, f.rowid, s.nom, s.rowid as socid";
|
||||
$sql.= ", pfd.date_demande as date_demande";
|
||||
$sql.= ", pfd.fk_user_demande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql= "SELECT f.facnumber, f.rowid, f.total_ttc,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " pfd.date_demande as date_demande,";
|
||||
$sql.= " pfd.fk_user_demande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.rowid = f.fk_soc";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
@ -102,13 +101,14 @@ if ($resql)
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Bill").'</td><td class="liste_titre">'.$langs->trans("Company").'</td>';
|
||||
print '<td class="liste_titre" align="center">'.$langs->trans("DateRequest").'</td>';
|
||||
print '<td class="liste_titre" align="center">'.$langs->trans("Author").'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("DateRequest").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<form action="demandes.php" method="GET">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="GET">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_facture" size="12" value="'.$GET["search_facture"].'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_societe" size="18" value="'.$GET["search_societe"].'"></td>';
|
||||
print '<td colspan="2" class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'"></td>';
|
||||
@ -138,18 +138,9 @@ if ($resql)
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_demande),'day').'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
|
||||
if (!array_key_exists($obj->fk_user_demande,$users))
|
||||
{
|
||||
$users[$obj->fk_user_demande] = new User($db);
|
||||
$users[$obj->fk_user_demande]->fetch($obj->fk_user_demande);
|
||||
}
|
||||
|
||||
// User
|
||||
print '<td align="center">';
|
||||
print $users[$obj->fk_user_demande]->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->date_demande),'day').'</td>';
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -76,7 +76,7 @@ if ($_GET["id"])
|
||||
|
||||
if ($bon->fetch($_GET["id"]) == 0)
|
||||
{
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"));
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
|
||||
@ -76,7 +76,7 @@ if ($_GET["id"])
|
||||
|
||||
if ($bon->fetch($_GET["id"]) == 0)
|
||||
{
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"));
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
|
||||
@ -77,7 +77,7 @@ if ($prev_id)
|
||||
|
||||
if ($bon->fetch($_GET["id"]) == 0)
|
||||
{
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"));
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -44,7 +44,7 @@ if ($user->societe_id > 0) accessforbidden();
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_POST["action"] == 'confirm_credite' && $_POST["confirm"] == yes)
|
||||
if (GETPOST("action") == 'confirm_credite' && GETPOST("confirm") == 'yes')
|
||||
{
|
||||
$bon = new BonPrelevement($db,"");
|
||||
$bon->id = $_GET["id"];
|
||||
@ -54,7 +54,7 @@ if ($_POST["action"] == 'confirm_credite' && $_POST["confirm"] == yes)
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'infotrans')
|
||||
if (GETPOST("action") == 'infotrans')
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
|
||||
|
||||
@ -71,17 +71,18 @@ if ($_POST["action"] == 'infotrans')
|
||||
|
||||
$bon->set_infotrans($user, $dt, $_POST["methode"]);
|
||||
}
|
||||
|
||||
Header("Location: fiche.php?id=".$_GET["id"]);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Fichier invalide",LOG_WARNING);
|
||||
$mesg='BadFile';
|
||||
}
|
||||
|
||||
Header("Location: fiche.php?id=".$_GET["id"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'infocredit')
|
||||
if (GETPOST("action") == 'infocredit')
|
||||
{
|
||||
$bon = new BonPrelevement($db,"");
|
||||
$bon->fetch($_GET["id"]);
|
||||
@ -97,8 +98,10 @@ if ($_POST["action"] == 'infocredit')
|
||||
{
|
||||
Header("Location: fiche.php?id=".$_GET["id"]."&error=$error");
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -144,7 +147,7 @@ if ($_GET["id"])
|
||||
|
||||
if ($bon->fetch($_GET["id"]) == 0)
|
||||
{
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"));
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||
|
||||
if (isset($_GET["error"]))
|
||||
{
|
||||
@ -155,7 +158,7 @@ if ($_GET["id"])
|
||||
|
||||
if ($_GET["action"] == 'credite')
|
||||
{
|
||||
$ret=$html->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite");
|
||||
$ret=$html->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
@ -166,12 +169,13 @@ if ($_GET["id"])
|
||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
||||
|
||||
$relativepath = 'bon/'.$bon->ref;
|
||||
$relativepath = 'receipts/'.$bon->ref;
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$bon->ref.'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td><td>';
|
||||
print '<img src="./img/statut'.$bon->statut.'.png"> ';
|
||||
print $langs->trans($lipre->statuts[$lipre->statut]).'</td></tr>';
|
||||
@ -250,20 +254,16 @@ if ($_GET["id"])
|
||||
|
||||
print "\n</div>\n<div class=\"tabsAction\">\n";
|
||||
|
||||
if ($_GET["action"] == '')
|
||||
/*if ($bon->statut == 0)
|
||||
{
|
||||
|
||||
if ($bon->credite == 0)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?action=credite&id=$bon->id\">".$langs->trans("ClassCredited")."</a>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
print "<a class=\"butAction\" href=\"fiche.php?action=credite&id=$bon->id\">".$langs->trans("ClassCredited")."</a>";
|
||||
}*/
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -37,6 +37,10 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'prelevement','','');
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@ -44,8 +48,7 @@ $result = restrictedArea($user, 'prelevement','','');
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
llxHeader('',$langs->trans("CustomersStandingOrdersArea"));
|
||||
|
||||
print_fiche_titre($langs->trans("CustomersStandingOrdersArea"));
|
||||
|
||||
@ -74,9 +77,11 @@ print '</td></tr></table><br>';
|
||||
print '</td><td valign="top" width="70%">';
|
||||
|
||||
/*
|
||||
* Factures
|
||||
* Invoices waiting for withdraw
|
||||
*/
|
||||
$sql = "SELECT f.facnumber, f.rowid, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,";
|
||||
$sql.= " pfd.date_demande,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -90,49 +95,67 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("InvoiceWaitingWithdraw").' ('.$num.')</td></tr>';
|
||||
if ($num)
|
||||
{
|
||||
$var = True;
|
||||
while ($i < $num && $i < 20)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
$invoicestatic->id=$obj->rowid;
|
||||
$invoicestatic->ref=$obj->facnumber;
|
||||
print $invoicestatic->getNomUrl(1,'withdraw');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="2">'.$langs->trans("NoInvoiceToWithdraw").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="5">'.$langs->trans("InvoiceWaitingWithdraw").' ('.$num.')</td></tr>';
|
||||
if ($num)
|
||||
{
|
||||
$var = True;
|
||||
while ($i < $num && $i < 20)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$invoicestatic->id=$obj->rowid;
|
||||
$invoicestatic->ref=$obj->facnumber;
|
||||
$invoicestatic->statut=$obj->fk_statut;
|
||||
$invoicestatic->paye=$obj->paye;
|
||||
$invoicestatic->type=$obj->type;
|
||||
$alreadypayed=$invoicestatic->getSommePaiement();
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $invoicestatic->getNomUrl(1,'withdraw');
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print price($obj->total_ttc);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print dol_print_date($db->jdate($obj->date_demande),'day');
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print $invoicestatic->getLibStatut(3,$alreadypayed);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="2">'.$langs->trans("NoInvoiceToWithdraw").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Bon de pr<EFBFBD>l<EFBFBD>vement
|
||||
*
|
||||
* Withdraw receipts
|
||||
*/
|
||||
$limit=5;
|
||||
$sql = "SELECT p.rowid, p.ref, p.amount, p.datec";
|
||||
@ -143,41 +166,41 @@ $sql .= " ORDER BY datec DESC LIMIT ".$limit;
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$var=True;
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("LastWithdrawalReceipt",$limit).'</td>';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("LastWithdrawalReceipt",$limit).'</td>';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print '<img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
||||
print '<img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
||||
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec),"dayhour")."</td>\n";
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec),"dayhour")."</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '</td></tr></table>';
|
||||
|
||||
@ -79,7 +79,7 @@ if ($_GET["id"])
|
||||
if ($bon->fetch($_GET["id"]) == 0)
|
||||
{
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"));
|
||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -19,12 +19,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/prelevement/liste.php
|
||||
\ingroup prelevement
|
||||
\brief Page liste des prelevements
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
* \file htdocs/compta/prelevement/liste.php
|
||||
* \ingroup prelevement
|
||||
* \brief Page liste des prelevements
|
||||
* \version $Id$
|
||||
*/
|
||||
require('../../main.inc.php');
|
||||
|
||||
$langs->load("withdrawals");
|
||||
@ -36,123 +35,134 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalsLines"));
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = (empty($_GET["sortorder"])) ? "DESC" : $_GET["sortorder"];
|
||||
$sortfield = (empty($_GET["sortfield"])) ? "p.datec" : $_GET["sortfield"];
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
|
||||
$sql = "SELECT p.rowid, p.statut, p.ref, pl.amount, p.datec";
|
||||
$sql.= " , s.nom, s.code_client";
|
||||
$sql.= " , pl.rowid as rowid_ligne, pl.statut as statut_ligne";
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalsLines"));
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.statut, p.datec";
|
||||
$sql.= " ,f.rowid as facid, f.facnumber, f.total_ttc";
|
||||
$sql.= " , s.rowid as socid, s.nom, s.code_client";
|
||||
$sql.= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE pl.fk_prelevement_bons = p.rowid";
|
||||
$sql.= " AND p.entity = ".$conf->entity;
|
||||
$sql.= " AND s.rowid = pl.fk_soc";
|
||||
if ($socid) $sql.= " AND pl.fk_soc = ".$socid;
|
||||
$sql.= " AND pf.fk_prelevement_lignes = pl.rowid";
|
||||
$sql.= " AND pf.fk_facture = f.rowid";
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
if ($_GET["search_ligne"])
|
||||
{
|
||||
$sql.= " AND pl.rowid = '".$_GET["search_ligne"]."'";
|
||||
$sql.= " AND pl.rowid = '".$_GET["search_ligne"]."'";
|
||||
}
|
||||
|
||||
if ($_GET["search_bon"])
|
||||
{
|
||||
$sql.= " AND p.ref LIKE '%".$_GET["search_bon"]."%'";
|
||||
$sql.= " AND p.ref LIKE '%".$_GET["search_bon"]."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_code"])
|
||||
{
|
||||
$sql.= " AND s.code_client LIKE '%".$_GET["search_code"]."%'";
|
||||
$sql.= " AND s.code_client LIKE '%".$_GET["search_code"]."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_societe"])
|
||||
{
|
||||
$sel = $_GET["search_societe"];
|
||||
$sql .= " AND s.nom LIKE '%".$sel."%'";
|
||||
$sel = $_GET["search_societe"];
|
||||
$sql .= " AND s.nom LIKE '%".$sel."%'";
|
||||
}
|
||||
|
||||
$sql.= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
$sql.=$db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$urladd = "&statut=".$_GET["statut"];
|
||||
$urladd .= "&search_bon=".$_GET["search_bon"];
|
||||
$urladd = "&statut=".$_GET["statut"];
|
||||
$urladd .= "&search_bon=".$_GET["search_bon"];
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawalsLines"), $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
print_barre_liste($langs->trans("WithdrawalsLines"), $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="liste" width="100%">';
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Line").'</td>';
|
||||
print_liste_field_titre($langs->trans("WithdrawalReceipt"),"liste.php","p.ref");
|
||||
print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom");
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","p.datec","","",'align="center"');
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","pl.amount","","",'align="right"');
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),"liste.php","s.code_client",'','','align="center"');
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '</tr>';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Line").'</td>';
|
||||
print_liste_field_titre($langs->trans("WithdrawalReceipt"),$_SERVER["PHP_SELF"],"p.ref");
|
||||
print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"f.facnumber",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom");
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client",'','','align="center"');
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"p.datec","","",'align="center"');
|
||||
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"pl.amount","","",'align="right"');
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<form action="liste.php" method="GET">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ligne" value="'. $_GET["search_ligne"].'" size="6"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'. $_GET["search_bon"].'" size="8"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_societe" value="'. $_GET["search_societe"].'" size="12"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_code" value="'. $_GET["search_code"].'" size="8"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
print '<form action="liste.php" method="GET">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ligne" value="'. $_GET["search_ligne"].'" size="6"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'. $_GET["search_bon"].'" size="8"></td>';
|
||||
print '<td> </td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_societe" value="'. $_GET["search_societe"].'" size="12"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_code" value="'. $_GET["search_code"].'" size="8"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
$var=True;
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$var=!$var;
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print '<img border="0" src="./img/statut'.$obj->statut_ligne.'.png"></a> ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid_ligne.'">';
|
||||
print substr('000000'.$obj->rowid_ligne, -6);
|
||||
print '</a></td>';
|
||||
print '<img border="0" src="./img/statut'.$obj->statut_ligne.'.png"></a> ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid_ligne.'">';
|
||||
print substr('000000'.$obj->rowid_ligne, -6);
|
||||
print '</a></td>';
|
||||
|
||||
print '<td><img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
||||
print '<td><img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||
|
||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.$obj->nom."</a></td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n";
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
print '<td align="center"><a href="fiche.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
|
||||
print '<td> </td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">';
|
||||
print img_object($langs->trans("ShowBill"),"bill");
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->facnumber."</a></td>\n";
|
||||
print '</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.$obj->nom."</a></td>\n";
|
||||
|
||||
print '<td align="center"><a href="fiche.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
|
||||
print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -1,167 +0,0 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/prelevement/liste_factures.php
|
||||
\ingroup prelevement
|
||||
\brief Page liste des factures prelevees
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php");
|
||||
|
||||
$langs->load("withdrawals");
|
||||
$langs->load("companies");
|
||||
$langs->load("categories");
|
||||
|
||||
// Security check
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawedBills"));
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortorder = (empty($_GET["sortorder"])) ? "DESC" : $_GET["sortorder"];
|
||||
$sortfield = (empty($_GET["sortfield"])) ? "p.datec" : $_GET["sortfield"];
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
|
||||
/*
|
||||
* Liste des factures
|
||||
*
|
||||
*
|
||||
*/
|
||||
$sql = "SELECT p.rowid, p.ref, p.statut";
|
||||
$sql.= " ,f.rowid as facid, f.facnumber, f.total_ttc";
|
||||
$sql.= " , s.rowid as socid, s.nom";
|
||||
$sql.= " , pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE pf.fk_prelevement_lignes = pl.rowid";
|
||||
$sql.= " AND pl.fk_prelevement_bons = p.rowid";
|
||||
$sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND pf.fk_facture = f.rowid";
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
|
||||
if ($_GET["search_fac"])
|
||||
{
|
||||
$sql.= " AND f.facnumber like '%".$_GET["search_fac"]."%'";
|
||||
}
|
||||
|
||||
if ($_GET["search_nom"])
|
||||
{
|
||||
$sql.= " AND s.nom like '%".$_GET["search_nom"]."%'";
|
||||
}
|
||||
|
||||
$sql.= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$urladd = "&socid=".$_GET["socid"];
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawedBills"), $page, "liste_factures.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Line").'</td>';
|
||||
print_liste_field_titre($langs->trans("Bill"),"liste_factures.php","f.facnumber",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("Company"),"liste_factures.php","s.nom",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste_factures.php","f.total_ttc","",$urladd,'align="right"');
|
||||
print_liste_field_titre($langs->trans("WithdrawalReceipt"),"liste_factures.php","p.rowid","",$urladd,'align="center"');
|
||||
print '</tr>';
|
||||
|
||||
print '<form method="get" action="liste_factures.php">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input size="8" class="flat" type="text" name="search_fac" value="'.$_GET["search_fac"].'">';
|
||||
print '</td><td class="liste_titre">';
|
||||
print '<input size="20" class="flat" type="text" name="search_nom" value="'.$_GET["search_nom"].'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" colspan="2" align="right"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'"></td>';
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
$var=false;
|
||||
|
||||
$total = 0;
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
print '<img border="0" src="./img/statut'.$obj->statut_ligne.'.png"></a> ';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid_ligne.'">';
|
||||
print substr('000000'.$obj->rowid_ligne, -6).'</a></td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">';
|
||||
print img_object($langs->trans("ShowBill"),"bill");
|
||||
print '</a> ';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->facnumber."</a></td>\n";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">';
|
||||
print img_object($langs->trans("ShowCompany"),"company"). ' '.stripslashes($obj->nom)."</a></td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->total_ttc)."</td>\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$obj->rowid.'">';
|
||||
print $obj->ref."</a></td>\n";
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$total += $obj->total_ttc;
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
@ -571,7 +571,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
|
||||
if ($leftmenu=="withdraw") $newmenu->add(DOL_URL_ROOT."/compta/prelevement/bons.php?mainmenu=bank",$langs->trans("WithdrawalsReceipts"),1,$user->rights->prelevement->bons->lire);
|
||||
if ($leftmenu=="withdraw") $newmenu->add(DOL_URL_ROOT."/compta/prelevement/liste.php?mainmenu=bank",$langs->trans("WithdrawalsLines"),1,$user->rights->prelevement->bons->lire);
|
||||
if ($leftmenu=="withdraw") $newmenu->add(DOL_URL_ROOT."/compta/prelevement/liste_factures.php?mainmenu=bank",$langs->trans("WithdrawedBills"),1,$user->rights->prelevement->bons->lire);
|
||||
if ($leftmenu=="withdraw") $newmenu->add(DOL_URL_ROOT."/compta/prelevement/rejets.php?mainmenu=bank",$langs->trans("Rejects"),1,$user->rights->prelevement->bons->lire);
|
||||
if ($leftmenu=="withdraw") $newmenu->add(DOL_URL_ROOT."/compta/prelevement/stats.php?mainmenu=bank",$langs->trans("Statistics"),1,$user->rights->prelevement->bons->lire);
|
||||
|
||||
|
||||
@ -232,11 +232,10 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->facture->enabled && $conf->banque->enabled && $leftmenu=="checks"', 'auguria', 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/liste.php?leftmenu=checks', 'MenuChequesReceipts', 1, 'bills', '$user->rights->facture->lire', '', 2, 1, __ENTITY__);
|
||||
-- Prelevement
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled', 'auguria', 'left', 2500__+MAX_llx_menu__, 'accountancy', '', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank', 'StandingOrders', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2501__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/demandes.php?status=0&leftmenu=withdraw', 'StandingOrderToProcess', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2501__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/demandes.php?status=0&leftmenu=withdraw', 'StandingOrderToProcess', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/bons.php?leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/liste.php?leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2505__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/liste_factures.php?leftmenu=withdraw', 'WithdrawedBills', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2506__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/rejets.php?leftmenu=withdraw', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->prelevement->enabled && $leftmenu=="withdraw"', 'auguria', 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
--- Bank
|
||||
|
||||
@ -57,7 +57,7 @@ class modPrelevement extends DolibarrModules
|
||||
$this->description = "Gestion des Prelevements";
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = 'experimental';
|
||||
$this->version = 'dolibarr';
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 0;
|
||||
@ -70,7 +70,7 @@ class modPrelevement extends DolibarrModules
|
||||
// Dependancies
|
||||
$this->depends = array("modFacture");
|
||||
$this->requiredby = array();
|
||||
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("prelevement.php");
|
||||
|
||||
@ -91,26 +91,20 @@ class modPrelevement extends DolibarrModules
|
||||
$this->rights[1][4] = 'bons';
|
||||
$this->rights[1][5] = 'lire';
|
||||
|
||||
$this->rights[2][0] = 152;
|
||||
$this->rights[2][1] = 'Create/modify a withdrawal request';
|
||||
$this->rights[2][2] = 'w';
|
||||
$this->rights[2][3] = 0;
|
||||
$this->rights[2][4] = 'bons';
|
||||
$this->rights[2][5] = 'configurer';
|
||||
|
||||
$this->rights[3][0] = 153;
|
||||
$this->rights[3][1] = 'Read a widthrawal receipt';
|
||||
$this->rights[3][2] = 'r';
|
||||
$this->rights[3][3] = 0;
|
||||
$this->rights[3][4] = 'bons';
|
||||
$this->rights[3][5] = 'lire';
|
||||
|
||||
$this->rights[4][0] = 154;
|
||||
$this->rights[4][1] = 'Create/modify a withdrawal receipt';
|
||||
$this->rights[4][0] = 152;
|
||||
$this->rights[4][1] = 'Create/modify a withdrawals';
|
||||
$this->rights[4][2] = 'w';
|
||||
$this->rights[4][3] = 0;
|
||||
$this->rights[4][4] = 'bons';
|
||||
$this->rights[4][5] = 'creer';
|
||||
|
||||
/* $this->rights[2][0] = 154;
|
||||
$this->rights[2][1] = 'Setup withdraw account';
|
||||
$this->rights[2][2] = 'w';
|
||||
$this->rights[2][3] = 0;
|
||||
$this->rights[2][4] = 'bons';
|
||||
$this->rights[2][5] = 'configurer';
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ RequestStandingOrderTreated=Request for standing orders treated
|
||||
CustomersStandingOrders=Customer standing orders
|
||||
CustomerStandingOrder=Customer standing order
|
||||
NbOfInvoiceToWithdraw=Nb of invoice with withdraw request
|
||||
NbOfInvoiceToWithdrawWithInfo=Nb of invoice with withdraw request for customers having defined bank account information
|
||||
InvoiceWaitingWithdraw=Invoice waiting for withdraw
|
||||
AmountToWithdraw=Amount to withdraw
|
||||
WithdrawsRefused=Withdraws refused
|
||||
@ -68,4 +69,8 @@ OrderWaiting=Waiting for treatment
|
||||
NotifyTransmision=Withdrawal Transmission
|
||||
NotifyEmision=Withdrawal Emission
|
||||
NotifyCredit=Withdrawal Credit
|
||||
NumeroNationalEmetter=National Transmitter Number
|
||||
NumeroNationalEmetter=National Transmitter Number
|
||||
PleaseSelectCustomerBankBANToWithdraw=Select information about customer bank account to withdraw
|
||||
WithBankUsingRIB=For bank accounts using RIB
|
||||
WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT
|
||||
BankToReceiveWithdraw=Information about you bank account to receive withdraws
|
||||
@ -20,6 +20,7 @@ RequestStandingOrderTreated=Demandes de prélèvements traitées
|
||||
CustomersStandingOrders=Prélèvements clients
|
||||
CustomerStandingOrder=Prélèvement client
|
||||
NbOfInvoiceToWithdraw=Nb de factures en attente de prélèvement
|
||||
NbOfInvoiceToWithdrawWithInfo=Nb de factures en attente de prélèvement pour le client ayant les informations bancaires ci-dessus
|
||||
InvoiceWaitingWithdraw=Factures en attente de prélèvement
|
||||
AmountToWithdraw=Somme à prélever
|
||||
WithdrawsRefused=Prélèvements rejetés
|
||||
@ -68,4 +69,8 @@ OrderWaiting=En attente de traitement
|
||||
NotifyTransmision=Transmission du bon
|
||||
NotifyEmision=Emission du bon
|
||||
NotifyCredit=Credit du bon
|
||||
NumeroNationalEmetter= Numero National Emetter
|
||||
NumeroNationalEmetter= Numero National Emetter
|
||||
PleaseSelectCustomerBankBANToWithdraw=Saisissez les informations du compte bancaire client à prélever
|
||||
WithBankUsingRIB=Pour les comptes bancaires utilisant le RIB
|
||||
WithBankUsingBANBIC=Pour les comptes bancaires utilisants le code BAN/BIC/SWIFT
|
||||
BankToReceiveWithdraw=Informations de votre compte bancaire recevant les prélèvements
|
||||
Loading…
Reference in New Issue
Block a user