Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
c2eba28f36
29
build/exakat/README.md
Normal file
29
build/exakat/README.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
== Install exakat ==
|
||||||
|
mkdir exakat
|
||||||
|
cd exakat
|
||||||
|
curl -o exakat.phar http://dist.exakat.io/index.php?file=latest
|
||||||
|
curl -o apache-tinkerpop-gremlin-server-3.3.5-bin.zip http://dist.exakat.io/apache-tinkerpop-gremlin-server-3.3.5-bin.zip
|
||||||
|
unzip apache-tinkerpop-gremlin-server-3.3.5-bin.zip
|
||||||
|
mv apache-tinkerpop-gremlin-server-3.3.5 tinkergraph
|
||||||
|
rm -rf apache-tinkerpop-gremlin-server-3.3.5-bin.zip
|
||||||
|
cd tinkergraph ./bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin 3.3.5
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
php exakat.phar version
|
||||||
|
php exakat.phar doctor
|
||||||
|
|
||||||
|
== Init project ==
|
||||||
|
php
|
||||||
|
|
||||||
|
|
||||||
|
Edit config.ini file to exclude some dirs:
|
||||||
|
ignore_dirs[] = "/htdocs/includes";
|
||||||
|
ignore_dirs[] = "/scripts";
|
||||||
|
ignore_dirs[] = "/build";
|
||||||
|
ignore_dirs[] = "/dev";
|
||||||
|
ignore_dirs[] = "/documents";
|
||||||
|
|
||||||
|
|
||||||
|
== Analyze project ==
|
||||||
|
php
|
||||||
@ -380,7 +380,7 @@ if (! empty($user->rights->produit->lire) || ! empty($user->rights->service->lir
|
|||||||
print '<input id="fillfromproduct" type="radio" '.((GETPOST("selectorforbarcode")=='fillfromproduct')?'checked ':'').'name="selectorforbarcode" value="fillfromproduct" class="radiobarcodeselect"> '.$langs->trans("FillBarCodeTypeAndValueFromProduct").' ';
|
print '<input id="fillfromproduct" type="radio" '.((GETPOST("selectorforbarcode")=='fillfromproduct')?'checked ':'').'name="selectorforbarcode" value="fillfromproduct" class="radiobarcodeselect"> '.$langs->trans("FillBarCodeTypeAndValueFromProduct").' ';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<div class="showforproductselector">';
|
print '<div class="showforproductselector">';
|
||||||
$form->select_produits(GETPOST('productid'), 'productid', '');
|
$form->select_produits(GETPOST('productid'), 'productid', '', '', 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth400imp', 1);
|
||||||
print ' <input type="submit" id="submitproduct" name="submitproduct" class="button" value="'.(dol_escape_htmltag($langs->trans("GetBarCode"))).'">';
|
print ' <input type="submit" id="submitproduct" name="submitproduct" class="button" value="'.(dol_escape_htmltag($langs->trans("GetBarCode"))).'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -265,6 +265,246 @@ class Categories extends DolibarrApi
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link an object to a category by id
|
||||||
|
*
|
||||||
|
* @param int $id ID of category
|
||||||
|
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||||
|
* @param int $object_id ID of object
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws RestException
|
||||||
|
*
|
||||||
|
* @url POST {id}/objects/{type}/{object_id}
|
||||||
|
*/
|
||||||
|
public function linkObjectById($id, $type, $object_id)
|
||||||
|
{
|
||||||
|
if (empty($type) || empty($object_id)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! DolibarrApiAccess::$user->rights->categorie->lire) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->category->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'category not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO Add all types
|
||||||
|
if ($type === "product") {
|
||||||
|
if(! (DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
$object = new Product($this->db);
|
||||||
|
} else {
|
||||||
|
throw new RestException(401, "this type is not recognized yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($object)) {
|
||||||
|
$result = $object->fetch($object_id);
|
||||||
|
if ($result > 0) {
|
||||||
|
$result=$this->category->add_type($object, $type);
|
||||||
|
if ($result < 0) {
|
||||||
|
if ($this->category->error != 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||||
|
throw new RestException(500, 'Error when linking object', array_merge(array($this->category->error), $this->category->errors));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'success' => array(
|
||||||
|
'code' => 200,
|
||||||
|
'message' => 'Objects succefully linked to the category'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link an object to a category by ref
|
||||||
|
*
|
||||||
|
* @param int $id ID of category
|
||||||
|
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||||
|
* @param string $object_ref Reference of object
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws RestException
|
||||||
|
*
|
||||||
|
* @url POST {id}/objects/{type}/ref/{object_ref}
|
||||||
|
*/
|
||||||
|
public function linkObjectByRef($id, $type, $object_ref)
|
||||||
|
{
|
||||||
|
if (empty($type) || empty($object_ref)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! DolibarrApiAccess::$user->rights->categorie->lire) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->category->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'category not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO Add all types
|
||||||
|
if ($type === "product") {
|
||||||
|
if(! (DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
$object = new Product($this->db);
|
||||||
|
} else {
|
||||||
|
throw new RestException(401, "this type is not recognized yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($object)) {
|
||||||
|
$result = $object->fetch('', $object_ref);
|
||||||
|
if ($result > 0) {
|
||||||
|
$result=$this->category->add_type($object, $type);
|
||||||
|
if ($result < 0) {
|
||||||
|
if ($this->category->error != 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||||
|
throw new RestException(500, 'Error when linking object', array_merge(array($this->category->error), $this->category->errors));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'success' => array(
|
||||||
|
'code' => 200,
|
||||||
|
'message' => 'Objects succefully linked to the category'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unlink an object from a category by id
|
||||||
|
*
|
||||||
|
* @param int $id ID of category
|
||||||
|
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||||
|
* @param int $object_id ID of the object
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws RestException
|
||||||
|
*
|
||||||
|
* @url DELETE {id}/objects/{type}/{object_id}
|
||||||
|
*/
|
||||||
|
public function unlinkObjectById($id, $type, $object_id)
|
||||||
|
{
|
||||||
|
if (empty($type) || empty($object_id)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! DolibarrApiAccess::$user->rights->categorie->lire) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->category->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'category not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO Add all types
|
||||||
|
if ($type === "product") {
|
||||||
|
if(! (DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
$object = new Product($this->db);
|
||||||
|
} else {
|
||||||
|
throw new RestException(401, "this type is not recognized yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($object)) {
|
||||||
|
$result = $object->fetch((int) $object_id);
|
||||||
|
if ($result > 0) {
|
||||||
|
$result=$this->category->del_type($object, $type);
|
||||||
|
if ($result < 0) {
|
||||||
|
throw new RestException(500, 'Error when unlinking object', array_merge(array($this->category->error), $this->category->errors));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'success' => array(
|
||||||
|
'code' => 200,
|
||||||
|
'message' => 'Objects succefully unlinked from the category'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unlink an object from a category by ref
|
||||||
|
*
|
||||||
|
* @param int $id ID of category
|
||||||
|
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||||
|
* @param string $object_ref Reference of the object
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws RestException
|
||||||
|
*
|
||||||
|
* @url DELETE {id}/objects/{type}/ref/{object_ref}
|
||||||
|
*/
|
||||||
|
public function unlinkObjectByRef($id, $type, $object_ref)
|
||||||
|
{
|
||||||
|
if (empty($type) || empty($object_ref)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! DolibarrApiAccess::$user->rights->categorie->lire) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->category->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'category not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO Add all types
|
||||||
|
if ($type === "product") {
|
||||||
|
if(! (DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
$object = new Product($this->db);
|
||||||
|
} else {
|
||||||
|
throw new RestException(401, "this type is not recognized yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($object)) {
|
||||||
|
$result = $object->fetch('', (string) $object_ref);
|
||||||
|
if ($result > 0) {
|
||||||
|
$result=$this->category->del_type($object, $type);
|
||||||
|
if ($result < 0) {
|
||||||
|
throw new RestException(500, 'Error when unlinking object', array_merge(array($this->category->error), $this->category->errors));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'success' => array(
|
||||||
|
'code' => 200,
|
||||||
|
'message' => 'Objects succefully unlinked from the category'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -678,19 +678,12 @@ else
|
|||||||
print_liste_field_titre("LineRecord", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("LineRecord", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i = 1;
|
|
||||||
|
|
||||||
|
$i = 1;
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
while ($objp = $db->fetch_object($resql))
|
while ($objp = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
//$account_id = $objp->bid; FIXME not used
|
|
||||||
|
|
||||||
// FIXME $accounts[$objp->bid] is a label
|
|
||||||
/*if (! isset($accounts[$objp->bid]))
|
|
||||||
$accounts[$objp->bid]=0;
|
|
||||||
$accounts[$objp->bid] += 1;*/
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td align="center">'.$i.'</td>';
|
print '<td align="center">'.$i.'</td>';
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>'; // Date operation
|
print '<td align="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>'; // Date operation
|
||||||
@ -751,6 +744,15 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
// Cheque denormalized data nbcheque is similar to real number of cheque
|
||||||
|
if ($num > 0 && $i < ($object->nbcheque + 1)) {
|
||||||
|
// Show warning that some records were removed.
|
||||||
|
$langs->load("errors");
|
||||||
|
print info_admin($langs->trans("WarningSomeBankTransactionByChequeWereRemovedAfter"), 0, 0, 'warning');
|
||||||
|
// TODO Fix data ->nbcheque and ->amount
|
||||||
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -177,7 +177,7 @@ if ($id > 0 || $ref)
|
|||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
||||||
@ -214,7 +214,7 @@ if ($id > 0 || $ref)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
$acc = new Account($db);
|
$acc = new Account($db);
|
||||||
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||||
|
|||||||
@ -74,6 +74,10 @@ class BonPrelevement extends CommonObject
|
|||||||
public $invoice_in_error=array();
|
public $invoice_in_error=array();
|
||||||
public $thirdparty_in_error=array();
|
public $thirdparty_in_error=array();
|
||||||
|
|
||||||
|
const STATUS_DRAFT = 0;
|
||||||
|
const STATUS_TRANSFERED = 1;
|
||||||
|
const STATUS_CREDITED = 2;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -2002,48 +2006,22 @@ class BonPrelevement extends CommonObject
|
|||||||
public function LibStatut($status, $mode = 0)
|
public function LibStatut($status, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
if (empty($this->labelStatus))
|
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("withdrawals");
|
//$langs->load("mymodule");
|
||||||
$this->labelStatus[0]=$langs->trans("StatusWaiting");
|
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('StatusWaiting');
|
||||||
$this->labelStatus[1]=$langs->trans("StatusTrans");
|
$this->labelStatus[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans');
|
||||||
$this->labelStatus[2]=$langs->trans("StatusCredited");
|
$this->labelStatus[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||||
|
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('StatusWaiting');
|
||||||
|
$this->labelStatusShort[self::STATUS_TRANSFERED] = $langs->trans('StatusTrans');
|
||||||
|
$this->labelStatusShort[self::STATUS_CREDITED] = $langs->trans('StatusCredited');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 0 || $mode == 1)
|
$statusType = 'status1';
|
||||||
{
|
if ($status == self::STATUS_TRANSFERED) $statusType = 'status3';
|
||||||
return $this->labelStatus[$status];
|
if ($status == self::STATUS_CREDITED) $statusType = 'status6';
|
||||||
}
|
|
||||||
elseif ($mode == 2)
|
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||||
{
|
|
||||||
if ($status==0) return img_picto($this->labelStatus[$status], 'statut1').' '.$this->labelStatus[$status];
|
|
||||||
elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3').' '.$this->labelStatus[$status];
|
|
||||||
elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6').' '.$this->labelStatus[$status];
|
|
||||||
}
|
|
||||||
elseif ($mode == 3)
|
|
||||||
{
|
|
||||||
if ($status==0) return img_picto($this->labelStatus[$status], 'statut1');
|
|
||||||
elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3');
|
|
||||||
elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6');
|
|
||||||
}
|
|
||||||
elseif ($mode == 4)
|
|
||||||
{
|
|
||||||
if ($status==0) return img_picto($this->labelStatus[$status], 'statut1').' '.$this->labelStatus[$status];
|
|
||||||
elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3').' '.$this->labelStatus[$status];
|
|
||||||
elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6').' '.$this->labelStatus[$status];
|
|
||||||
}
|
|
||||||
elseif ($mode == 5)
|
|
||||||
{
|
|
||||||
if ($status==0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut1');
|
|
||||||
elseif ($status==1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut3');
|
|
||||||
elseif ($status==2) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut6');
|
|
||||||
}
|
|
||||||
elseif ($mode == 6)
|
|
||||||
{
|
|
||||||
if ($status==0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut1');
|
|
||||||
elseif ($status==1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut3');
|
|
||||||
elseif ($status==2) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut6');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if ($prev_id > 0 || $ref)
|
|||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
||||||
@ -111,7 +111,7 @@ if ($prev_id > 0 || $ref)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
$acc = new Account($db);
|
$acc = new Account($db);
|
||||||
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||||
|
|||||||
@ -75,7 +75,7 @@ if ($prev_id > 0 || $ref)
|
|||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">'."\n";
|
print '<table class="border centpercent tableforfield">'."\n";
|
||||||
|
|
||||||
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
||||||
@ -112,7 +112,7 @@ if ($prev_id > 0 || $ref)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
$acc = new Account($db);
|
$acc = new Account($db);
|
||||||
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||||
|
|||||||
@ -72,7 +72,7 @@ if ($prev_id > 0 || $ref)
|
|||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">'."\n";
|
print '<table class="border centpercent tableforfield">'."\n";
|
||||||
|
|
||||||
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
//print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$object->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'.dol_print_date($object->datec, 'day').'</td></tr>';
|
||||||
@ -109,7 +109,7 @@ if ($prev_id > 0 || $ref)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
$acc = new Account($db);
|
$acc = new Account($db);
|
||||||
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
|
||||||
|
|||||||
@ -228,9 +228,10 @@ class FormWebsite
|
|||||||
* @param int $pageid Preselected container ID
|
* @param int $pageid Preselected container ID
|
||||||
* @param int $showempty Show empty record
|
* @param int $showempty Show empty record
|
||||||
* @param string $action Action on page that use this select list
|
* @param string $action Action on page that use this select list
|
||||||
|
* @param string $morecss More CSS
|
||||||
* @return string HTML select component with list of type of containers
|
* @return string HTML select component with list of type of containers
|
||||||
*/
|
*/
|
||||||
public function selectContainer($website, $htmlname = 'pageid', $pageid = 0, $showempty = 0, $action = '')
|
public function selectContainer($website, $htmlname = 'pageid', $pageid = 0, $showempty = 0, $action = '', $morecss = 'minwidth200')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -239,11 +240,11 @@ class FormWebsite
|
|||||||
$out='';
|
$out='';
|
||||||
if ($atleastonepage && $action != 'editsource')
|
if ($atleastonepage && $action != 'editsource')
|
||||||
{
|
{
|
||||||
$out.='<select name="'.$htmlname.'" id="'.$htmlname.'" class="minwidth200 maxwidth300">';
|
$out.='<select name="'.$htmlname.'" id="'.$htmlname.'" class="maxwidth300'.($morecss ? ' '.$morecss : '').'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out.='<select name="pageidbis" id="pageid" class="minwidth200 maxwidth300" disabled="disabled">';
|
$out.='<select name="pageidbis" id="pageid" class="maxwidth300'.($morecss ? ' '.$morecss : '').'" disabled="disabled">';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showempty || ! $atleastonepage) $out.='<option value="-1"> </option>';
|
if ($showempty || ! $atleastonepage) $out.='<option value="-1"> </option>';
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -182,8 +183,8 @@ function showDirectPublicLink($object)
|
|||||||
/**
|
/**
|
||||||
* Generate a random id
|
* Generate a random id
|
||||||
*
|
*
|
||||||
* @param string $car Char to generate key
|
* @param int $car Length of string to generate key
|
||||||
* @return void
|
* @return string
|
||||||
*/
|
*/
|
||||||
function generate_random_id($car = 16)
|
function generate_random_id($car = 16)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -420,6 +420,22 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Set variables of theme
|
||||||
|
$colorbackhmenu1 = '';
|
||||||
|
$colorbackvmenu1 = '';
|
||||||
|
$colortexttitlenotab = '';
|
||||||
|
$colorbacktitle1 = '';
|
||||||
|
$colortexttitle = '';
|
||||||
|
$colorbacklineimpair1 = '';
|
||||||
|
$colorbacklinepair1 = '';
|
||||||
|
$colortextlink = '';
|
||||||
|
$colorbacklinepairhover = '';
|
||||||
|
$colorbacklinepairhover = '';
|
||||||
|
$colorbacklinepairchecked = '';
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
|
||||||
|
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
}
|
||||||
|
|
||||||
// Show logo
|
// Show logo
|
||||||
if ($foruserprofile)
|
if ($foruserprofile)
|
||||||
{
|
{
|
||||||
@ -563,8 +579,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$default='5a6482';
|
$default=(empty($colorbackhmenu1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbackhmenu1)));
|
||||||
if ($conf->theme == 'md') $default='5a3278';
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||||
@ -612,8 +627,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$default='f0f0f0';
|
$default=(empty($colorbackvmenu1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbackvmenu1)));
|
||||||
if ($conf->theme == 'md') $default='ffffff';
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("LeftMenuBackgroundColor").'</td>';
|
print '<td>'.$langs->trans("LeftMenuBackgroundColor").'</td>';
|
||||||
@ -641,6 +655,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$default=(empty($colortexttitlenotab) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlenotab)));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("TextTitleColor").'</td>';
|
print '<td>'.$langs->trans("TextTitleColor").'</td>';
|
||||||
print '<td colspan="'.($colspan-1).'">';
|
print '<td colspan="'.($colspan-1).'">';
|
||||||
@ -652,7 +668,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
{
|
{
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong><span style="color: #643c14">643c14</span></strong>) ';
|
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong><span style="color: #'.$default.'">'.$default.'</span></strong>) ';
|
||||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -666,6 +682,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$default=(empty($colorbacktitle1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacktitle1)));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
|
||||||
print '<td colspan="'.($colspan-1).'">';
|
print '<td colspan="'.($colspan-1).'">';
|
||||||
@ -677,7 +695,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
{
|
{
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong>f0f0f0</strong>) '; // $colorbacktitle1 in CSS
|
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong>'.$default.'</strong>) '; // $colorbacktitle1 in CSS
|
||||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -691,6 +709,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$default=(empty($colortexttitle) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitle)));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("BackgroundTableTitleTextColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableTitleTextColor").'</td>';
|
||||||
print '<td colspan="'.($colspan-1).'">';
|
print '<td colspan="'.($colspan-1).'">';
|
||||||
@ -702,7 +722,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
{
|
{
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong><span style="color: #000000">000000</span></strong>) ';
|
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong><span style="color: #'.$default.'">'.$default.'</span></strong>) ';
|
||||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -716,8 +736,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$default='ffffff';
|
$default=(empty($colorbacklineimpair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklineimpair1)));
|
||||||
if ($conf->theme == 'md') $default='ffffff';
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("BackgroundTableLineOddColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableLineOddColor").'</td>';
|
||||||
@ -745,8 +764,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$default='f8f8f8';
|
$default=(empty($colorbacklinepair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepair1)));
|
||||||
if ($conf->theme == 'md') $default='f8f8f8';
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("BackgroundTableLineEvenColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableLineEvenColor").'</td>';
|
||||||
@ -794,6 +812,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$default=(empty($colortextlink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortextlink)));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("LinkColor").'</td>';
|
print '<td>'.$langs->trans("LinkColor").'</td>';
|
||||||
print '<td colspan="'.($colspan-1).'">';
|
print '<td colspan="'.($colspan-1).'">';
|
||||||
@ -812,7 +832,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print $langs->trans("Default");
|
print $langs->trans("Default");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong><span style="color: #000078">000078</span></strong>) ';
|
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong><span style="color: #'.$default.'">'.$default.'</span></strong>) ';
|
||||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -834,6 +854,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$default=(empty($colorbacklinepairhover) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairhover)));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("HighlightLinesColor").'</td>';
|
print '<td>'.$langs->trans("HighlightLinesColor").'</td>';
|
||||||
print '<td colspan="'.($colspan-1).'">';
|
print '<td colspan="'.($colspan-1).'">';
|
||||||
@ -841,22 +863,22 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||||
if ($edit)
|
if ($edit)
|
||||||
{
|
{
|
||||||
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='e6edf0';
|
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color=colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
||||||
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
|
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
|
||||||
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', 'formcolor', 1).' ';
|
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', 'formcolor', 1).' ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='e6edf0';
|
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color=colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
||||||
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
|
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
|
||||||
if ($color)
|
if ($color)
|
||||||
{
|
{
|
||||||
if ($color != 'e6edf0') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
else print $langs->trans("Default");
|
else print $langs->trans("Default");
|
||||||
}
|
}
|
||||||
else print $langs->trans("Default");
|
else print $langs->trans("Default");
|
||||||
}
|
}
|
||||||
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong>e6edf0</strong>) ';
|
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong>'.$default.'</strong>) ';
|
||||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -878,6 +900,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$default=(empty($colorbacklinepairchecked) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairchecked)));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("HighlightLinesChecked").'</td>';
|
print '<td>'.$langs->trans("HighlightLinesChecked").'</td>';
|
||||||
print '<td colspan="'.($colspan-1).'">';
|
print '<td colspan="'.($colspan-1).'">';
|
||||||
@ -900,7 +924,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
}
|
}
|
||||||
else print $langs->trans("Default");
|
else print $langs->trans("Default");
|
||||||
}
|
}
|
||||||
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong>e6edf0</strong>) ';
|
print ' <span class="nowraponall">('.$langs->trans("Default").': <strong>'.$default.'</strong>) ';
|
||||||
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis"));
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -127,7 +127,16 @@ if ($permission) {
|
|||||||
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
||||||
<?php $nbofcontacts=$form->select_contacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); ?>
|
<?php
|
||||||
|
$nbofcontacts=$form->select_contacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp');
|
||||||
|
|
||||||
|
$newcardbutton = '';
|
||||||
|
if (! empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer)
|
||||||
|
{
|
||||||
|
$newcardbutton .= '<a href="'.DOL_URL_ROOT.'/contact/card.php?socid='.$object->socid.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'" title="'.$langs->trans('NewContact').'"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||||
|
}
|
||||||
|
print $newcardbutton;
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
<div class="tagtd maxwidthonsmartphone noborderbottom">
|
||||||
<?php
|
<?php
|
||||||
@ -156,8 +165,6 @@ if ($permission) {
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$var = false;
|
|
||||||
|
|
||||||
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
|
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
|
||||||
foreach($arrayofsource as $source) {
|
foreach($arrayofsource as $source) {
|
||||||
$tmpobject=$object;
|
$tmpobject=$object;
|
||||||
@ -168,10 +175,9 @@ foreach($arrayofsource as $source) {
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$var = ! $var;
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form class="tagtr oddeven <?php echo ($var?'impair':'pair') ?>">
|
<form class="tagtr oddeven">
|
||||||
<div class="tagtd left">
|
<div class="tagtd left">
|
||||||
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
|
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
|
||||||
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
|
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
|
||||||
|
|||||||
@ -25,10 +25,10 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
|
|||||||
|
|
||||||
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
||||||
$tmpkey=preg_replace('/'.$search_options_pattern.'/', '', $key);
|
$tmpkey=preg_replace('/'.$search_options_pattern.'/', '', $key);
|
||||||
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')) && empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]))
|
if (in_array($typeofextrafield, array('varchar', 'int', 'double')) && empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]))
|
||||||
{
|
{
|
||||||
$searchclass='';
|
$searchclass='';
|
||||||
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
|
if (in_array($typeofextrafield, array('varchar'))) $searchclass='searchstring';
|
||||||
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
|
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
|
||||||
print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="'.$search_options_pattern.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options[$search_options_pattern.$tmpkey]).'">';
|
print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="'.$search_options_pattern.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options[$search_options_pattern.$tmpkey]).'">';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
|
* \file htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
|
||||||
* \ingroup agenda
|
* \ingroup agenda
|
||||||
* \brief Trigger file for agenda module
|
* \brief Trigger file for company - contactroles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
|
||||||
@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
|
|||||||
class InterfaceContactRoles extends DolibarrTriggers
|
class InterfaceContactRoles extends DolibarrTriggers
|
||||||
{
|
{
|
||||||
public $family = 'agenda';
|
public $family = 'agenda';
|
||||||
public $description = "Triggers of this module add actions in agenda according to setup made in agenda setup.";
|
public $description = "Triggers of this module auto link contact to company.";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Version of the trigger
|
* Version of the trigger
|
||||||
@ -73,7 +73,6 @@ class InterfaceContactRoles extends DolibarrTriggers
|
|||||||
$socid=(property_exists($object, 'socid')?$object->socid:$object->fk_soc);
|
$socid=(property_exists($object, 'socid')?$object->socid:$object->fk_soc);
|
||||||
|
|
||||||
if (! empty($socid) && $socid > 0) {
|
if (! empty($socid) && $socid > 0) {
|
||||||
global $db, $langs;
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
$contactdefault = new Contact($this->db);
|
$contactdefault = new Contact($this->db);
|
||||||
$contactdefault->socid=$socid;
|
$contactdefault->socid=$socid;
|
||||||
@ -83,7 +82,7 @@ class InterfaceContactRoles extends DolibarrTriggers
|
|||||||
if ($object->id > 0)
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
$class = get_class($object);
|
$class = get_class($object);
|
||||||
$cloneFrom = new $class($db);
|
$cloneFrom = new $class($this->db);
|
||||||
$r = $cloneFrom->fetch($object->id);
|
$r = $cloneFrom->fetch($object->id);
|
||||||
|
|
||||||
if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal'));
|
if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal'));
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -125,7 +125,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
|||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_PRODUCED','MO disabled','Executed when a MO is produced','bom',661);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663);
|
||||||
-- actions not enabled by default : they are excluded when we enable the module Agenda (except TASK_...)
|
-- actions not enabled by default : they are excluded when we enable the module Agenda (except TASK_...)
|
||||||
|
|||||||
@ -493,7 +493,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
|||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654);
|
||||||
|
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_PRODUCED','MO disabled','Executed when a MO is produced','bom',661);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663);
|
||||||
|
|
||||||
|
|||||||
@ -5030,7 +5030,7 @@ function migrate_users_socialnetworks()
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
print '<b>'.$langs->trans('MigrationUsersSocialNetworks')."</b><br>\n";
|
print '<b>'.$langs->trans('MigrationFieldsSocialNetworks', 'Users')."</b><br>\n";
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5121,7 +5121,7 @@ function migrate_members_socialnetworks()
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
print '<b>'.$langs->trans('MigrationMembersSocialNetworks')."</b><br>\n";
|
print '<b>'.$langs->trans('MigrationFieldsSocialNetworks', 'Members')."</b><br>\n";
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5216,7 +5216,7 @@ function migrate_contacts_socialnetworks()
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
print '<b>'.$langs->trans('MigrationContactsSocialNetworks')."</b><br>\n";
|
print '<b>'.$langs->trans('MigrationFieldsSocialNetworks', 'Contacts')."</b><br>\n";
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5306,6 +5306,6 @@ function migrate_thirdparties_socialnetworks()
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
print '<b>'.$langs->trans('MigrationThirdpartiesSocialNetworks')."</b><br>\n";
|
print '<b>'.$langs->trans('MigrationFieldsSocialNetworks', 'Thirdparties')."</b><br>\n";
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -248,3 +248,4 @@ WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translatio
|
|||||||
WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists
|
WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists
|
||||||
WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report
|
WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report
|
||||||
WarningProjectClosed=Project is closed. You must re-open it first.
|
WarningProjectClosed=Project is closed. You must re-open it first.
|
||||||
|
WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list.
|
||||||
@ -205,10 +205,7 @@ MigrationRemiseExceptEntity=Update entity field value of llx_societe_remise_exce
|
|||||||
MigrationUserRightsEntity=Update entity field value of llx_user_rights
|
MigrationUserRightsEntity=Update entity field value of llx_user_rights
|
||||||
MigrationUserGroupRightsEntity=Update entity field value of llx_usergroup_rights
|
MigrationUserGroupRightsEntity=Update entity field value of llx_usergroup_rights
|
||||||
MigrationUserPhotoPath=Migration of photo paths for users
|
MigrationUserPhotoPath=Migration of photo paths for users
|
||||||
MigrationUsersSocialNetworks=Migration of users fields social networks
|
MigrationFieldsSocialNetworks=Migration of users fields social networks (%s)
|
||||||
MigrationMembersSocialNetworks=Migration of members fields social networks
|
|
||||||
MigrationContactsSocialNetworks=Migration of contacts fields social networks
|
|
||||||
MigrationThirdpartiesSocialNetworks=Migration of thirdparties fields social networks
|
|
||||||
MigrationReloadModule=Reload module %s
|
MigrationReloadModule=Reload module %s
|
||||||
MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm
|
MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm
|
||||||
ShowNotAvailableOptions=Show unavailable options
|
ShowNotAvailableOptions=Show unavailable options
|
||||||
|
|||||||
@ -231,7 +231,24 @@ if ($action == "change") // Change customer for TakePOS
|
|||||||
$idcustomer = GETPOST('idcustomer', 'int');
|
$idcustomer = GETPOST('idcustomer', 'int');
|
||||||
$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
|
$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
|
||||||
|
|
||||||
// @TODO Check if draft invoice already exists, if not create it or return a warning to ask to enter at least one line to have it created automatically
|
// Check if draft invoice already exists, if not create it
|
||||||
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' AND entity IN (".getEntity('invoice').")";
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$num_lines = $db->num_rows($result);
|
||||||
|
if ($num_lines==0)
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||||
|
$invoice = new Facture($db);
|
||||||
|
$constforthirdpartyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"];
|
||||||
|
$invoice->socid = $conf->global->$constforthirdpartyid;
|
||||||
|
$invoice->date = dol_now();
|
||||||
|
$invoice->module_source = 'takepos';
|
||||||
|
$invoice->pos_source = $_SESSION["takeposterminal"];
|
||||||
|
$placeid =$invoice->create($user);
|
||||||
|
$sql="UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid=".$placeid;
|
||||||
|
$db->query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1317,11 +1317,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
{
|
{
|
||||||
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
||||||
if (!in_array($cpt->currency, $arrayzerounitcurrency)) {
|
if (!in_array($cpt->currency, $arrayzerounitcurrency)) {
|
||||||
$currencybalance[$cpt->currency]->available=$cpt->amount / 100;
|
$currencybalance[$cpt->currency]['available'] = $cpt->amount / 100;
|
||||||
} else {
|
} else {
|
||||||
$currencybalance[$cpt->currency]->available=$cpt->amount;
|
$currencybalance[$cpt->currency]['available'] = $cpt->amount;
|
||||||
}
|
}
|
||||||
$currencybalance[$cpt->currency]->currency=$cpt->currency;
|
$currencybalance[$cpt->currency]['currency'] = $cpt->currency;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1331,9 +1331,9 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
{
|
{
|
||||||
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
||||||
if (!in_array($cpt->currency, $arrayzerounitcurrency)) {
|
if (!in_array($cpt->currency, $arrayzerounitcurrency)) {
|
||||||
$currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount / 100;
|
$currencybalance[$cpt->currency]['pending'] = $currencybalance[$cpt->currency]['available']+$cpt->amount / 100;
|
||||||
} else {
|
} else {
|
||||||
$currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount;
|
$currencybalance[$cpt->currency]['pending'] = $currencybalance[$cpt->currency]['available']+$cpt->amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1342,7 +1342,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
{
|
{
|
||||||
foreach ($currencybalance as $cpt)
|
foreach ($currencybalance as $cpt)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Currency".strtoupper($cpt->currency)).'</td><td>'.price($cpt->available, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).'</td><td>'.price($cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).'</td><td>'.price($cpt->available+$cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Currency".strtoupper($cpt['currency'])).'</td><td>'.price($cpt['available'], 0, '', 1, - 1, - 1, strtoupper($cpt['currency'])).'</td><td>'.price($cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt['currency'])).'</td><td>'.price($cpt['available']+$cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt['currency'])).'</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -178,7 +178,7 @@ class Stripe extends CommonObject
|
|||||||
global $stripearrayofkeysbyenv;
|
global $stripearrayofkeysbyenv;
|
||||||
\Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']);
|
\Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::customerStripe found stripe customer key_account = ".$tiers." with publishable_key = ".$stripearrayofkeysbyenv[$status]['publishable_key']);
|
dol_syslog(get_class($this)."::customerStripe found stripe customer key_account = ".$tiers.". We will try to read it on Stripe with publishable_key = ".$stripearrayofkeysbyenv[$status]['publishable_key']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (empty($key)) { // If the Stripe connect account not set, we use common API usage
|
if (empty($key)) { // If the Stripe connect account not set, we use common API usage
|
||||||
|
|||||||
@ -2120,9 +2120,9 @@ img.login, img.printer, img.entity {
|
|||||||
background-size: contain;
|
background-size: contain;
|
||||||
}
|
}
|
||||||
img.userphoto { /* size for user photo in lists */
|
img.userphoto { /* size for user photo in lists */
|
||||||
border-radius: 0.75em;
|
border-radius: 0.725em;
|
||||||
width: 1.5em;
|
width: 1.45em;
|
||||||
height: 1.5em;
|
height: 1.45em;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2738,7 +2738,7 @@ div.colorback
|
|||||||
border-left: 1px solid #ccc;
|
border-left: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
table.liste, table.noborder, table.formdoc, div.noborder {
|
table.liste, table.noborder, table.formdoc, div.noborder {
|
||||||
width: 100%;
|
width: calc(100% - 1px); /* -1 to fix a bug. Without, a scroll appears dur to overflow-x: auto; of div-tableèresponsive
|
||||||
|
|
||||||
border-collapse: separate !important;
|
border-collapse: separate !important;
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2018 Jean-François Ferry <hello@librethic.io>
|
/* Copyright (C) 2013-2018 Jean-François Ferry <hello@librethic.io>
|
||||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -120,7 +121,7 @@ class Ticket extends CommonObject
|
|||||||
public $progress;
|
public $progress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Duration for ticket
|
* @var string Duration for ticket
|
||||||
*/
|
*/
|
||||||
public $timing;
|
public $timing;
|
||||||
|
|
||||||
@ -250,11 +251,11 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_soc)) {
|
if (isset($this->fk_soc)) {
|
||||||
$this->fk_soc = trim($this->fk_soc);
|
$this->fk_soc = (int) $this->fk_soc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_project)) {
|
if (isset($this->fk_project)) {
|
||||||
$this->fk_project = trim($this->fk_project);
|
$this->fk_project = (int) $this->fk_project;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->origin_email)) {
|
if (isset($this->origin_email)) {
|
||||||
@ -262,11 +263,11 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_user_create)) {
|
if (isset($this->fk_user_create)) {
|
||||||
$this->fk_user_create = trim($this->fk_user_create);
|
$this->fk_user_create = (int) $this->fk_user_create;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_user_assign)) {
|
if (isset($this->fk_user_assign)) {
|
||||||
$this->fk_user_assign = trim($this->fk_user_assign);
|
$this->fk_user_assign = (int) $this->fk_user_assign;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->subject)) {
|
if (isset($this->subject)) {
|
||||||
@ -278,7 +279,7 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_statut)) {
|
if (isset($this->fk_statut)) {
|
||||||
$this->fk_statut = trim($this->fk_statut);
|
$this->fk_statut = (int) $this->fk_statut;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->resolution)) {
|
if (isset($this->resolution)) {
|
||||||
@ -746,11 +747,11 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_soc)) {
|
if (isset($this->fk_soc)) {
|
||||||
$this->fk_soc = trim($this->fk_soc);
|
$this->fk_soc = (int) $this->fk_soc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_project)) {
|
if (isset($this->fk_project)) {
|
||||||
$this->fk_project = trim($this->fk_project);
|
$this->fk_project = (int) $this->fk_project;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->origin_email)) {
|
if (isset($this->origin_email)) {
|
||||||
@ -758,11 +759,11 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_user_create)) {
|
if (isset($this->fk_user_create)) {
|
||||||
$this->fk_user_create = trim($this->fk_user_create);
|
$this->fk_user_create = (int) $this->fk_user_create;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_user_assign)) {
|
if (isset($this->fk_user_assign)) {
|
||||||
$this->fk_user_assign = trim($this->fk_user_assign);
|
$this->fk_user_assign = (int) $this->fk_user_assign;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->subject)) {
|
if (isset($this->subject)) {
|
||||||
@ -774,7 +775,7 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->fk_statut)) {
|
if (isset($this->fk_statut)) {
|
||||||
$this->fk_statut = trim($this->fk_statut);
|
$this->fk_statut = (int) $this->fk_statut;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->resolution)) {
|
if (isset($this->resolution)) {
|
||||||
@ -1002,12 +1003,12 @@ class Ticket extends CommonObject
|
|||||||
$this->ref = 'TI0501-001';
|
$this->ref = 'TI0501-001';
|
||||||
$this->track_id = 'XXXXaaaa';
|
$this->track_id = 'XXXXaaaa';
|
||||||
$this->origin_email = 'email@email.com';
|
$this->origin_email = 'email@email.com';
|
||||||
$this->fk_project = '1';
|
$this->fk_project = 1;
|
||||||
$this->fk_user_create = '1';
|
$this->fk_user_create = 1;
|
||||||
$this->fk_user_assign = '1';
|
$this->fk_user_assign = 1;
|
||||||
$this->subject = 'Subject of ticket';
|
$this->subject = 'Subject of ticket';
|
||||||
$this->message = 'Message of ticket';
|
$this->message = 'Message of ticket';
|
||||||
$this->fk_statut = '0';
|
$this->fk_statut = 0;
|
||||||
$this->resolution = '1';
|
$this->resolution = '1';
|
||||||
$this->progress = '10';
|
$this->progress = '10';
|
||||||
$this->timing = '30';
|
$this->timing = '30';
|
||||||
|
|||||||
@ -3059,9 +3059,10 @@ if ($action == 'editmeta' || $action == 'createcontainer')
|
|||||||
}
|
}
|
||||||
elseif ($result > 0)
|
elseif ($result > 0)
|
||||||
{
|
{
|
||||||
$translationof = $sourcepage->id;
|
$translationof = 0;
|
||||||
|
//$translationof = $sourcepage->id;
|
||||||
print '<span class="opacitymedium">'.$langs->trans('ThisPageIsTranslationOf').'</span> ';
|
print '<span class="opacitymedium">'.$langs->trans('ThisPageIsTranslationOf').'</span> ';
|
||||||
print $formwebsite->selectContainer($website, 'pageidfortranslation', $sourcepage->id, 1, $action);
|
print $formwebsite->selectContainer($website, 'pageidfortranslation', $translationof, 1, $action, 'minwidth300');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user