mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04d33f4594 | ||
|
|
af6e95aa79 | ||
|
|
5d942c9d1a | ||
|
|
53709cf509 | ||
|
|
10e32c056e | ||
|
|
0a72aed3d7 | ||
|
|
491f72accc | ||
|
|
eb7dd74026 | ||
|
|
88f6c71e88 | ||
|
|
2ec60c9d55 | ||
|
|
34e434a17e | ||
|
|
125e964352 | ||
|
|
b081cf5cba | ||
|
|
3ea9c297ea | ||
|
|
474260e526 | ||
|
|
eead9a93d3 | ||
|
|
467dc2da7a | ||
|
|
4bdf10c995 | ||
|
|
7f759c6ff5 | ||
|
|
20aa51f26b | ||
|
|
35f32391a0 | ||
|
|
5648205beb | ||
|
|
0ab16ed5ae | ||
|
|
14531bf160 | ||
|
|
bf4fca0c7e | ||
|
|
0625a7194f | ||
|
|
ec6e933f66 | ||
|
|
e0c8ccb9fb | ||
|
|
ef00cb0736 | ||
|
|
d7f7f5bf3d | ||
|
|
7c0a6946a7 | ||
|
|
1ecc1afa9e | ||
|
|
ceb1e699b7 | ||
|
|
c028819cab | ||
|
|
d59b1bb0c6 | ||
|
|
9d582a53ca |
@@ -121,7 +121,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
$newdiscount2->datec=$discount->datec;
|
||||
$newdiscount1->tva_tx=$discount->tva_tx;
|
||||
$newdiscount2->tva_tx=$discount->tva_tx;
|
||||
$newdiscount1->amount_ttc=$_POST["amount_ttc_1"];
|
||||
$newdiscount1->amount_ttc=$amount_ttc_1;
|
||||
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
|
||||
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT');
|
||||
$newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
|
||||
|
||||
@@ -593,7 +593,7 @@ class FormMail extends Form
|
||||
$out.= ' <'.$this->tomail.'>';
|
||||
if ($this->withtofree)
|
||||
{
|
||||
$out.= '<br>'.$langs->trans("and").' <input class="minwidth200" id="sendto" name="sendto" value="'.(! is_array($this->withto) && ! is_numeric($this->withto)? (isset($_REQUEST["sendto"])?$_REQUEST["sendto"]:$this->withto) :"").'" />';
|
||||
$out.= '<br>'.$langs->trans("and").' <input class="minwidth200" id="sendto" name="sendto" value="'.((! is_array($this->withto) && ! is_numeric($this->withto)) ? (isset($_REQUEST["sendto"])?$_REQUEST["sendto"]:$this->withto) : "").'" />';
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -606,7 +606,7 @@ class FormMail extends Form
|
||||
{
|
||||
if (! empty($this->withtofree))
|
||||
{
|
||||
$out.= '<input class="minwidth200" id="sendto" name="sendto" value="'.(! is_array($this->withto) && ! is_numeric($this->withto)? (isset($_REQUEST["sendto"])?$_REQUEST["sendto"]:$this->withto) :"").'" />';
|
||||
$out.= '<input class="minwidth200" id="sendto" name="sendto" value="'.((! is_array($this->withto) && ! is_numeric($this->withto)) ? (isset($_REQUEST["sendto"])?$_REQUEST["sendto"]:$this->withto) : "").'" />';
|
||||
}
|
||||
if (! empty($this->withto) && is_array($this->withto))
|
||||
{
|
||||
|
||||
@@ -328,18 +328,19 @@ class Utils
|
||||
{
|
||||
$handlein = popen($fullcommandclear, 'r');
|
||||
$i=0;
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle,$read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||
if ($handlein) {
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle,$read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||
}
|
||||
pclose($handlein);
|
||||
}
|
||||
pclose($handlein);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ if (empty($conf) || ! is_object($conf))
|
||||
if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey=$object->table_element;
|
||||
|
||||
// Loop to complete the sql search criterias from extrafields
|
||||
if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
||||
if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
||||
{
|
||||
foreach ($search_array_options as $key => $val)
|
||||
{
|
||||
|
||||
@@ -2123,7 +2123,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql = "SELECT DISTINCT ur.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||
$sql.= " WHERE ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
||||
$sql.= "UNION";
|
||||
$sql.= " UNION";
|
||||
$sql.= " SELECT DISTINCT ugu.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_user as ugu, ".MAIN_DB_PREFIX."usergroup_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||
$sql.= " WHERE ugu.fk_usergroup = ur.fk_usergroup AND ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
||||
|
||||
@@ -1258,7 +1258,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
false,
|
||||
$this->lines[$i]->date_start,
|
||||
$this->lines[$i]->date_end,
|
||||
0,
|
||||
$this->lines[$i]->array_options,
|
||||
$this->lines[$i]->fk_unit
|
||||
);
|
||||
if ($result < 0)
|
||||
@@ -1368,6 +1368,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
|
||||
|
||||
@@ -887,7 +887,7 @@ class Product extends CommonObject
|
||||
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
|
||||
$sql.= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra)."'";
|
||||
$sql.= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export)."'";
|
||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? (int) $this->desiredstock : "null");
|
||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (int) $this->desiredstock : "null");
|
||||
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
||||
$sql.= ", fk_unit= " . ((! $this->fk_unit) ? 'NULL' : (int) $this->fk_unit);
|
||||
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);
|
||||
|
||||
@@ -3275,6 +3275,7 @@ class Societe extends CommonObject
|
||||
$this->phone=$member->phone; // Prof phone
|
||||
$this->email=$member->email;
|
||||
$this->skype=$member->skype;
|
||||
$this->entity=$member->entity;
|
||||
|
||||
$this->client = 1; // A member is a customer by default
|
||||
$this->code_client = ($customercode?$customercode:-1);
|
||||
@@ -3778,7 +3779,7 @@ class Societe extends CommonObject
|
||||
|
||||
$outstandingOpened+=$obj->total_ttc - $paiement - $creditnotes - $deposits;
|
||||
}
|
||||
|
||||
|
||||
//if credit note is converted but not used
|
||||
if($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $tmpobject->isCreditNoteUsed())$outstandingOpened-=$tmpobject->getSumFromThisCreditNotesNotUsed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user