Fix a deadlock feature
This commit is contained in:
parent
db3e3642b0
commit
c982409c72
@ -81,6 +81,8 @@ $req_enddtday=GETPOST('req_enddtday', 'int');
|
|||||||
$req_enddtyear=GETPOST('req_enddtyear', 'int');
|
$req_enddtyear=GETPOST('req_enddtyear', 'int');
|
||||||
$req_enddt = dol_mktime(23, 59, 59, $req_enddtmonth, $req_enddtday, $req_enddtyear);
|
$req_enddt = dol_mktime(23, 59, 59, $req_enddtmonth, $req_enddtday, $req_enddtyear);
|
||||||
|
|
||||||
|
$search_reconciled = GETPOST('search_reconciled');
|
||||||
|
|
||||||
$vline=GETPOST("vline");
|
$vline=GETPOST("vline");
|
||||||
$page=GETPOST('page','int');
|
$page=GETPOST('page','int');
|
||||||
$negpage=GETPOST('negpage','int');
|
$negpage=GETPOST('negpage','int');
|
||||||
@ -108,6 +110,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
|||||||
$req_enddtday="";
|
$req_enddtday="";
|
||||||
$req_enddtyear="";
|
$req_enddtyear="";
|
||||||
$req_enddt = "";
|
$req_enddt = "";
|
||||||
|
$search_reconciled = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -281,6 +284,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($search_reconciled == 'reconciled') $sql_rech.=" AND num_releve IS NOT NULL";
|
||||||
|
if ($search_reconciled == 'notreconciled') $sql_rech.=" AND num_releve IS NULL";
|
||||||
|
|
||||||
$sql = "SELECT count(*) as total";
|
$sql = "SELECT count(*) as total";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||||
@ -294,6 +299,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$sql.= " AND b.fk_account = ba.rowid";
|
$sql.= " AND b.fk_account = ba.rowid";
|
||||||
$sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")";
|
$sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")";
|
||||||
$sql.= $sql_rech;
|
$sql.= $sql_rech;
|
||||||
|
print $sql;
|
||||||
|
|
||||||
dol_syslog("account.php count transactions -", LOG_DEBUG);
|
dol_syslog("account.php count transactions -", LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -492,6 +498,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
* Show list of bank transactions
|
* Show list of bank transactions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="search">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Ligne de titre tableau des ecritures
|
// Ligne de titre tableau des ecritures
|
||||||
@ -504,19 +515,16 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Debit").'</td>';
|
print '<td align="right">'.$langs->trans("Debit").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
||||||
print '<td align="right" width="80">'.$langs->trans("BankBalance").'</td>';
|
print '<td align="right">'.$langs->trans("BankBalance").'</td>';
|
||||||
print '<td align="center" width="60">';
|
print '<td align="center">';
|
||||||
if ($object->canBeConciliated() > 0) {
|
if ($object->canBeConciliated() > 0) {
|
||||||
print $langs->trans("AccountStatementShort");
|
print $langs->trans("AccountStatementShort");
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td>';
|
||||||
|
print '<td></td>';
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
|
print '</tr>';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="search">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
|
||||||
|
|
||||||
$period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,0,1);
|
$period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,0,1);
|
||||||
$period_filter .= ' ';
|
$period_filter .= ' ';
|
||||||
@ -530,12 +538,16 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$form->select_types_paiements($paiementtype,'paiementtype',$filtertype,2,1,1,8);
|
$form->select_types_paiements($paiementtype,'paiementtype',$filtertype,2,1,1,8);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>';
|
print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>';
|
||||||
print '<td><input type="text" class="flat" name="req_desc" value="'.$req_desc.'" size="24"></td>';
|
print '<td><input type="text" class="flat" name="req_desc" value="'.$req_desc.'" size="14"></td>';
|
||||||
print '<td><input type="text" class="flat" name="thirdparty" value="'.$thirdparty.'" size="14"></td>';
|
print '<td><input type="text" class="flat" name="thirdparty" value="'.$thirdparty.'" size="14"></td>';
|
||||||
print '<td align="right"><input type="text" class="flat" name="req_debit" value="'.$req_debit.'" size="4"></td>';
|
print '<td align="right"><input type="text" class="flat" name="req_debit" value="'.$req_debit.'" size="4"></td>';
|
||||||
print '<td align="right"><input type="text" class="flat" name="req_credit" value="'.$req_credit.'" size="4"></td>';
|
print '<td align="right"><input type="text" class="flat" name="req_credit" value="'.$req_credit.'" size="4"></td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td align="center">';
|
||||||
|
$array=array('reconciled'=>$langs->trans("Reconciled"), 'notreconciled'=>$langs->trans("NotReconciled"));
|
||||||
|
print $form->selectarray('search_reconciled', $array, $search_reconciled, 1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -919,6 +931,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<td></td>';
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -935,6 +949,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print ' '.$object->currency_code.'</td>';
|
print ' '.$object->currency_code.'</td>';
|
||||||
print '<td align="right" class="nowrap"><b>'.price($total).'</b></td>';
|
print '<td align="right" class="nowrap"><b>'.price($total).'</b></td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
// Only total according row displays
|
// Only total according row displays
|
||||||
@ -946,6 +961,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="right" class="nowrap"><b>'.price($total_cred).'</b></td>';
|
print '<td align="right" class="nowrap"><b>'.price($total_cred).'</b></td>';
|
||||||
print '<td align="right" class="nowrap"><b>'.price($total_cred-($total_deb*-1)).'</b></td>';
|
print '<td align="right" class="nowrap"><b>'.price($total_cred-($total_deb*-1)).'</b></td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
|
|||||||
@ -207,11 +207,14 @@ class modAccounting extends DolibarrModules
|
|||||||
"chaine",
|
"chaine",
|
||||||
"csv"
|
"csv"
|
||||||
);
|
);
|
||||||
|
/* Not required to disable this. This make not possible to do complete reconciliation.
|
||||||
|
Also, this is not a problem, lines added manually will be reported as "not binded into accounting export module
|
||||||
|
and will be binded manually to be created into general ledger
|
||||||
$this->const[24] = array(
|
$this->const[24] = array(
|
||||||
"BANK_DISABLE_DIRECT_INPUT",
|
"BANK_DISABLE_DIRECT_INPUT",
|
||||||
"yesno",
|
"yesno",
|
||||||
"1"
|
"1"
|
||||||
);
|
);*/
|
||||||
|
|
||||||
// Tabs
|
// Tabs
|
||||||
$this->tabs = array();
|
$this->tabs = array();
|
||||||
|
|||||||
@ -88,6 +88,8 @@ AddBankRecordLong=Add transaction manually
|
|||||||
ConciliatedBy=Reconciled by
|
ConciliatedBy=Reconciled by
|
||||||
DateConciliating=Reconcile date
|
DateConciliating=Reconcile date
|
||||||
BankLineConciliated=Transaction reconciled
|
BankLineConciliated=Transaction reconciled
|
||||||
|
Reconciled=Reconciled
|
||||||
|
NotReconciled=Not reconciled
|
||||||
CustomerInvoicePayment=Customer payment
|
CustomerInvoicePayment=Customer payment
|
||||||
SupplierInvoicePayment=Supplier payment
|
SupplierInvoicePayment=Supplier payment
|
||||||
SubscriptionPayment=Subscription payment
|
SubscriptionPayment=Subscription payment
|
||||||
@ -131,7 +133,7 @@ FutureTransaction=Transaction in futur. No way to conciliate.
|
|||||||
SelectChequeTransactionAndGenerate=Select/filter checks to include into the check deposit receipt and click on "Create".
|
SelectChequeTransactionAndGenerate=Select/filter checks to include into the check deposit receipt and click on "Create".
|
||||||
InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value: YYYYMM or YYYYMMDD
|
InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value: YYYYMM or YYYYMMDD
|
||||||
EventualyAddCategory=Eventually, specify a category in which to classify the records
|
EventualyAddCategory=Eventually, specify a category in which to classify the records
|
||||||
ToConciliate=To conciliate?
|
ToConciliate=To reconcile ?
|
||||||
ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click
|
ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click
|
||||||
DefaultRIB=Default BAN
|
DefaultRIB=Default BAN
|
||||||
AllRIB=All BAN
|
AllRIB=All BAN
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user