Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
fc20237cc7
@ -15,6 +15,7 @@ For translators:
|
|||||||
For developers:
|
For developers:
|
||||||
- New: Add path file of trigger into admin trigger list page.
|
- New: Add path file of trigger into admin trigger list page.
|
||||||
- New: More phpunit tests.
|
- New: More phpunit tests.
|
||||||
|
- New: Payments and supplier payment pages tabs can now be extended from modules.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -131,6 +131,8 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'user' to add a tab in user view
|
// 'user' to add a tab in user view
|
||||||
// 'group' to add a tab in group view
|
// 'group' to add a tab in group view
|
||||||
// 'contact' to add a tab in contact view
|
// 'contact' to add a tab in contact view
|
||||||
|
// 'payment' to add a tab in payment view
|
||||||
|
// 'payment_supplier' to add a tab in supplier payment view
|
||||||
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
||||||
$this->tabs = array();
|
$this->tabs = array();
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -29,6 +30,7 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
@ -173,19 +175,9 @@ if ($result <= 0)
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$h=0;
|
$head = payment_prepare_head($object);
|
||||||
|
|
||||||
$head[$h][0] = $_SERVER['PHP_SELF'].'?id='.$id;
|
dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'payment');
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$id;
|
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"), 0, 'payment');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression du paiement
|
* Confirmation de la suppression du paiement
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,6 +26,7 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
@ -40,20 +42,9 @@ $paiement = new Paiement($db);
|
|||||||
$paiement->fetch($_GET["id"], $user);
|
$paiement->fetch($_GET["id"], $user);
|
||||||
$paiement->info($_GET["id"]);
|
$paiement->info($_GET["id"]);
|
||||||
|
|
||||||
|
$head = payment_prepare_head($paiement);
|
||||||
|
|
||||||
$h=0;
|
dol_fiche_head($head, 'info', $langs->trans("PaymentCustomerInvoice"), 0, 'payment');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"), 0, 'payment');
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
|||||||
75
htdocs/core/lib/payments.lib.php
Normal file
75
htdocs/core/lib/payments.lib.php
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*/
|
||||||
|
|
||||||
|
function payment_prepare_head($object) {
|
||||||
|
|
||||||
|
global $langs, $conf;
|
||||||
|
|
||||||
|
$h = 0;
|
||||||
|
$head = array();
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Card");
|
||||||
|
$head[$h][2] = 'payment';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'payment');
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Info");
|
||||||
|
$head[$h][2] = 'info';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'payment', 'remove');
|
||||||
|
|
||||||
|
return $head;
|
||||||
|
}
|
||||||
|
|
||||||
|
function payment_supplier_prepare_head($object) {
|
||||||
|
|
||||||
|
global $langs, $conf;
|
||||||
|
|
||||||
|
$h = 0;
|
||||||
|
$head = array();
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Card");
|
||||||
|
$head[$h][2] = 'payment';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_supplier');
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/info.php?id='.$object->id;
|
||||||
|
$head[$h][1] = $langs->trans('Info');
|
||||||
|
$head[$h][2] = 'info';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_supplier', 'remove');
|
||||||
|
|
||||||
|
return $head;
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -28,6 +29,7 @@ require '../../main.inc.php';
|
|||||||
require DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||||
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
|
require DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('banks');
|
$langs->load('banks');
|
||||||
@ -137,23 +139,14 @@ if ($action == 'setdatep' && ! empty($_POST['datepday']))
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
$result=$object->fetch($id);
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$h=0;
|
$head = payment_supplier_prepare_head($object);
|
||||||
|
|
||||||
$head[$h][0] = $_SERVER['PHP_SELF'].'?id='.$id;
|
dol_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), 0, 'payment');
|
||||||
$head[$h][1] = $langs->trans('Card');
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/info.php?id='.$id;
|
|
||||||
$head[$h][1] = $langs->trans('Info');
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $hselected, $langs->trans('SupplierPayment'), 0, 'payment');
|
|
||||||
|
|
||||||
$result=$object->fetch($id);
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,34 +26,25 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
|
require DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
$paiement = new PaiementFourn($db);
|
||||||
|
$paiement->fetch($_GET["id"], $user);
|
||||||
|
$paiement->info($_GET["id"]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
$h=0;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$_GET["id"];
|
$head = payment_supplier_prepare_head($paiement);
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/info.php?id='.$_GET["id"];
|
dol_fiche_head($head, 'info', $langs->trans("SupplierPayment"), 0, 'payment');
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("SupplierPayment"), 0, 'payment');
|
|
||||||
|
|
||||||
|
|
||||||
$paiement = new PaiementFourn($db);
|
|
||||||
$paiement->fetch($_GET["id"], $user);
|
|
||||||
$paiement->info($_GET["id"]);
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($paiement);
|
dol_print_object_info($paiement);
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
create table llx_projet_task
|
create table llx_projet_task
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
ref varchar(50),
|
||||||
fk_projet integer NOT NULL,
|
fk_projet integer NOT NULL,
|
||||||
fk_task_parent integer DEFAULT 0 NOT NULL,
|
fk_task_parent integer DEFAULT 0 NOT NULL,
|
||||||
datec datetime, -- date creation
|
datec datetime, -- date creation
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user