Some fixes in various payment

This commit is contained in:
Laurent Destailleur 2017-09-11 14:29:27 +02:00
parent 59ab52c718
commit dcc9cb4a16
3 changed files with 7 additions and 4 deletions

View File

@ -509,6 +509,9 @@ class FormProjets
$sql = 'SELECT t.rowid, t.label as ref';
$projectkey='fk_origin';
break;
case "payment_various":
$sql = "SELECT t.rowid, t.num_payment as ref";
break;
case "chargesociales":
default:
$sql = "SELECT t.rowid, t.ref";

View File

@ -19,6 +19,8 @@
create table llx_payment_various
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
num_payment varchar(50), -- ref
label varchar(255),
tms timestamp,
datec datetime, -- Create date
datep date, -- date de paiement
@ -26,8 +28,6 @@ create table llx_payment_various
sens smallint DEFAULT 0 NOT NULL,-- Sens of the operation: 0 for debit operation, 1 for credit operation
amount double(24,8) DEFAULT 0 NOT NULL,
fk_typepayment integer NOT NULL,
num_payment varchar(50), -- ref
label varchar(255),
accountancy_code varchar(32),
fk_projet integer DEFAULT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id

View File

@ -448,7 +448,7 @@ $listofreferent=array(
'datefieldname'=>'datev',
'margin'=>'minus',
'disableamount'=>0,
'urlnew'=>DOL_URL_ROOT.'/compta/bank_various_payment/card.php?action=create&projectid='.$id.'&socid='.$socid,
'urlnew'=>DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&projectid='.$id.'&socid='.$socid,
'lang'=>'banks',
'buttonnew'=>'AddVariousPayment',
'testnew'=>$user->rights->banque->modifier,
@ -731,7 +731,7 @@ foreach ($listofreferent as $key => $value)
if (! empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) $idtofilterthirdparty.=','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS;
}
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty)
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, array('payment_various')))
{
$selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300');
if (! $selectList || ($selectList<0))