Merge remote-tracking branch 'upstream/develop' into optimization
Conflicts: test/phpunit/Functions2LibTest.php
This commit is contained in:
commit
1a254b310e
@ -134,6 +134,10 @@ For users:
|
|||||||
- Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages
|
- Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages
|
||||||
- Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger.
|
- Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger.
|
||||||
- Fix: [ bug #1517 ] Packages sizes.
|
- Fix: [ bug #1517 ] Packages sizes.
|
||||||
|
- Fix: [ bug #1521 ] The second order's page from a provider shows all orders
|
||||||
|
|
||||||
|
TODO
|
||||||
|
- New: Predefined product and free product use same form.
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|||||||
@ -115,8 +115,8 @@ Divers:
|
|||||||
- Application simple à utiliser.
|
- Application simple à utiliser.
|
||||||
- Plusieurs thèmes visuels.
|
- Plusieurs thèmes visuels.
|
||||||
- Code simple et facilement personnalisable.
|
- Code simple et facilement personnalisable.
|
||||||
- Fonctionne avec PHP 5.3+, MySQL 4.1+ ou PostgreSql 8.1.4+.
|
- Requiert PHP et Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis).
|
||||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis MySQL et PHP.
|
- Compatible avec toutes les offres Cloud du marché respectant les prérequis MySQL et PHP ou Postgresql.
|
||||||
|
|
||||||
|
|
||||||
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
|
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
|
||||||
|
|||||||
@ -114,6 +114,7 @@ See ChangeLog file found into package.
|
|||||||
- Very user friendly and easy to use.
|
- Very user friendly and easy to use.
|
||||||
- Highly customizable: Enable only modules you need, user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one).
|
- Highly customizable: Enable only modules you need, user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one).
|
||||||
- Works with PHP 5.3+, MySql 4.1 or PostgreSQL 8.1.
|
- Works with PHP 5.3+, MySql 4.1 or PostgreSQL 8.1.
|
||||||
|
- Require PHP and Mysql or Postgresql (See exatc versions on http://wiki.dolibarr.org/index.php/Prerequisite).
|
||||||
- Compatible with all Cloud solutions that match MySql, PHP or PostgreSQL prerequisites.
|
- Compatible with all Cloud solutions that match MySql, PHP or PostgreSQL prerequisites.
|
||||||
- An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture).
|
- An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture).
|
||||||
- Support countries specific features:
|
- Support countries specific features:
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!ELEMENT ruleset (description,rule+)>
|
<!ELEMENT ruleset (description,exclude-pattern*,rule+)>
|
||||||
<!ATTLIST ruleset name CDATA "">
|
<!ATTLIST ruleset name CDATA "">
|
||||||
<!ELEMENT description (#PCDATA)>
|
<!ELEMENT description (#PCDATA)>
|
||||||
|
<!ELEMENT exclude-pattern (#PCDATA)>
|
||||||
<!ELEMENT rule (properties*,severity*)>
|
<!ELEMENT rule (properties*,severity*)>
|
||||||
<!ATTLIST rule ref CDATA "">
|
<!ATTLIST rule ref CDATA "">
|
||||||
<!ELEMENT properties (property+)>
|
<!ELEMENT properties (property+)>
|
||||||
|
|||||||
@ -3,6 +3,12 @@
|
|||||||
<ruleset name="Dolibarr">
|
<ruleset name="Dolibarr">
|
||||||
<description>Dolibarr coding standard.</description>
|
<description>Dolibarr coding standard.</description>
|
||||||
|
|
||||||
|
<exclude-pattern>*/conf.php</exclude-pattern>
|
||||||
|
<exclude-pattern>*/includes/*</exclude-pattern>
|
||||||
|
<exclude-pattern>*/documents/*</exclude-pattern>
|
||||||
|
<exclude-pattern>*/custom/*</exclude-pattern>
|
||||||
|
<exclude-pattern>*/nltechno*</exclude-pattern>
|
||||||
|
|
||||||
<!-- List of all tests -->
|
<!-- List of all tests -->
|
||||||
|
|
||||||
<rule ref="Internal.NoCodeFound">
|
<rule ref="Internal.NoCodeFound">
|
||||||
@ -19,7 +25,7 @@
|
|||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
|
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
|
||||||
<!-- <rule ref="Zend.Files.ClosingTag"/> -->
|
<rule ref="Zend.Files.ClosingTag"/>
|
||||||
|
|
||||||
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
||||||
|
|
||||||
|
|||||||
@ -90,6 +90,7 @@ class Adherent extends CommonObject
|
|||||||
var $user_login;
|
var $user_login;
|
||||||
|
|
||||||
var $fk_soc;
|
var $fk_soc;
|
||||||
|
var $thirdparty; // Loaded by ->fetch_thirdparty()
|
||||||
|
|
||||||
// Fields loaded by fetch_subscriptions()
|
// Fields loaded by fetch_subscriptions()
|
||||||
var $first_subscription_date;
|
var $first_subscription_date;
|
||||||
|
|||||||
@ -15,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -120,10 +119,7 @@ $var=true;
|
|||||||
|
|
||||||
if (empty($conf->use_javascript_ajax))
|
if (empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
setEventMessage(array(
|
setEventMessage(array($langs->trans("NotAvailable"), $langs->trans("JavascriptDisabled")), 'errors');
|
||||||
$langs->trans("NotAvailable"),
|
|
||||||
$langs->trans("JavascriptDisabled")
|
|
||||||
), 'errors');
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,19 +41,23 @@ print '<tr><td valign="top" width="40%" class="notopnoleft">';
|
|||||||
/*
|
/*
|
||||||
* Turnover
|
* Turnover
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print_titre($langs->trans('SalesTurnover'));
|
print_titre($langs->trans('SalesTurnover'));
|
||||||
|
|
||||||
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">';
|
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Description").'</td>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Month").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").'</td></tr>';
|
print '<td align="right">'.$langs->trans("Total").'</td></tr>';
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$sql = "SELECT sum(t.value) as value, MONTH(o.date_purchased) as mois";
|
$sql = "SELECT SUM(t.value) as value, MONTH(o.date_purchased) as month";
|
||||||
$sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
|
$sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
|
||||||
$sql .= " JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o ON o.orders_id = t.orders_id";
|
$sql.= " JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o ON o.orders_id = t.orders_id";
|
||||||
$sql .= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR(".$dbosc->idate($now).")";
|
//$sql.= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR(".$dbosc->idate($now).")";
|
||||||
$sql .= " GROUP BY mois ORDER BY mois";
|
$sql.= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR('".$db->idate($now)."')";
|
||||||
|
$sql.= " GROUP BY month";
|
||||||
|
$sql.= " ORDER BY month";
|
||||||
|
//print $sql;exit;
|
||||||
|
|
||||||
$result=$dbosc->query($sql);
|
$result=$dbosc->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -116,7 +120,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
|
|
||||||
$obj = $dbosc->fetch_object($resql);
|
$obj = $dbosc->fetch_object($resql);
|
||||||
print "<tr><td>$obj->orders_id</td><td>$obj->customers_name</td><td>".price($obj->value)."</td><td>$obj->payment_method</td></tr>";
|
print "<tr><td>".$obj->orders_id."</td><td>".$obj->customers_name."</td><td>".price($obj->value)."</td><td>".$obj->payment_method."</td></tr>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
@ -235,6 +239,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
|
|
||||||
$dbosc->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$dbosc->close();
|
||||||
|
|||||||
@ -195,16 +195,6 @@ if ($resql)
|
|||||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||||
|
|
||||||
/*if ($socid)
|
|
||||||
{
|
|
||||||
$societe = new Societe($db);
|
|
||||||
$societe->fetch($socid);
|
|
||||||
$newtitle=$langs->trans($title).' '.$langs->trans("For").' '.$societe->nom;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$newtitle=$langs->trans($title);
|
|
||||||
}*/
|
|
||||||
$newtitle=$langs->trans($title);
|
$newtitle=$langs->trans($title);
|
||||||
|
|
||||||
$tabactive='';
|
$tabactive='';
|
||||||
@ -298,7 +288,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$societestatic->id=$obj->socid;
|
$societestatic->id=$obj->socid;
|
||||||
$societestatic->client=$obj->client;
|
$societestatic->client=$obj->client;
|
||||||
$societestatic->nom=$obj->societe;
|
$societestatic->name=$obj->societe;
|
||||||
print $societestatic->getNomUrl(1,'',10);
|
print $societestatic->getNomUrl(1,'',10);
|
||||||
}
|
}
|
||||||
else print ' ';
|
else print ' ';
|
||||||
|
|||||||
@ -304,7 +304,7 @@ elseif ($action == 'edit')
|
|||||||
$societe->fetch($socid);
|
$societe->fetch($socid);
|
||||||
$head = societe_prepare_head($societe);
|
$head = societe_prepare_head($societe);
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $societe->nom);
|
dol_fiche_head($head, 'card', $societe->name);
|
||||||
|
|
||||||
print_titre($langs->trans("EditAddress"));
|
print_titre($langs->trans("EditAddress"));
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
@ -407,7 +407,7 @@ else
|
|||||||
$societe->fetch($object->socid);
|
$societe->fetch($object->socid);
|
||||||
$head = societe_prepare_head($societe);
|
$head = societe_prepare_head($societe);
|
||||||
|
|
||||||
dol_fiche_head($head, 'customer', $societe->nom);
|
dol_fiche_head($head, 'customer', $societe->name);
|
||||||
|
|
||||||
|
|
||||||
// Confirmation delete
|
// Confirmation delete
|
||||||
|
|||||||
@ -3463,7 +3463,7 @@ if ($action == 'create')
|
|||||||
if ($resteapayer == 0) {
|
if ($resteapayer == 0) {
|
||||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseRemainderToPayIsZero") . '">' . $langs->trans('DoPayment') . '</span></div>';
|
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseRemainderToPayIsZero") . '">' . $langs->trans('DoPayment') . '</span></div>';
|
||||||
} else {
|
} else {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid=' . $object->id . '&action=create &accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid=' . $object->id . '&action=create&accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,9 +149,23 @@ class Interfaces
|
|||||||
$objMod = new $modName($this->db);
|
$objMod = new $modName($this->db);
|
||||||
if ($objMod)
|
if ($objMod)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Launch triggers for file '".$files[$key]."'", LOG_INFO);
|
$result=0;
|
||||||
|
|
||||||
|
if (method_exists($objMod, 'runTrigger')) // New method to implement
|
||||||
|
{
|
||||||
|
dol_syslog(get_class($this)."::run_triggers action=".$action." Launch runTrigger for file '".$files[$key]."'", LOG_INFO);
|
||||||
|
$result=$objMod->runTrigger($action,$object,$user,$langs,$conf);
|
||||||
|
}
|
||||||
|
elseif (method_exists($objMod, 'run_trigger')) // Deprecated method
|
||||||
|
{
|
||||||
|
dol_syslog(get_class($this)."::run_triggers action=".$action." Launch run_trigger for file '".$files[$key]."'", LOG_INFO);
|
||||||
|
$result=$objMod->run_trigger($action,$object,$user,$langs,$conf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_syslog(get_class($this)."::run_triggers action=".$action." A trigger was declared for class ".get_class($objMod)." but method runTrigger was not found", LOG_ERR);
|
||||||
|
}
|
||||||
|
|
||||||
$result=$objMod->run_trigger($action,$object,$user,$langs,$conf);
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// Action OK
|
// Action OK
|
||||||
@ -173,7 +187,7 @@ class Interfaces
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Failed to instantiate trigger for file '".$files[$key]."'", LOG_ERR);
|
dol_syslog(get_class($this)."::run_triggers action=".$action." Failed to instantiate trigger for file '".$files[$key]."'", LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,6 +101,13 @@ function SendError($number, $text)
|
|||||||
exit ;
|
exit ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SendErrorNode
|
||||||
|
*
|
||||||
|
* @param integer $number Number
|
||||||
|
* @param string $text Text of error
|
||||||
|
* @return string Error node
|
||||||
|
*/
|
||||||
function SendErrorNode($number, $text)
|
function SendErrorNode($number, $text)
|
||||||
{
|
{
|
||||||
if ($text)
|
if ($text)
|
||||||
|
|||||||
@ -70,6 +70,14 @@ function GetResourceTypeDirectory($resourceType, $sCommand)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetUrlFromPath
|
||||||
|
*
|
||||||
|
* @param string $resourceType Resource type
|
||||||
|
* @param string $folderPath Path
|
||||||
|
* @param string $sCommand Command
|
||||||
|
* @return string Full url
|
||||||
|
*/
|
||||||
function GetUrlFromPath($resourceType, $folderPath, $sCommand)
|
function GetUrlFromPath($resourceType, $folderPath, $sCommand)
|
||||||
{
|
{
|
||||||
return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath);
|
return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath);
|
||||||
|
|||||||
@ -4053,10 +4053,11 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set event message in dol_events session
|
* Set event message in dol_events session object. Will be output by calling dol_htmloutput_events.
|
||||||
|
* Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function.
|
||||||
*
|
*
|
||||||
* @param mixed $mesgs Message string or array
|
* @param mixed $mesgs Message string or array
|
||||||
* @param string $style Which style to use ('mesgs', 'warnings', 'errors')
|
* @param string $style Which style to use ('mesgs' by default, 'warnings', 'errors')
|
||||||
* @return void
|
* @return void
|
||||||
* @see dol_htmloutput_events
|
* @see dol_htmloutput_events
|
||||||
*/
|
*/
|
||||||
@ -4078,6 +4079,8 @@ function setEventMessage($mesgs, $style='mesgs')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Print formated messages to output (Used to show messages on html output).
|
* Print formated messages to output (Used to show messages on html output).
|
||||||
|
* Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function, so there is
|
||||||
|
* no need to call it explicitely.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @see dol_htmloutput_mesg
|
* @see dol_htmloutput_mesg
|
||||||
|
|||||||
@ -252,7 +252,7 @@ else {
|
|||||||
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
|
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
// Line extrafield
|
// Lines for extrafield
|
||||||
if (!empty($extrafieldsline)) {
|
if (!empty($extrafieldsline)) {
|
||||||
if ($this->table_element_line=='commandedet') {
|
if ($this->table_element_line=='commandedet') {
|
||||||
$newline = new OrderLine($this->db);
|
$newline = new OrderLine($this->db);
|
||||||
@ -267,7 +267,7 @@ else {
|
|||||||
print $newline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8));
|
print $newline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -275,6 +275,8 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
|||||||
{
|
{
|
||||||
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||||
else $colspan = 9;
|
else $colspan = 9;
|
||||||
|
if (! empty($inputalsopricewithtax)) $colspan++; // We add 1 if col total ttc
|
||||||
|
if (in_array($object->element,array('propal','facture','invoice','commande','order'))) $colspan++; // With this, there is a column move button
|
||||||
|
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
/*
|
|
||||||
* Copyright (C) 2014 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
|
||||||
@ -135,15 +133,15 @@ abstract class DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
abstract function run_trigger($action, $object, User $user, Translate $langs, Conf $conf);
|
abstract function runTrigger($action, $object, User $user, Translate $langs, Conf $conf);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -36,16 +36,16 @@ class InterfaceLogevents extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) return 0; // Log events is disabled (hidden features)
|
if (! empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) return 0; // Log events is disabled (hidden features)
|
||||||
|
|
||||||
|
|||||||
@ -35,16 +35,16 @@ class InterfacePaypalWorkflow extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
// Mettre ici le code a executer en reaction de l'action
|
// Mettre ici le code a executer en reaction de l'action
|
||||||
// Les donnees de l'action sont stockees dans $object
|
// Les donnees de l'action sont stockees dans $object
|
||||||
|
|||||||
@ -37,16 +37,16 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
if (empty($conf->workflow->enabled)) return 0; // Module not active, we do nothing
|
if (empty($conf->workflow->enabled)) return 0; // Module not active, we do nothing
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* Following properties must be filled:
|
* Following properties must be filled:
|
||||||
* $object->actiontypecode (translation action code: AC_OTH, ...)
|
* $object->actiontypecode (translation action code: AC_OTH, ...)
|
||||||
@ -55,9 +55,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
// Module not active, we do nothing
|
// Module not active, we do nothing
|
||||||
if (empty($conf->agenda->enabled)) {
|
if (empty($conf->agenda->enabled)) {
|
||||||
|
|||||||
@ -37,16 +37,16 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
if (empty($conf->ldap->enabled)) return 0; // Module not active, we do nothing
|
if (empty($conf->ldap->enabled)) return 0; // Module not active, we do nothing
|
||||||
|
|
||||||
|
|||||||
@ -37,16 +37,16 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
if (empty($conf->mailmanspip->enabled)) return 0; // Module not active, we do nothing
|
if (empty($conf->mailmanspip->enabled)) return 0; // Module not active, we do nothing
|
||||||
|
|
||||||
|
|||||||
@ -46,16 +46,16 @@ class InterfaceNotification extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
if (empty($conf->notification->enabled)) return 0; // Module not active, we do nothing
|
if (empty($conf->notification->enabled)) return 0; // Module not active, we do nothing
|
||||||
|
|
||||||
|
|||||||
@ -43,16 +43,16 @@ class InterfaceDemo extends DolibarrTriggers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called when a Dolibarrr business event is done.
|
* Function called when a Dolibarrr business event is done.
|
||||||
* All functions "run_trigger" are triggered if file is inside directory htdocs/core/triggers
|
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
|
||||||
*
|
*
|
||||||
* @param string $action Event action code
|
* @param string $action Event action code
|
||||||
* @param Object $object Object
|
* @param Object $object Object
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
* @param Translate $langs Object langs
|
* @param Translate $langs Object langs
|
||||||
* @param conf $conf Object conf
|
* @param conf $conf Object conf
|
||||||
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
* @return int <0 if KO, 0 if no triggered ran, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function run_trigger($action, $object, User $user, Translate $langs, Conf $conf)
|
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
|
||||||
{
|
{
|
||||||
// Put here code you want to execute when a Dolibarr business events occurs.
|
// Put here code you want to execute when a Dolibarr business events occurs.
|
||||||
// Data and type of action are stored into $object and $action
|
// Data and type of action are stored into $object and $action
|
||||||
|
|||||||
@ -1702,7 +1702,7 @@ elseif (! empty($object->id))
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ligne en mode update
|
// Edit line
|
||||||
if ($action == 'edit_line' && $user->rights->fournisseur->commande->creer && ($_GET["rowid"] == $line->id))
|
if ($action == 'edit_line' && $user->rights->fournisseur->commande->creer && ($_GET["rowid"] == $line->id))
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -1728,8 +1728,7 @@ elseif (! empty($object->id))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$forceall=1; // For suppliers, we always show all types
|
$forceall=1; // For suppliers, we always show all types
|
||||||
print $form->select_type_of_lines($line->product_type,'type',1,0,$forceall);
|
print $form->select_type_of_lines($line->product_type,'type',1,0,$forceall);
|
||||||
if (! empty($conf->product->enabled) && ! empty($conf->service->enabled)) print '<br>';
|
|
||||||
if ($forceall || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))
|
if ($forceall || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))
|
||||||
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '<br>';
|
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -151,11 +152,12 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param="";
|
$param="";
|
||||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||||
if ($search_nom) $param.="&search_nom=".$search_nom;
|
if ($search_nom) $param.="&search_nom=".$search_nom;
|
||||||
if ($search_user) $param.="&search_user=".$search_user;
|
if ($search_user) $param.="&search_user=".$search_user;
|
||||||
if ($search_ttc) $param.="&search_ttc=".$search_ttc;
|
if ($search_ttc) $param.="&search_ttc=".$search_ttc;
|
||||||
if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
|
if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
|
||||||
|
if ($socid) $param.="&socid=".$socid;
|
||||||
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||||
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.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
|
||||||
@ -155,9 +155,54 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Third party
|
// Third party
|
||||||
print "<tr><td>".$langs->trans("Supplier")."</td>";
|
print "<tr><td>".$langs->trans("Supplier")."</td>";
|
||||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'supplier').'</td></tr>';
|
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'supplier').'</td></tr>';
|
||||||
|
|
||||||
|
// Type
|
||||||
|
print '<tr><td>'.$langs->trans('Type').'</td><td colspan="4">';
|
||||||
|
print $object->getLibType();
|
||||||
|
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT)
|
||||||
|
{
|
||||||
|
$facreplaced=new FactureFournisseur($db);
|
||||||
|
$facreplaced->fetch($object->fk_facture_source);
|
||||||
|
print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')';
|
||||||
|
}
|
||||||
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||||
|
{
|
||||||
|
$facusing=new FactureFournisseur($db);
|
||||||
|
$facusing->fetch($object->fk_facture_source);
|
||||||
|
print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$facidavoir=$object->getListIdAvoirFromInvoice();
|
||||||
|
if (count($facidavoir) > 0)
|
||||||
|
{
|
||||||
|
print ' ('.$langs->transnoentities("InvoiceHasAvoir");
|
||||||
|
$i=0;
|
||||||
|
foreach($facidavoir as $fid)
|
||||||
|
{
|
||||||
|
if ($i==0) print ' ';
|
||||||
|
else print ',';
|
||||||
|
$facavoir=new FactureFournisseur($db);
|
||||||
|
$facavoir->fetch($fid);
|
||||||
|
print $facavoir->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print ')';
|
||||||
|
}
|
||||||
|
if ($facidnext > 0)
|
||||||
|
{
|
||||||
|
$facthatreplace=new FactureFournisseur($db);
|
||||||
|
$facthatreplace->fetch($facidnext);
|
||||||
|
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Label
|
||||||
|
print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">';
|
||||||
|
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '</div>';
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -168,8 +168,36 @@ if ($object->id > 0)
|
|||||||
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Status
|
||||||
|
$alreadypaid=$object->getSommePaiement();
|
||||||
|
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4,$alreadypaid).'</td></tr>';
|
||||||
|
|
||||||
|
// Amount
|
||||||
|
print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="3">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||||
|
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="3">'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
|
// Amount Local Taxes
|
||||||
|
//TODO: Place into a function to control showing by country or study better option
|
||||||
|
if ($societe->localtax1_assuj=="1") //Localtax1
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
|
||||||
|
print '<td align="right">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||||
|
print '<td colspan="2"> </td></tr>';
|
||||||
|
}
|
||||||
|
if ($societe->localtax2_assuj=="1") //Localtax2
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
|
||||||
|
print '<td align="right" colspan="3">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="3">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
|
print '</table><br>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Nb of files
|
// Nb of files
|
||||||
print '<tr><td>'.$langs->trans('NbOfAttachedFiles').'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
print '<tr><td width="30%" class="nowrap">'.$langs->trans('NbOfAttachedFiles').'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('TotalSizeOfAttachedFiles').'</td><td colspan="3">'.$totalsize.' '.$langs->trans('bytes').'</td></tr>';
|
print '<tr><td>'.$langs->trans('TotalSizeOfAttachedFiles').'</td><td colspan="3">'.$totalsize.' '.$langs->trans('bytes').'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -1634,7 +1634,7 @@ else
|
|||||||
*/
|
*/
|
||||||
$nbrows=9; $nbcols=2;
|
$nbrows=9; $nbcols=2;
|
||||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||||
if (! empty($conf->banque->enabled)) $nbcols++;
|
if (! empty($conf->banque->enabled)) { $nbrows++; $nbcols++; }
|
||||||
|
|
||||||
// Local taxes
|
// Local taxes
|
||||||
if ($societe->localtax1_assuj=="1") $nbrows++;
|
if ($societe->localtax1_assuj=="1") $nbrows++;
|
||||||
@ -1948,7 +1948,7 @@ else
|
|||||||
|
|
||||||
print '<input type="hidden" name="lineid" value="'.$object->lines[$i]->rowid.'">';
|
print '<input type="hidden" name="lineid" value="'.$object->lines[$i]->rowid.'">';
|
||||||
|
|
||||||
if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && $object->lines[$i]->fk_product)
|
if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && $object->lines[$i]->fk_product > 0)
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="idprod" value="'.$object->lines[$i]->fk_product.'">';
|
print '<input type="hidden" name="idprod" value="'.$object->lines[$i]->fk_product.'">';
|
||||||
$product_static=new ProductFournisseur($db);
|
$product_static=new ProductFournisseur($db);
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/fourn/facture/note.php
|
* \file htdocs/fourn/facture/note.php
|
||||||
* \ingroup facture
|
* \ingroup facture
|
||||||
* \brief Fiche de notes sur une facture fournisseur
|
* \brief Fiche de notes sur une facture fournisseur
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||||
@ -137,7 +137,7 @@ if ($object->id > 0)
|
|||||||
// Label
|
// Label
|
||||||
print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("Label",'label',$object->label,$object,0).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
||||||
print '</td>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@ -7,21 +7,21 @@ DIRECTION=لیتر
|
|||||||
FONTFORPDF=DejaVuSans
|
FONTFORPDF=DejaVuSans
|
||||||
FONTSIZEFORPDF=10
|
FONTSIZEFORPDF=10
|
||||||
SeparatorDecimal=.
|
SeparatorDecimal=.
|
||||||
SeparatorThousand=،
|
SeparatorThousand=None
|
||||||
FormatDateShort=٪ M /٪ د /٪ Y
|
FormatDateShort=%m/%d/%Y
|
||||||
FormatDateShortInput=٪ M /٪ د /٪ Y
|
FormatDateShortInput=%m/%d/%Y
|
||||||
FormatDateShortJava=MM / DD / YYYY
|
FormatDateShortJava=MM/dd/yyyy
|
||||||
FormatDateShortJavaInput=MM / DD / YYYY
|
FormatDateShortJavaInput=MM/dd/yyyy
|
||||||
FormatDateShortJQuery=ماه / روز / سا
|
FormatDateShortJQuery=yy/dd/mm
|
||||||
FormatDateShortJQueryInput=ماه / روز / سا
|
FormatDateShortJQueryInput=yy/dd/mm
|
||||||
FormatHourShort=٪ I:٪ M٪ P
|
FormatHourShort=%I:%M
|
||||||
FormatHourShortDuration=٪ H:٪ M
|
FormatHourShortDuration=%H:%M
|
||||||
FormatDateTextShort=٪ B٪ د،٪ Y
|
FormatDateTextShort=%b %d %Y
|
||||||
FormatDateText=٪ B٪ د،٪ Y
|
FormatDateText=%B %d %Y
|
||||||
FormatDateHourShort=٪ M /٪ د /٪ Y٪ I:٪ M٪ P
|
FormatDateHourShort=%m/%d/%Y %I:%M:%S %p
|
||||||
FormatDateHourSecShort=٪ M /٪ د /٪ Y٪ I:٪ M:٪ S٪ P
|
FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p
|
||||||
FormatDateHourTextShort=٪ B٪ د،٪ Y،٪ I:٪ M٪ P
|
FormatDateHourTextShort=%b %d %Y %I:%M %p
|
||||||
FormatDateHourText=٪ B٪ د،٪ Y،٪ I:٪ M٪ P
|
FormatDateHourText=%B %d %Y %H:%M %p
|
||||||
DatabaseConnection=اتصال به پایگاه داده
|
DatabaseConnection=اتصال به پایگاه داده
|
||||||
NoTranslation=بدون ترجمه
|
NoTranslation=بدون ترجمه
|
||||||
NoRecordFound=هیچ سابقه ای پیدا نشد
|
NoRecordFound=هیچ سابقه ای پیدا نشد
|
||||||
|
|||||||
@ -959,5 +959,3 @@ class LivraisonLigne
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class MailmanSpip
|
|||||||
/**
|
/**
|
||||||
* Function used to connect to Mailman
|
* Function used to connect to Mailman
|
||||||
*
|
*
|
||||||
* @param object $object Object with the data
|
* @param Adherent $object Object with the data
|
||||||
* @param string $url Mailman URL to be called with patterns
|
* @param string $url Mailman URL to be called with patterns
|
||||||
* @param string $list Name of mailing-list
|
* @param string $list Name of mailing-list
|
||||||
* @return mixed Boolean or string
|
* @return mixed Boolean or string
|
||||||
|
|||||||
@ -249,5 +249,3 @@ function ajouter_sondage()
|
|||||||
header("Location: ".$urlback);
|
header("Location: ".$urlback);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -1078,4 +1078,3 @@ print '<a name="bas"></a>'."\n";
|
|||||||
llxFooterSurvey();
|
llxFooterSurvey();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -212,4 +212,3 @@ dol_fiche_end();
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -110,5 +110,3 @@ else
|
|||||||
{
|
{
|
||||||
echo json_encode(array('nom'=>'ErrorBadParameter','label'=>'ErrorBadParameter','key'=>'ErrorBadParameter','value'=>'ErrorBadParameter'));
|
echo json_encode(array('nom'=>'ErrorBadParameter','label'=>'ErrorBadParameter','key'=>'ErrorBadParameter','value'=>'ErrorBadParameter'));
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@ -705,5 +705,3 @@ abstract class ActionsCardCommon
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -58,6 +58,7 @@ class Societe extends CommonObject
|
|||||||
* @deprecated Use $name instead
|
* @deprecated Use $name instead
|
||||||
*/
|
*/
|
||||||
var $nom;
|
var $nom;
|
||||||
|
|
||||||
var $firstname;
|
var $firstname;
|
||||||
var $lastname;
|
var $lastname;
|
||||||
var $particulier;
|
var $particulier;
|
||||||
@ -65,6 +66,7 @@ class Societe extends CommonObject
|
|||||||
var $address;
|
var $address;
|
||||||
var $zip;
|
var $zip;
|
||||||
var $town;
|
var $town;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=activity ceased, 1= in activity
|
* 0=activity ceased, 1= in activity
|
||||||
* @var int
|
* @var int
|
||||||
|
|||||||
@ -338,4 +338,3 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@ -265,4 +265,3 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@ -183,4 +183,3 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@ -233,4 +233,3 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -257,4 +257,3 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@ -265,4 +265,3 @@ class ExportTest extends PHPUnit_Framework_TestCase
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -196,4 +196,3 @@ class FactureRecTest extends PHPUnit_Framework_TestCase
|
|||||||
return $retAr;
|
return $retAr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@ -329,4 +329,3 @@ class FactureTest extends PHPUnit_Framework_TestCase
|
|||||||
return $retAr;
|
return $retAr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -154,23 +154,41 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals(0,$result);
|
$this->assertEquals(0,$result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is_ip
|
* isIP
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testIsIp() {
|
public function testIsIP()
|
||||||
|
{
|
||||||
|
$ip='a299.299.299.299';
|
||||||
|
$result=is_ip($ip);
|
||||||
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
|
$this->assertEquals(0,$result,$ip);
|
||||||
|
|
||||||
//Test not valid IP
|
$ip='1.2.3.4';
|
||||||
$result = is_ip('192.168.1.267');
|
$result=is_ip($ip);
|
||||||
$this->assertEquals(0, $result);
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
|
$this->assertEquals(1,$result,$ip);
|
||||||
|
|
||||||
//Test private range IP
|
$ip='10.0.0.0';
|
||||||
$result = is_ip('192.168.1.1');
|
$result=is_ip($ip);
|
||||||
$this->assertEquals(2, $result);
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
|
$this->assertEquals(2,$result,$ip);
|
||||||
|
|
||||||
//Test public range IP
|
$ip='172.16.0.0';
|
||||||
$result = is_ip('91.121.33.228');
|
$result=is_ip($ip);
|
||||||
$this->assertEquals(1, $result);
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
}
|
$this->assertEquals(2,$result,$ip);
|
||||||
|
|
||||||
|
$ip='192.168.0.0';
|
||||||
|
$result=is_ip($ip);
|
||||||
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
|
$this->assertEquals(2,$result,$ip);
|
||||||
|
|
||||||
|
$ip='169.254.0.0';
|
||||||
|
$result=is_ip($ip);
|
||||||
|
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||||
|
$this->assertEquals(2,$result,$ip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -784,4 +784,3 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -146,7 +146,7 @@ class LangTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
if (! preg_match('/^[a-z]+_[A-Z]+$/',$code)) continue;
|
if (! preg_match('/^[a-z]+_[A-Z]+$/',$code)) continue;
|
||||||
|
|
||||||
print 'Check language file for code='.$code."\n";
|
print 'Check language file for lang code='.$code."\n";
|
||||||
$tmplangs=new Translate('',$conf);
|
$tmplangs=new Translate('',$conf);
|
||||||
$langcode=$code;
|
$langcode=$code;
|
||||||
$tmplangs->setDefaultLang($langcode);
|
$tmplangs->setDefaultLang($langcode);
|
||||||
@ -154,19 +154,19 @@ class LangTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$result=$tmplangs->trans("SeparatorDecimal");
|
$result=$tmplangs->trans("SeparatorDecimal");
|
||||||
print __METHOD__." SeparatorDecimal=".$result."\n";
|
print __METHOD__." SeparatorDecimal=".$result."\n";
|
||||||
$this->assertContains($result,array('.',',','/',' ','','None'), 'Error for code '.$code);
|
$this->assertContains($result,array('.',',','/',' ','','None'), 'Error for decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
|
||||||
|
|
||||||
$result=$tmplangs->trans("SeparatorThousand");
|
$result=$tmplangs->trans("SeparatorThousand");
|
||||||
print __METHOD__." SeparatorThousand=".$result."\n";
|
print __METHOD__." SeparatorThousand=".$result."\n";
|
||||||
$this->assertContains($result, array('.',',','/',' ','','None','Space'), 'Error for code '.$code);
|
$this->assertContains($result, array('.',',','/',' ','','None','Space'), 'Error for thousand separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported
|
||||||
|
|
||||||
// Test java string contains only d,M,y,/,-,. and not m,...
|
// Test java string contains only d,M,y,/,-,. and not m,...
|
||||||
$result=$tmplangs->trans("FormatDateShortJava");
|
$result=$tmplangs->trans("FormatDateShortJava");
|
||||||
print __METHOD__." FormatDateShortJava=".$result."\n";
|
print __METHOD__." FormatDateShortJava=".$result."\n";
|
||||||
$this->assertRegExp('/^[dMy\/\-\.]+$/',$result);
|
$this->assertRegExp('/^[dMy\/\-\.]+$/',$result,'FormatDateShortJava');
|
||||||
$result=$tmplangs->trans("FormatDateShortJavaInput");
|
$result=$tmplangs->trans("FormatDateShortJavaInput");
|
||||||
print __METHOD__." FormatDateShortJavaInput=".$result."\n";
|
print __METHOD__." FormatDateShortJavaInput=".$result."\n";
|
||||||
$this->assertRegExp('/^[dMy\/\-\.]+$/',$result);
|
$this->assertRegExp('/^[dMy\/\-\.]+$/',$result,'FormatDateShortJavaInput');
|
||||||
|
|
||||||
unset($tmplangs);
|
unset($tmplangs);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -265,4 +265,3 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -456,4 +456,3 @@ class SocieteTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -318,4 +318,3 @@ class UserTest extends PHPUnit_Framework_TestCase
|
|||||||
return $retAr;
|
return $retAr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
@ -181,4 +181,3 @@ class WebservicesInvoicesTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -181,4 +181,3 @@ class WebservicesThirdpartyTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user