mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v21
This commit is contained in:
parent
65f9e7f172
commit
81f0bb8921
|
|
@ -900,7 +900,7 @@ if ($resql) {
|
|||
}
|
||||
|
||||
// Code to adjust value date with plus and less picto using an Ajax call instead of a full reload of page
|
||||
$urlajax = DOL_URL_ROOT.'/core/ajax/bankconciliate.php?token='.currentToken();
|
||||
$urlajax = DOL_URL_ROOT.'/core/ajax/bankconciliate.php?format=dayreduceformat&token='.currentToken();
|
||||
print '
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
|
@ -909,10 +909,10 @@ if ($resql) {
|
|||
current.click(function()
|
||||
{
|
||||
var url = "'.$urlajax.'&"+current.attr("href").split("?")[1];
|
||||
console.log("We click on ajaxforbankoperationchange url="+url);
|
||||
$.get(url, function(data)
|
||||
{
|
||||
console.log(url)
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
current.parent().parent().find(".spanforajaxedit").replaceWith(data);
|
||||
});
|
||||
return false;
|
||||
|
|
@ -1663,7 +1663,9 @@ if ($resql) {
|
|||
// Date ope
|
||||
if (!empty($arrayfields['b.dateo']['checked'])) {
|
||||
print '<td class="nowraponall center">';
|
||||
print '<span class="spanforajaxedit" id="dateoperation_'.$objp->rowid.'" title="'.dol_print_date($db->jdate($objp->do), "day").'">'.dol_print_date($db->jdate($objp->do), "dayreduceformat")."</span>";
|
||||
print '<span class="spanforajaxedit" id="dateoperation_'.$objp->rowid.'" title="'.dol_print_date($db->jdate($objp->do), "day").'">';
|
||||
print dol_print_date($db->jdate($objp->do), "dayreduceformat");
|
||||
print "</span>";
|
||||
print ' ';
|
||||
print '<span class="inline-block">';
|
||||
print '<a class="ajaxforbankoperationchange" href="'.$_SERVER['PHP_SELF'].'?action=doprev&account='.$objp->bankid.'&rowid='.$objp->rowid.'">';
|
||||
|
|
@ -1680,7 +1682,9 @@ if ($resql) {
|
|||
// Date value
|
||||
if (!empty($arrayfields['b.datev']['checked'])) {
|
||||
print '<td class="nowraponall center">';
|
||||
print '<span class="spanforajaxedit" id="datevalue_'.$objp->rowid.'" title="'.dol_print_date($db->jdate($objp->dv), "day").'">'.dol_print_date($db->jdate($objp->dv), "dayreduceformat")."</span>";
|
||||
print '<span class="spanforajaxedit" id="datevalue_'.$objp->rowid.'" title="'.dol_print_date($db->jdate($objp->dv), "day").'">';
|
||||
print dol_print_date($db->jdate($objp->dv), "dayreduceformat");
|
||||
print "</span>";
|
||||
print ' ';
|
||||
print '<span class="inline-block">';
|
||||
print '<a class="ajaxforbankoperationchange" href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$objp->bankid.'&rowid='.$objp->rowid.'">';
|
||||
|
|
|
|||
|
|
@ -672,10 +672,10 @@ if ($result) {
|
|||
current.click(function()
|
||||
{
|
||||
var url = "'.$urlajax.'&"+current.attr("href").split("?")[1];
|
||||
console.log("We click on ajaxforbankoperationchange url="+url);
|
||||
$.get(url, function(data)
|
||||
{
|
||||
console.log(url)
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
current.parent().prev().replaceWith(data);
|
||||
});
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -744,12 +744,11 @@ if (empty($numref)) {
|
|||
var current = $(this);
|
||||
current.click(function()
|
||||
{
|
||||
console.log("We click on ajaxforbankoperationchange");
|
||||
var url = "'.$urlajax.'&"+current.attr("href").split("?")[1];
|
||||
console.log("We click on ajaxforbankoperationchange url="+url);
|
||||
$.get(url, function(data)
|
||||
{
|
||||
console.log(url)
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
current.parent().parent().find(".spanforajaxedit").replaceWith(data);
|
||||
});
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$format = GETPOST('format');
|
||||
|
||||
// Security check
|
||||
// Checks are done later
|
||||
|
||||
|
|
@ -72,7 +74,7 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli
|
|||
$al->datev_next(GETPOSTINT('rowid'));
|
||||
$al->fetch(GETPOSTINT('rowid'));
|
||||
|
||||
print '<span class="spanforajaxedit" id="datevalue_'.$al->id.'">'.dol_print_date($al->datev, "day").'</span>';
|
||||
print '<span class="spanforajaxedit" id="datevalue_'.$al->id.'">'.dol_print_date($al->datev, ($format ? $format : "day")).'</span>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
@ -83,7 +85,7 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli
|
|||
$al->datev_previous(GETPOSTINT('rowid'));
|
||||
$al->fetch(GETPOSTINT('rowid'));
|
||||
|
||||
print '<span class="spanforajaxedit" id="datevalue_'.$al->id.'">'.dol_print_date($al->datev, "day").'</span>';
|
||||
print '<span class="spanforajaxedit" id="datevalue_'.$al->id.'">'.dol_print_date($al->datev, ($format ? $format : "day")).'</span>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
@ -94,7 +96,7 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli
|
|||
$al->dateo_next(GETPOSTINT('rowid'));
|
||||
$al->fetch(GETPOSTINT('rowid'));
|
||||
|
||||
print '<span class="spanforajaxedit" id="dateoperation_'.$al->id.'">'.dol_print_date($al->dateo, "day").'</span>';
|
||||
print '<span class="spanforajaxedit" id="dateoperation_'.$al->id.'">'.dol_print_date($al->dateo, ($format ? $format : "day")).'</span>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
@ -105,7 +107,7 @@ if (($user->hasRight('banque', 'modifier') || $user->hasRight('banque', 'consoli
|
|||
$al->dateo_previous(GETPOSTINT('rowid'));
|
||||
$al->fetch(GETPOSTINT('rowid'));
|
||||
|
||||
print '<span class="spanforajaxedit" id="dateoperation_'.$al->id.'">'.dol_print_date($al->dateo, "day").'</span>';
|
||||
print '<span class="spanforajaxedit" id="dateoperation_'.$al->id.'">'.dol_print_date($al->dateo, ($format ? $format : "day")).'</span>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user