Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
0a86515efc
@ -951,7 +951,6 @@ if (empty($id))
|
||||
print $langs->trans("DictionaryDesc");
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
||||
}
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
$param = '&id='.urlencode($id);
|
||||
@ -1016,6 +1015,13 @@ if ($id)
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||
|
||||
if ($id == 10 && empty($conf->global->FACTURE_TVAOPTION))
|
||||
{
|
||||
print info_admin($langs->trans("VATIsUsedIsOff", $langs->transnoentities("Setup"), $langs->transnoentities("CompanyFoundation")));
|
||||
}
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
|
||||
@ -1583,7 +1583,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$out.='</td>';
|
||||
|
||||
// Author of event
|
||||
$out.='<td>';
|
||||
$out.='<td class="tdoverflowmax100">';
|
||||
//$userstatic->id=$histo[$key]['userid'];
|
||||
//$userstatic->login=$histo[$key]['login'];
|
||||
//$out.=$userstatic->getLoginUrl(1);
|
||||
|
||||
@ -38,9 +38,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_order_odt extends ModelePDFCommandes
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -115,9 +115,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
|
||||
|
||||
@ -37,9 +37,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_contract_odt extends ModelePDFContract
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -39,9 +39,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -38,9 +38,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
{
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ class modModuleBuilder extends DolibarrModules
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
$this->config_page_url = array('setup@modulebuilder');
|
||||
$this->config_page_url = array('setup.php@modulebuilder');
|
||||
|
||||
// Dependencies
|
||||
//-------------
|
||||
|
||||
@ -48,7 +48,7 @@ class modSocialNetworks extends DolibarrModules
|
||||
$this->family = "interface";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Enable Social Networks fields into contacts";
|
||||
$this->description = "Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...)";
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = 'dolibarr';
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
|
||||
@ -85,7 +85,20 @@ class modSyslog extends DolibarrModules
|
||||
|
||||
// Cronjobs
|
||||
$this->cronjobs = array(
|
||||
0=>array('label'=>'CompressSyslogs', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'compressSyslogs', 'parameters'=>'', 'comment'=>'Compress and archive log files. Warning: batch must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission "rws" on this directory so log files will always have the group and permissions of the web server Operating System group', 'frequency'=>1, 'unitfrequency'=> 3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>true),
|
||||
0 => array(
|
||||
'label' => 'CompressSyslogs',
|
||||
'jobtype' => 'method',
|
||||
'class' => 'core/class/utils.class.php',
|
||||
'objectname' => 'Utils',
|
||||
'method' => 'compressSyslogs',
|
||||
'parameters' => '',
|
||||
'comment' => 'Compress and archive log files. Warning: batch must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission "rws" on this directory so log files will always have the group and permissions of the web server Operating System group',
|
||||
'frequency' => 1,
|
||||
'unitfrequency' => 3600 * 24,
|
||||
'priority' => 50,
|
||||
'status' => 0,
|
||||
'test' => true,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,9 +36,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_product_odt extends ModelePDFProduct
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 2);
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
@ -76,7 +76,11 @@ class pdf_standard extends ModelePDFProduct
|
||||
public $marge_haute;
|
||||
public $marge_basse;
|
||||
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -54,9 +54,18 @@ if (! empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/
|
||||
*/
|
||||
class doc_generic_task_odt extends ModelePDFTask
|
||||
{
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -37,9 +37,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
{
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -36,9 +36,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_stock_odt extends ModelePDFStock
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFStock
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 2);
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
@ -76,7 +76,11 @@ class pdf_standard extends ModelePDFStock
|
||||
public $marge_haute;
|
||||
public $marge_basse;
|
||||
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -59,9 +59,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 2);
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
@ -77,7 +77,11 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
public $marge_haute;
|
||||
public $marge_basse;
|
||||
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -37,9 +37,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -30,7 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/ticket/modules_ticket.php';
|
||||
*/
|
||||
class mod_ticket_simple extends ModeleNumRefTicket
|
||||
{
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
public $prefix = 'TS';
|
||||
public $error = '';
|
||||
public $nom = "Simple";
|
||||
|
||||
@ -29,7 +29,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/ticket/modules_ticket.php';
|
||||
*/
|
||||
class mod_ticket_universal extends ModeleNumRefTicket
|
||||
{
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
public $error = '';
|
||||
public $nom = 'Universal';
|
||||
public $name = 'Universal';
|
||||
|
||||
@ -35,9 +35,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_user_odt extends ModelePDFUser
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -37,9 +37,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
||||
*/
|
||||
class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
{
|
||||
public $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.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
|
||||
@ -921,8 +922,8 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Commande non trouvee */
|
||||
print "Commande inexistante";
|
||||
/* Order not found */
|
||||
setEventMessages($langs->trans("NonExistentOrder"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1806,6 +1806,7 @@ YouCanDeleteFileOnServerWith=You can delete this file on server with Command Lin
|
||||
ChartLoaded=Chart of account loaded
|
||||
SocialNetworkSetup=Setup of module Social Networks
|
||||
EnableFeatureFor=Enable features for <strong>%s</strong>
|
||||
VATIsUsedIsOff=Note: The option to use sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sale tax or Vat used will always be 0 for sales.
|
||||
##### Resource ####
|
||||
ResourceSetup=Configuration du module Resource
|
||||
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
||||
|
||||
@ -28,3 +28,4 @@ ErrorStockIsNotEnough=There's not enough stock
|
||||
Shippable=Shippable
|
||||
NonShippable=Not Shippable
|
||||
ShowReceiving=Show delivery receipt
|
||||
NonExistentOrder=Non-existent order
|
||||
|
||||
@ -73,7 +73,7 @@ if (preg_match('/del_(.*)/', $action, $reg)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -87,73 +87,78 @@ if (GETPOST('withtab', 'alpha')) {
|
||||
$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php') . '">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print load_fiche_titre($langs->trans("ModuleSetup") . ' ' . $langs->trans('Modulebuilder'), $linkback);
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
dol_fiche_head($head, 'modulebuilder', '', -1);
|
||||
}
|
||||
|
||||
|
||||
print '<span class="opacitymedium">' . $langs->trans("ModuleBuilderDesc") . "</span><br>\n";
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . $langs->trans("Key") . '</td>';
|
||||
print '<td>' . $langs->trans("Value") . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseAboutPage") . '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MODULEBUILDER_USE_ABOUT');
|
||||
} else {
|
||||
if (empty($conf->global->MODULEBUILDER_USE_ABOUT)) {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MODULEBUILDER_USE_ABOUT">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MODULEBUILDER_USE_ABOUT">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
}
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
// What is use cas of this 2 options ?
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseAboutPage") . '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MODULEBUILDER_USE_ABOUT');
|
||||
} else {
|
||||
if (empty($conf->global->MODULEBUILDER_USE_ABOUT)) {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MODULEBUILDER_USE_ABOUT">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MODULEBUILDER_USE_ABOUT">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseDocFolder") . '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MODULEBUILDER_USE_DOCFOLDER');
|
||||
} else {
|
||||
if (empty($conf->global->MODULEBUILDER_USE_DOCFOLDER)) {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MODULEBUILDER_USE_DOCFOLDER">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MODULEBUILDER_USE_DOCFOLDER">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseDocFolder") . '</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MODULEBUILDER_USE_DOCFOLDER');
|
||||
} else {
|
||||
if (empty($conf->global->MODULEBUILDER_USE_DOCFOLDER)) {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MODULEBUILDER_USE_DOCFOLDER">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MODULEBUILDER_USE_DOCFOLDER">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("UseSpecificReadme") . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<textarea cols="100" rows="20" name="MODULEBUILDER_SPECIFIC_README">'.$conf->global->MODULEBUILDER_SPECIFIC_README.'</textarea>';
|
||||
print '</td></tr>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="2"><center>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</center></td></tr>';
|
||||
print '<td class="tdtop">' . $langs->trans("UseSpecificReadme") . '</td>';
|
||||
print '<td>';
|
||||
print '<textarea class="centpercent" rows="20" name="MODULEBUILDER_SPECIFIC_README">'.$conf->global->MODULEBUILDER_SPECIFIC_README.'</textarea>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button"></center>';
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
print '<br><br>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 PtibogXIV <support@ptibogxiv.net>
|
||||
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
||||
*
|
||||
* 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
|
||||
@ -62,13 +62,13 @@ llxHeader('', $langs->trans("StripeChargeList"));
|
||||
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
|
||||
{
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
}
|
||||
else
|
||||
{
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
}
|
||||
|
||||
$stripeacc = $stripe->getStripeAccount($service);
|
||||
@ -150,7 +150,7 @@ if (!$rowid)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
||||
if (!empty($stripeacc)) $connect=$stripeacc.'/';
|
||||
|
||||
// Ref
|
||||
$url='https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id;
|
||||
|
||||
@ -26,9 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
if (! empty($conf->accounting->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
}
|
||||
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe'));
|
||||
@ -65,16 +63,16 @@ llxHeader('', $langs->trans("StripeTransactionList"));
|
||||
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
|
||||
{
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
}
|
||||
else
|
||||
{
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
$servicestatus = '1';
|
||||
}
|
||||
|
||||
$stripeaccount = $stripe->getStripeAccount($service);
|
||||
$stripeacc = $stripe->getStripeAccount($service);
|
||||
/*if (empty($stripeaccount))
|
||||
{
|
||||
print $langs->trans('ErrorStripeAccountNotDefined');
|
||||
@ -83,9 +81,8 @@ $stripeaccount = $stripe->getStripeAccount($service);
|
||||
if (! $rowid) {
|
||||
|
||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
|
||||
}
|
||||
if ($optioncss != '')
|
||||
print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
@ -94,7 +91,7 @@ if (! $rowid) {
|
||||
print '<input type="hidden" name="page" value="' . $page . '">';
|
||||
|
||||
$title=$langs->trans("StripeTransactionList");
|
||||
$title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeaccount.')':' (Stripe connection with keys from Stripe module setup)');
|
||||
$title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)');
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
|
||||
@ -115,9 +112,9 @@ if (! $rowid) {
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
if ($stripeaccount)
|
||||
if ($stripeacc)
|
||||
{
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeacc));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -164,8 +161,9 @@ if (! $rowid) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
||||
if (!empty($stripeacc)) $connect=$stripeacc.'/';
|
||||
|
||||
// Ref
|
||||
if (preg_match('/po_/i', $txn->source)){
|
||||
$origin="payouts";
|
||||
} elseif (preg_match('/fee_/i', $txn->source)) {
|
||||
@ -175,15 +173,14 @@ if (! $rowid) {
|
||||
}
|
||||
|
||||
$url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source;
|
||||
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source;
|
||||
}
|
||||
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source;
|
||||
}
|
||||
if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') {
|
||||
print "<td>".$txn->type."</td>";
|
||||
} else print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "</a></td>\n";
|
||||
|
||||
// Stripe customer
|
||||
//print "<td>".$charge->customer."</td>\n";
|
||||
// Link
|
||||
@ -198,16 +195,15 @@ if (! $rowid) {
|
||||
}
|
||||
print "</td>\n";*/
|
||||
// Origine
|
||||
|
||||
//print "<td>";
|
||||
////if ($charge->metadata->dol_type=="order"){
|
||||
// $object = new Commande($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<A href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</A>";
|
||||
// print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
//} elseif ($charge->metadata->dol_type=="invoice"){
|
||||
// $object = new Facture($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<A href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</A>";
|
||||
// print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
//}
|
||||
//print "</td>\n";
|
||||
// Date payment
|
||||
@ -219,13 +215,12 @@ if (! $rowid) {
|
||||
print "<td align=\"right\">" . price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency)) . "</td>";
|
||||
// Status
|
||||
print "<td align='right'>";
|
||||
if ($txn->status=='available') {
|
||||
print img_picto($langs->trans("".$txn->status.""),'statut4');
|
||||
} elseif ($txn->status=='pending') {
|
||||
print img_picto($langs->trans("".$txn->status.""),'statut7');
|
||||
} elseif ($txn->status=='failed') {
|
||||
print img_picto($langs->trans("".$txn->status.""),'statut8');
|
||||
}
|
||||
if ($txn->status=='available')
|
||||
{print img_picto($langs->trans("".$txn->status.""),'statut4');}
|
||||
elseif ($txn->status=='pending')
|
||||
{print img_picto($langs->trans("".$txn->status.""),'statut7');}
|
||||
elseif ($txn->status=='failed')
|
||||
{print img_picto($langs->trans("".$txn->status.""),'statut8');}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -214,5 +214,4 @@ class LoanTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertLessThan($result, 0);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user