task #10958 : Add link to cheque receipts into bank transaction line if exists
This commit is contained in:
parent
27165fe898
commit
8489606e3b
@ -19,6 +19,7 @@ For users:
|
|||||||
saved clicks again).
|
saved clicks again).
|
||||||
- When creating a contract, sales representative are preset to user. This save
|
- When creating a contract, sales representative are preset to user. This save
|
||||||
2 clicks.
|
2 clicks.
|
||||||
|
- Can edit several fields in bank transaction line page into one update.
|
||||||
- New: Add graph using Jquery Flot.
|
- New: Add graph using Jquery Flot.
|
||||||
- New: Usage of Jquery Notify to show result or error messages on action.
|
- New: Usage of Jquery Notify to show result or error messages on action.
|
||||||
- New: If a service contains subproducts, subrpoducts are decrease when service
|
- New: If a service contains subproducts, subrpoducts are decrease when service
|
||||||
@ -58,6 +59,8 @@ For users:
|
|||||||
- New: Can filter on date when building cheque receipts.
|
- New: Can filter on date when building cheque receipts.
|
||||||
- New: Paypal module can show paypal list of transaction and convert one
|
- New: Paypal module can show paypal list of transaction and convert one
|
||||||
into an order.
|
into an order.
|
||||||
|
- New: task #10958 : Add link to cheque receipts into bank transaction
|
||||||
|
line if exists
|
||||||
- Fix: Better Postgresql compatibility.
|
- Fix: Better Postgresql compatibility.
|
||||||
- Fix: Numbering module for invoices use same number for invoice
|
- Fix: Numbering module for invoices use same number for invoice
|
||||||
and credit note if mask is same.
|
and credit note if mask is same.
|
||||||
|
|||||||
@ -37,9 +37,12 @@ $langs->load("bills");
|
|||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
if ($conf->adherent->enabled) $langs->load("members");
|
if ($conf->adherent->enabled) $langs->load("members");
|
||||||
|
|
||||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
$action=GETPOST('action');
|
||||||
$ref=isset($_GET["ref"])?$_GET["ref"]:$_POST["ref"];
|
$rowid=GETPOST("rowid");
|
||||||
$orig_account=isset($_GET["orig_account"])?$_GET["orig_account"]:$_POST["orig_account"];
|
$ref=GETPOST("ref");
|
||||||
|
$orig_account=GETPOST("orig_account");
|
||||||
|
$accountid=GETPOST('accountid');
|
||||||
|
$confirm=GETPOST('confirm');
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
@ -59,18 +62,18 @@ if ($user->rights->banque->consolidate && $_GET["action"] == 'dvprev')
|
|||||||
$ac->datev_previous($_GET["rowid"]);
|
$ac->datev_previous($_GET["rowid"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'confirm_delete_categ' && $_POST["confirm"] == "yes")
|
if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->banque->modifier)
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = $rowid AND fk_categ = ".$_GET["cat1"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".GETPOST("cat1");
|
||||||
if (! $db->query($sql))
|
if (! $db->query($sql))
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'class')
|
if ($action == 'class')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = $rowid AND fk_categ = ".$_POST["cat1"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
|
||||||
if (! $db->query($sql))
|
if (! $db->query($sql))
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
@ -83,16 +86,16 @@ if ($_POST["action"] == 'class')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == "update")
|
if ($action == "update")
|
||||||
{
|
{
|
||||||
// Avant de modifier la date ou le montant, on controle si ce n'est pas encore rapproche
|
// Avant de modifier la date ou le montant, on controle si ce n'est pas encore rapproche
|
||||||
|
$conciliated=0;
|
||||||
$sql = "SELECT b.rappro FROM ".MAIN_DB_PREFIX."bank as b WHERE rowid=".$rowid;
|
$sql = "SELECT b.rappro FROM ".MAIN_DB_PREFIX."bank as b WHERE rowid=".$rowid;
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
if ($objp->rappro)
|
$conciliated=$objp->rappro;
|
||||||
die ("Conciliation of a line already conciliated is not possible");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -101,15 +104,27 @@ if ($_POST["action"] == "update")
|
|||||||
$dateop = dol_mktime(12,0,0,$_POST["dateomonth"],$_POST["dateoday"],$_POST["dateoyear"]);
|
$dateop = dol_mktime(12,0,0,$_POST["dateomonth"],$_POST["dateoday"],$_POST["dateoyear"]);
|
||||||
$dateval= dol_mktime(12,0,0,$_POST["datevmonth"],$_POST["datevday"],$_POST["datevyear"]);
|
$dateval= dol_mktime(12,0,0,$_POST["datevmonth"],$_POST["datevday"],$_POST["datevyear"]);
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."bank";
|
||||||
$sql.= " SET label='".$db->escape($_POST["label"])."',";
|
$sql.= " SET ";
|
||||||
if (isset($_POST['amount'])) $sql.=" amount='$amount',";
|
// Always opened
|
||||||
$sql.= " dateo = '".$db->idate($dateop)."', datev = '".$db->idate($dateval)."',";
|
if (isset($_POST['value'])) $sql.=" fk_type='".$db->escape($_POST['value'])."',";
|
||||||
$sql.= " fk_account = ".$_POST['accountid'];
|
if (isset($_POST['num_chq'])) $sql.=" num_chq='".$db->escape($_POST["num_chq"])."',";
|
||||||
|
if (isset($_POST['banque'])) $sql.=" banque='".$db->escape($_POST["banque"])."',";
|
||||||
|
if (isset($_POST['emetteur'])) $sql.=" emetteur='".$db->escape($_POST["emetteur"])."',";
|
||||||
|
// Blocked when conciliated
|
||||||
|
if (! $conciliated)
|
||||||
|
{
|
||||||
|
if (isset($_POST['label'])) $sql.=" label='".$db->escape($_POST["label"])."',";
|
||||||
|
if (isset($_POST['amount'])) $sql.=" amount='".$amount."',";
|
||||||
|
if (isset($_POST['dateomonth'])) $sql.=" dateo = '".$db->idate($dateop)."',";
|
||||||
|
if (isset($_POST['datevmonth'])) $sql.=" datev = '".$db->idate($dateval)."',";
|
||||||
|
}
|
||||||
|
$sql.= " fk_account = ".$accountid;
|
||||||
$sql.= " WHERE rowid = ".$rowid;
|
$sql.= " WHERE rowid = ".$rowid;
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$mesg=$langs->trans("RecordSaved");
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -119,26 +134,8 @@ if ($_POST["action"] == "update")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'type')
|
|
||||||
{
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank set fk_type='".$_POST["value"]."', num_chq='".$_POST["num_chq"]."' WHERE rowid = $rowid;";
|
|
||||||
$result = $db->query($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST["action"] == 'banque')
|
|
||||||
{
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank set banque='".$db->escape($_POST["banque"])."' WHERE rowid = $rowid;";
|
|
||||||
$result = $db->query($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST["action"] == 'emetteur')
|
|
||||||
{
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank set emetteur='".$db->escape($_POST["emetteur"])."' WHERE rowid = $rowid;";
|
|
||||||
$result = $db->query($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reconcile
|
// Reconcile
|
||||||
if ($user->rights->banque->consolidate && ($_POST["action"] == 'num_releve' || $_POST["action"] == 'setreconcile'))
|
if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == 'setreconcile'))
|
||||||
{
|
{
|
||||||
$num_rel=trim($_POST["num_rel"]);
|
$num_rel=trim($_POST["num_rel"]);
|
||||||
$rappro=$_POST['reconciled']?1:0;
|
$rappro=$_POST['reconciled']?1:0;
|
||||||
@ -164,6 +161,7 @@ if ($user->rights->banque->consolidate && ($_POST["action"] == 'num_releve' || $
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$mesg=$langs->trans("RecordSaved");
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -217,11 +215,12 @@ $h++;
|
|||||||
|
|
||||||
dol_fiche_head($head, $hselected, $langs->trans('LineRecord'),0,'account');
|
dol_fiche_head($head, $hselected, $langs->trans('LineRecord'),0,'account');
|
||||||
|
|
||||||
if ($mesg) print '<div class="error">'.$mesg.'</div><br>';
|
if (! preg_match('/class="error"/i',$mesg)) dol_htmloutput_mesg($mesg);
|
||||||
|
else dol_htmloutput_errors($mesg);
|
||||||
|
|
||||||
$sql = "SELECT b.rowid,b.dateo as do,b.datev as dv, b.amount, b.label, b.rappro,";
|
$sql = "SELECT b.rowid,b.dateo as do,b.datev as dv, b.amount, b.label, b.rappro,";
|
||||||
$sql.= " b.num_releve, b.fk_user_author, b.num_chq, b.fk_type, b.fk_account";
|
$sql.= " b.num_releve, b.fk_user_author, b.num_chq, b.fk_type, b.fk_account, b.fk_bordereau as receiptid,";
|
||||||
$sql.= ",b.emetteur,b.banque";
|
$sql.= " b.emetteur,b.banque";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||||
$sql.= " WHERE rowid=".$rowid;
|
$sql.= " WHERE rowid=".$rowid;
|
||||||
$sql.= " ORDER BY dateo ASC";
|
$sql.= " ORDER BY dateo ASC";
|
||||||
@ -231,17 +230,8 @@ if ($result)
|
|||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
if ($db->num_rows($result))
|
if ($db->num_rows($result))
|
||||||
{
|
{
|
||||||
|
|
||||||
// Confirmations
|
|
||||||
if ($_GET["action"] == 'delete_categ')
|
|
||||||
{
|
|
||||||
$ret=$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,$langs->trans("RemoveFromRubrique"),$langs->trans("RemoveFromRubriqueConfirm"),"confirm_delete_categ");
|
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$total = $total + $objp->amount;
|
$total = $total + $objp->amount;
|
||||||
|
|
||||||
$acct=new Account($db);
|
$acct=new Account($db);
|
||||||
@ -254,6 +244,21 @@ if ($result)
|
|||||||
$links=$acct->get_url($rowid);
|
$links=$acct->get_url($rowid);
|
||||||
$bankline->load_previous_next_ref('','rowid');
|
$bankline->load_previous_next_ref('','rowid');
|
||||||
|
|
||||||
|
// Confirmations
|
||||||
|
if ($action == 'delete_categ')
|
||||||
|
{
|
||||||
|
$ret=$html->form_confirm("ligne.php?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
||||||
|
if ($ret == 'html') print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<form name="update" method="post" action="ligne.php?rowid='.$rowid.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
||||||
|
print '<input type="hidden" name="accountid" value="'.$acct->id.'">';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref")."</td>";
|
print '<tr><td width="20%">'.$langs->trans("Ref")."</td>";
|
||||||
print '<td colspan="4">';
|
print '<td colspan="4">';
|
||||||
@ -329,6 +334,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
||||||
|
print img_object('','generic').' ';
|
||||||
print $links[$key]['label'];
|
print $links[$key]['label'];
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -336,66 +342,65 @@ if ($result)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rowspan=0;
|
||||||
|
|
||||||
|
//$user->rights->banque->modifier=false;
|
||||||
|
//$user->rights->banque->consolidate=true;
|
||||||
|
|
||||||
// Type of payment / Number
|
// Type of payment / Number
|
||||||
print "<tr><td>".$langs->trans("Type")." / ".$langs->trans("Numero")."</td><td colspan=\"3\">";
|
print "<tr><td>".$langs->trans("Type")." / ".$langs->trans("Numero");
|
||||||
|
print "</td>";
|
||||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||||
{
|
{
|
||||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
print '<td colspan="3">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="type">';
|
|
||||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
|
||||||
print $html->select_types_paiements($objp->fk_type,"value",'',2);
|
print $html->select_types_paiements($objp->fk_type,"value",'',2);
|
||||||
print '<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ? '' : $objp->num_chq).'">';
|
print '<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ? '' : $objp->num_chq).'">';
|
||||||
print '</td><td align="center" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
if ($objp->receiptid)
|
||||||
print "</form>";
|
{
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php');
|
||||||
|
$receipt=new RemiseCheque($db);
|
||||||
|
$receipt->fetch($objp->receiptid);
|
||||||
|
print ' '.$langs->trans("CheckReceipt").': '.$receipt->getNomUrl(2);
|
||||||
|
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
$rowspan=7;
|
||||||
|
print '<td align="center" rowspan="'.$rowspan.'" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $objp->fk_type.' '.$objp->num_chq.'</td><td> </td>';
|
print '<td colspan="4">'.$objp->fk_type.' '.$objp->num_chq.'</td>';
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Bank of cheque
|
// Bank of cheque
|
||||||
print "<tr><td>".$langs->trans("Bank")."</td><td colspan=\"3\">";
|
print "<tr><td>".$langs->trans("Bank")."</td>";
|
||||||
if ($user->rights->banque->modifier)
|
|
||||||
{
|
|
||||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="banque">';
|
|
||||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
|
||||||
print '<input type="text" class="flat" size="40" name="banque" value="'.(empty($objp->banque) ? '' : $objp->banque).'">';
|
|
||||||
print '</td><td align="center" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
|
||||||
print "</form>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $objp->banque.' </td><td> </td>';
|
|
||||||
}
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
// Transmitter
|
|
||||||
print "<tr><td>".$langs->trans("CheckTransmitter")."</td><td colspan=\"3\">";
|
|
||||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||||
{
|
{
|
||||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
print '<td colspan="3">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="text" class="flat" size="40" name="banque" value="'.(empty($objp->banque) ? '' : $objp->banque).'">';
|
||||||
print '<input type="hidden" name="action" value="emetteur">';
|
print '</td>';
|
||||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
|
||||||
print '<input type="text" class="flat" size="40" name="emetteur" value="'.(empty($objp->emetteur) ? '' : stripslashes($objp->emetteur)).'">';
|
|
||||||
print '</td><td align="center" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
|
||||||
print "</form>";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $objp->emetteur.' </td><td> </td>';
|
print '<td colspan="'.($rowspan?'3':'4').'">'.$objp->banque.'</td>';
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print '<form name="update" method="post" action="ligne.php?rowid='.$objp->rowid.'">';
|
// Transmitter
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print "<tr><td>".$langs->trans("CheckTransmitter")."</td>";
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
{
|
||||||
print '<input type="hidden" name="accountid" value="'.$acct->id.'">';
|
print '<td colspan="3">';
|
||||||
|
print '<input type="text" class="flat" size="40" name="emetteur" value="'.(empty($objp->emetteur) ? '' : stripslashes($objp->emetteur)).'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td colspan="'.($rowspan?'3':'4').'">'.$objp->emetteur.'</td>';
|
||||||
|
}
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
// Date ope
|
// Date ope
|
||||||
print '<tr><td>'.$langs->trans("DateOperation").'</td>';
|
print '<tr><td>'.$langs->trans("DateOperation").'</td>';
|
||||||
@ -403,14 +408,15 @@ if ($result)
|
|||||||
{
|
{
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $html->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
|
print $html->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
|
||||||
print '</td><td align="center" rowspan="4" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'"'.($objp->rappro?' disabled="true"':'').'></td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td colspan="4">';
|
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||||
print dol_print_date($db->jdate($objp->do),"day");
|
print dol_print_date($db->jdate($objp->do),"day");
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Value date
|
// Value date
|
||||||
print "<tr><td>".$langs->trans("DateValue")."</td>";
|
print "<tr><td>".$langs->trans("DateValue")."</td>";
|
||||||
@ -426,10 +432,11 @@ if ($result)
|
|||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||||
print img_edit_add() ."</a>";
|
print img_edit_add() ."</a>";
|
||||||
}
|
}
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td colspan="4">';
|
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||||
print dol_print_date($db->jdate($objp->dv),"day");
|
print dol_print_date($db->jdate($objp->dv),"day");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -451,10 +458,11 @@ if ($result)
|
|||||||
print $objp->label;
|
print $objp->label;
|
||||||
}
|
}
|
||||||
print '" size="50">';
|
print '" size="50">';
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td colspan="4">';
|
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||||
if (preg_match('/^\((.*)\)$/i',$objp->label,$reg))
|
if (preg_match('/^\((.*)\)$/i',$objp->label,$reg))
|
||||||
{
|
{
|
||||||
// Label generique car entre parentheses. On l'affiche en le traduisant
|
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||||
@ -464,12 +472,13 @@ if ($result)
|
|||||||
{
|
{
|
||||||
print $objp->label;
|
print $objp->label;
|
||||||
}
|
}
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print "<tr><td>".$langs->trans("Amount")."</td>";
|
print "<tr><td>".$langs->trans("Amount")."</td>";
|
||||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
if ($user->rights->banque->modifier)
|
||||||
{
|
{
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print '<input name="amount" class="flat" size="10" '.($objp->rappro?' disabled="true"':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$conf->monnaie);
|
print '<input name="amount" class="flat" size="10" '.($objp->rappro?' disabled="true"':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$conf->monnaie);
|
||||||
@ -477,13 +486,14 @@ if ($result)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td colspan="4">';
|
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||||
print price($objp->amount);
|
print price($objp->amount);
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</form>";
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print "</form>";
|
||||||
|
|
||||||
// Releve rappro
|
// Releve rappro
|
||||||
if ($acct->canBeConciliated() > 0) // Si compte rapprochable
|
if ($acct->canBeConciliated() > 0) // Si compte rapprochable
|
||||||
@ -539,6 +549,7 @@ if ($result)
|
|||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
|
else dol_print_error($db);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
@ -573,11 +584,14 @@ if ($result)
|
|||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
print "<td>$objp->label</td>";
|
print "<td>".$objp->label."</td>";
|
||||||
print "<td align=\"center\"><a href=\"budget.php?bid=$objp->rowid\">".$langs->trans("ListBankTransactions")."</a></td>";
|
print "<td align=\"center\"><a href=\"budget.php?bid=".$objp->rowid."\">".$langs->trans("ListBankTransactions")."</a></td>";
|
||||||
print "<td align=\"right\"><a href=\"ligne.php?action=delete_categ&rowid=$rowid&fk_categ=$objp->rowid\">".img_delete($langs->trans("Remove"))."</a></td>";
|
if ($user->rights->banque->modifier)
|
||||||
|
{
|
||||||
|
print "<td align=\"right\"><a href=\"ligne.php?action=delete_categ&rowid=".$rowid."&fk_categ=$objp->rowid\">".img_delete($langs->trans("Remove"))."</a></td>";
|
||||||
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -209,7 +209,7 @@ class RemiseCheque extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->id > 0 && $this->errno == 0)
|
if ($this->id > 0 && $this->errno == 0)
|
||||||
{
|
{
|
||||||
foreach ($lines as $lineid)
|
foreach ($lines as $lineid)
|
||||||
{
|
{
|
||||||
$checkremise=false;
|
$checkremise=false;
|
||||||
@ -217,7 +217,7 @@ class RemiseCheque extends CommonObject
|
|||||||
{
|
{
|
||||||
if($linetoremise==$lineid) $checkremise=true;
|
if($linetoremise==$lineid) $checkremise=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($checkremise==true)
|
if($checkremise==true)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."bank";
|
||||||
@ -713,21 +713,21 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
* Renvoie nom clicable (avec eventuellement le picto)
|
||||||
* \param withpicto Inclut le picto dans le lien
|
* @param withpicto Inclut le picto dans le lien
|
||||||
* \param option Sur quoi pointe le lien
|
* @param option Sur quoi pointe le lien
|
||||||
* \return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='')
|
function getNomUrl($withpicto=0,$option='')
|
||||||
{
|
{
|
||||||
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
$number=$this->number;
|
$number=$this->ref;
|
||||||
if ($this->statut == 0) $number='(PROV'.$this->rowid.')';
|
if ($this->statut == 0) $number='(PROV'.$this->id.')';
|
||||||
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$this->rowid.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin.' ');
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin.' ');
|
||||||
|
|||||||
@ -118,9 +118,10 @@ ValidateCheckReceipt=Validate this check receipt ?
|
|||||||
ConfirmValidateCheckReceipt=Are you sure you want to validate this check receipt, no change will be possible once this is done ?
|
ConfirmValidateCheckReceipt=Are you sure you want to validate this check receipt, no change will be possible once this is done ?
|
||||||
DeleteCheckReceipt=Delete this check receipt ?
|
DeleteCheckReceipt=Delete this check receipt ?
|
||||||
ConfirmDeleteCheckReceipt=Are you sure you want to delete this check receipt ?
|
ConfirmDeleteCheckReceipt=Are you sure you want to delete this check receipt ?
|
||||||
BankChecks=Bank cheques
|
BankChecks=Bank checks
|
||||||
BankChecksToReceipt=Cheques waiting for deposit
|
BankChecksToReceipt=Checks waiting for deposit
|
||||||
NumberOfCheques=Nb of cheques
|
ShowCheckReceipt=Show check deposit receipt
|
||||||
|
NumberOfCheques=Nb of check
|
||||||
DeleteTransaction=Delete transaction
|
DeleteTransaction=Delete transaction
|
||||||
ConfirmDeleteTransaction=Are you sure you want to delete this transaction ?
|
ConfirmDeleteTransaction=Are you sure you want to delete this transaction ?
|
||||||
ThisWillAlsoDeleteBankRecord=This will also delete generated bank transactions
|
ThisWillAlsoDeleteBankRecord=This will also delete generated bank transactions
|
||||||
@ -140,5 +141,5 @@ AllAccounts=All bank/cash accounts
|
|||||||
BackToAccount=Back to account
|
BackToAccount=Back to account
|
||||||
ShowAllAccounts=Show for all accounts
|
ShowAllAccounts=Show for all accounts
|
||||||
FutureTransaction=Transaction in futur. No way to conciliate.
|
FutureTransaction=Transaction in futur. No way to conciliate.
|
||||||
SelectChequeTransactionAndGenerate=Select/filter cheques to include into the cheque receipt and click on "Create".
|
SelectChequeTransactionAndGenerate=Select/filter checks to include into the check deposit receipt and click on "Create".
|
||||||
|
|
||||||
|
|||||||
@ -120,6 +120,7 @@ DeleteCheckReceipt=Supprimer ce bordereau de remise ?
|
|||||||
ConfirmDeleteCheckReceipt=Êtes-vous sûr de vouloir supprimer ce bordereau ?
|
ConfirmDeleteCheckReceipt=Êtes-vous sûr de vouloir supprimer ce bordereau ?
|
||||||
BankChecks=Chèques
|
BankChecks=Chèques
|
||||||
BankChecksToReceipt=Chèques à déposer
|
BankChecksToReceipt=Chèques à déposer
|
||||||
|
ShowCheckReceipt=Afficher bordereau remise chèque
|
||||||
NumberOfCheques=Nb de chèques
|
NumberOfCheques=Nb de chèques
|
||||||
DeleteTransaction=Supprimer l'écriture
|
DeleteTransaction=Supprimer l'écriture
|
||||||
ConfirmDeleteTransaction=Êtes-vous sûr de vouloir supprimer cette écriture ?
|
ConfirmDeleteTransaction=Êtes-vous sûr de vouloir supprimer cette écriture ?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user