Debug various payment
This commit is contained in:
parent
280a034199
commit
bc030561ac
@ -449,7 +449,7 @@ class BlockedLog
|
|||||||
{
|
{
|
||||||
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
|
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
|
||||||
if (! in_array($key, array(
|
if (! in_array($key, array(
|
||||||
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public','lines'
|
'ref','ref_client','ref_supplier','date','datef','datev','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public','lines'
|
||||||
))) continue; // Discard if not into a dedicated list
|
))) continue; // Discard if not into a dedicated list
|
||||||
if ($key == 'lines')
|
if ($key == 'lines')
|
||||||
{
|
{
|
||||||
@ -459,8 +459,8 @@ class BlockedLog
|
|||||||
$lineid++;
|
$lineid++;
|
||||||
foreach($tmpline as $keyline => $valueline)
|
foreach($tmpline as $keyline => $valueline)
|
||||||
{
|
{
|
||||||
if (! in_array($keyline, array(
|
if (! in_array($keyline, array(
|
||||||
'ref','multicurrency_code','multicurrency_total_ht','multicurrency_total_tva','multicurrency_total_ttc','qty','product_type','vat_src_code','tva_tx','info_bits','localtax1_tx','localtax2_tx','total_ht','total_tva','total_ttc','total_localtax1','total_localtax2'
|
'ref','multicurrency_code','multicurrency_total_ht','multicurrency_total_tva','multicurrency_total_ttc','qty','product_type','vat_src_code','tva_tx','info_bits','localtax1_tx','localtax2_tx','total_ht','total_tva','total_ttc','total_localtax1','total_localtax2'
|
||||||
))) continue; // Discard if not into a dedicated list
|
))) continue; // Discard if not into a dedicated list
|
||||||
|
|
||||||
if (! is_object($this->object_data->invoiceline[$lineid])) $this->object_data->invoiceline[$lineid] = new stdClass();
|
if (! is_object($this->object_data->invoiceline[$lineid])) $this->object_data->invoiceline[$lineid] = new stdClass();
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if (! empty($conf->projet->enabled))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
|
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy", "categories"));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
@ -144,6 +144,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
// TODO Remove this and allow instead to edit a various payment to enter accounting code
|
||||||
if (! empty($conf->accounting->enabled) && ! $object->accountancy_code)
|
if (! empty($conf->accounting->enabled) && ! $object->accountancy_code)
|
||||||
{
|
{
|
||||||
$langs->load('errors');
|
$langs->load('errors');
|
||||||
@ -324,14 +325,6 @@ if ($action == 'create')
|
|||||||
print '<td><input name="num_payment" id="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
|
print '<td><input name="num_payment" id="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Category
|
|
||||||
if (is_array($options) && count($options))
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("RubriquesTransactions").'</td><td>';
|
|
||||||
print Form::selectarray('category_transaction', $options, GETPOST('category_transaction'), 1);
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
@ -353,14 +346,20 @@ if ($action == 'create')
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
// Category
|
||||||
|
if (is_array($options) && count($options) && $conf->categorie->enabled)
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("RubriquesTransactions").'</td><td>';
|
||||||
|
print Form::selectarray('category_transaction', $options, GETPOST('category_transaction'), 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Accountancy account
|
// Accountancy account
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("AccountAccounting").'</td>';
|
// TODO Remove the fieldrequired and allow instead to edit a various payment to enter accounting code
|
||||||
|
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("AccountAccounting").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($accountancy_code, 'accountancy_code', 1, null, 1, 1, '');
|
print $formaccounting->select_account($accountancy_code, 'accountancy_code', 1, null, 1, 1, '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -525,7 +524,6 @@ if ($id)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
@ -537,7 +535,12 @@ if ($id)
|
|||||||
* Action buttons
|
* Action buttons
|
||||||
*/
|
*/
|
||||||
print '<div class="tabsAction">'."\n";
|
print '<div class="tabsAction">'."\n";
|
||||||
if ($object->rappro == 0)
|
|
||||||
|
// TODO
|
||||||
|
// Add button modify
|
||||||
|
|
||||||
|
// Delete
|
||||||
|
if (empty($object->rappro))
|
||||||
{
|
{
|
||||||
if (! empty($user->rights->banque->modifier))
|
if (! empty($user->rights->banque->modifier))
|
||||||
{
|
{
|
||||||
@ -552,6 +555,7 @@ if ($id)
|
|||||||
{
|
{
|
||||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or
|
|||||||
$offset = $conf->liste_limit * $page;
|
$offset = $conf->liste_limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (! $sortfield) $sortfield="v.datep";
|
if (! $sortfield) $sortfield="v.datep,v.rowid";
|
||||||
if (! $sortorder) $sortorder="DESC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
|
|
||||||
$filtre=GETPOST("filtre", 'alpha');
|
$filtre=GETPOST("filtre", 'alpha');
|
||||||
@ -110,13 +110,13 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.row
|
|||||||
$sql.= " WHERE v.entity IN (".getEntity('payment_various').")";
|
$sql.= " WHERE v.entity IN (".getEntity('payment_various').")";
|
||||||
|
|
||||||
// Search criteria
|
// Search criteria
|
||||||
if ($search_ref) $sql.=" AND v.rowid=".$search_ref;
|
if ($search_ref) $sql.=" AND v.rowid=".$db->escape($search_ref);
|
||||||
if ($search_label) $sql.=natural_search(array('v.label'), $search_label);
|
if ($search_label) $sql.=natural_search(array('v.label'), $search_label);
|
||||||
if ($search_amount_deb) $sql.=natural_search("v.amount", $search_amount_deb, 1);
|
if ($search_amount_deb) $sql.=natural_search("v.amount", $search_amount_deb, 1);
|
||||||
if ($search_amount_cred) $sql.=natural_search("v.amount", $search_amount_cred, 1);
|
if ($search_amount_cred) $sql.=natural_search("v.amount", $search_amount_cred, 1);
|
||||||
if ($search_account > 0) $sql.=" AND b.fk_account=".$search_account;
|
if ($search_account > 0) $sql.=" AND b.fk_account=".$db->escape($search_account);
|
||||||
if ($search_date) $sql.=" AND v.datep=".$search_date;
|
if ($search_date) $sql.=" AND v.datep = '".$db->idate($search_date)."'";
|
||||||
if ($search_accountancy_code > 0) $sql.=" AND v.accountancy_code=".$search_accountancy_code;
|
if ($search_accountancy_code > 0) $sql.=" AND v.accountancy_code=".$db->escape($search_accountancy_code);
|
||||||
if ($typeid > 0) $sql .= " AND v.fk_typepayment=".$typeid;
|
if ($typeid > 0) $sql .= " AND v.fk_typepayment=".$typeid;
|
||||||
if ($filtre) {
|
if ($filtre) {
|
||||||
$filtre=str_replace(":", "=", $filtre);
|
$filtre=str_replace(":", "=", $filtre);
|
||||||
@ -234,7 +234,7 @@ if ($result)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep,v.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, '', $sortfield, $sortorder, 'left ');
|
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user