Fix: La navigation des borderaux de remise de chaque chouait si borderau non valid.

This commit is contained in:
Laurent Destailleur 2007-11-11 18:50:03 +00:00
parent a3caec7bc5
commit a5ae2a6a7c
6 changed files with 58 additions and 48 deletions

View File

@ -163,35 +163,35 @@ else
$h=0;
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$_GET["id"];
$head[$h][1] = $langs->trans("CheckReceipt");
$hselected = $h;
$h++;
// $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$_GET["id"];
// $head[$h][1] = $langs->trans("Info");
// $h++;
$h=0;
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$_GET["id"];
$head[$h][1] = $langs->trans("CheckReceipt");
$hselected = $h;
$h++;
// $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/info.php?id='.$_GET["id"];
// $head[$h][1] = $langs->trans("Info");
// $h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("Cheques"));
dolibarr_fiche_head($head, $hselected, $langs->trans("Cheques"));
/*
* Confirmation de la suppression du bordereau
*/
if ($_GET['action'] == 'delete')
{
$html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("DeleteCheckReceipt"), 'Etes-vous sûr de vouloir supprimer ce bordereau ?', 'confirm_delete');
print '<br>';
}
/*
* Confirmation de la validation du bordereau
*/
if ($_GET['action'] == 'valide')
{
$facid = $_GET['facid'];
$html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("ValidateCheckReceipt"), 'Etes-vous sûr de vouloir valider ce bordereau, auncune modification n\'est possible une fois le bordereau validé ?', 'confirm_valide');
print '<br>';
}
/*
* Confirmation de la suppression du bordereau
*/
if ($_GET['action'] == 'delete')
{
$html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("DeleteCheckReceipt"), 'Etes-vous sûr de vouloir supprimer ce bordereau ?', 'confirm_delete');
print '<br>';
}
/*
* Confirmation de la validation du bordereau
*/
if ($_GET['action'] == 'valide')
{
$facid = $_GET['facid'];
$html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("ValidateCheckReceipt"), 'Etes-vous sûr de vouloir valider ce bordereau, auncune modification n\'est possible une fois le bordereau validé ?', 'confirm_valide');
print '<br>';
}
}
if ($mesg) print $mesg.'<br>';
@ -219,7 +219,6 @@ if ($_GET['action'] == 'new')
$sql.= " ORDER BY b.emetteur ASC, b.rowid ASC;";
$resql = $db->query($sql);
if ($resql)
{
$i = 0;
@ -310,7 +309,7 @@ else
// Liste des cheques
$sql = "SELECT b.rowid,b.amount,";
$sql.= " b.num_chq,b.emetteur,".$db->pdate("b.dateo")." as date,b.banque,";
$sql.= " b.num_chq,b.emetteur,".$db->pdate("b.dateo")." as date,".$db->pdate("b.datec")." as datec,b.banque,";
$sql.= " p.rowid as pid";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement as p ON p.fk_bank = b.rowid";
@ -319,7 +318,6 @@ else
$sql.= " ORDER BY $sortfield $sortorder";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
@ -329,13 +327,13 @@ else
$param="&amp;id=".$remisecheque->id;
print '<tr class="liste_titre">';
'<td>'.$langs->trans("Num").'</td>';
print '<td>'.$langs->trans("Position").'</td>';
print_liste_field_titre($langs->trans("Num"),$_SERVER["PHP_SELF"],"b.num_chq", "",$param,'align="center"',$sortfield,$sortorder);
print '<td>'.$langs->trans("Cheque").'</td>';
print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"b.num_chq", "",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("CheckTransmitter"),$_SERVER["PHP_SELF"],"b.emetteur", "",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Bank"),$_SERVER["PHP_SELF"],"b.banque", "",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"b.amount", "",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("LineRecord"),$_SERVER["PHP_SELF"],"b.rowid", "",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateOperation"),$_SERVER["PHP_SELF"],"b.dateo", "",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateChequeReceived"),$_SERVER["PHP_SELF"],"b.datec", "",$param,'align="center"',$sortfield,$sortorder);
print "<td>&nbsp;</td></tr>\n";
$i=1;
$var=false;
@ -361,7 +359,7 @@ else
print '&nbsp;';
}
print '</td>';
print '<td align="center">'.dolibarr_print_date($objp->date).'</td>';
print '<td align="center">'.dolibarr_print_date($objp->datec,'day').'</td>';
if($remisecheque->statut == 0)
{
print '<td align="right"><a href="fiche.php?id='.$remisecheque->id.'&amp;action=remove&amp;lineid='.$objp->rowid.'">'.img_delete().'</a></td>';

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
@ -110,7 +109,7 @@ if ($resql)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Numero").'</td>';
print '<td>'.$langs->trans("CheckReceiptShort").'</td>';
print '<td>'.$langs->trans("Date")."</td>";
print '<td>'.$langs->trans("Account").'</td>';
print '<td align="right">'.$langs->trans("Amount").'</td>';

View File

@ -44,10 +44,6 @@ ListPayment=List of payments
ListOfPayments=List of payments
ListOfCustomerPayments=List of customer payments
ListOfSupplierPayments=List of supplier payments
RulesResultDue=- It includes outstanding invoices, expenses and VAT whether they are paid or not. <br>- It is based on the validation date of invoices and VAT and on the due date for expenses.
RulesResultInOut=- It includes the real payments made on invoices, expenses and VAT. <br>- It is based on the payment dates of the invoices, expenses anf VAT.<br>
RulesCADue=- It includes the clients' due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices. <br>
RulesCAIn=- It includes all the effective payments of invoices received from clients.<br>- It is based on the payment date of these invoices<br>
DatePayment=Payment date
NewVATPayment=New VAT payment
VATPayment=VAT Payment
@ -65,13 +61,25 @@ ByUserAuthorOfInvoice=By invoice author
AccountancyExport=Accountancy export
ErrorWrongAccountancyCodeForCompany=Bad customer accountancy code for %s
SuppliersProductsSellSalesTurnover=The generated turnover by the sales of suppliers' products.
CheckReceipt=Check receipt
CheckReceipt=Check deposit
CheckReceiptShort=Check deposit
NewCheckReceipt=New discount
NewCheckDeposit=New check deposit
NewCheckDepositOn=New check deposit on account: %s
NoWaitingChecks=No checks waiting for deposit.
DateChequeReceived=Cheque reception input date
PaySocialContribution=Pay a social contribution
ConfirmPaySocialContribution=Are you sure you want to classify this social contribution as payed?
DeleteSocialContribution=Delete a social contribution
ConfirmDeleteSocialContribution=Are you sure you want to delete this social contribution?
ExportDataset_tax_1=Social contributions and payments
AnnualSummaryDueDebtMode=Bilan des recettes et dépenses, résumé annuel, en mode <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b>.
AnnualSummaryInputOutputMode=Bilan des recettes et dépenses, résumé annuel, en mode <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b>.
AnnualByCompaniesDueDebtMode=Bilan des recettes et dépenses, détail par tiers, en mode <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b>.
AnnualByCompaniesInputOutputMode=Bilan des recettes et dépenses, détail par tiers, en mode <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b>.
SeeReportInInputOutputMode=Voir le rapport <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b> pour un calcul sur les factures effectivement payées
SeeReportInDueDebtMode=Voir le rapport <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b> pour un calcul sur les factures non encore payées
RulesResultDue=- Amounts shown are with all taxes included<br>- It includes outstanding invoices, expenses and VAT whether they are paid or not. <br>- It is based on the validation date of invoices and VAT and on the due date for expenses.
RulesResultInOut=- Amounts shown are with all taxes included<br>- It includes the real payments made on invoices, expenses and VAT. <br>- It is based on the payment dates of the invoices, expenses anf VAT.<br>
RulesCADue=- It includes the clients' due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices. <br>
RulesCAIn=- It includes all the effective payments of invoices received from clients.<br>- It is based on the payment date of these invoices<br>

View File

@ -62,10 +62,12 @@ AccountancyExport=Export comptable
ErrorWrongAccountancyCodeForCompany=Code compta client incorrect pour %s
SuppliersProductsSellSalesTurnover=Chiffres d'affaire générés par la vente des produits des fournisseurs
CheckReceipt=Bordereau de remise de chèques
CheckReceiptShort=Bordereau
NewCheckReceipt=Nouvelle remise
NewCheckDeposit=Nouveau dépôt
NewCheckDepositOn=Nouveau dépôt sur compte: %s
NoWaitingChecks=Pas de chèque en attente de dépots.
DateChequeReceived=Date saisie réception chèque
PaySocialContribution=Payer une charge sociale
ConfirmPaySocialContribution=Etes-vous sûr de vouloir classer cette charge sociale à payé ?
DeleteSocialContribution=Effacer charge sociale

View File

@ -875,7 +875,10 @@ create table llx_fichinterdet
ALTER TABLE llx_fichinter ADD COLUMN model_pdf varchar(50) after note_public;
ALTER TABLE llx_bordereau_cheque MODIFY number integer;
ALTER TABLE llx_bordereau_cheque MODIFY number varchar(16) NOT NULL;
ALTER TABLE llx_bordereau_cheque MODIFY amount double(24,8) NOT NULL;
ALTER TABLE llx_bordereau_cheque MODIFY nbcheque smallint NOT NULL;
ALTER TABLE llx_bordereau_cheque MODIFY statut smallint(1) NOT NULL DEFAULT 0;
ALTER TABLE llx_facturedet ADD COLUMN special_code tinyint(4) unsigned default 0;
ALTER TABLE llx_facturedet MODIFY special_code tinyint(4) unsigned default 0;

View File

@ -25,13 +25,13 @@
create table llx_bordereau_cheque
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime,
date_bordereau date,
number integer,
amount float(12,2),
nbcheque smallint UNSIGNED DEFAULT 0,
datec datetime NOT NULL,
date_bordereau date, -- A quoi sert cette date ?
number varchar(16) NOT NULL,
amount double(24,8) NOT NULL,
nbcheque smallint NOT NULL,
fk_bank_account integer,
fk_user_author integer,
note text,
statut tinyint(1) UNSIGNED DEFAULT 0
statut smallint(1) NOT NULL DEFAULT 0
)type=innodb;