forked from Wavyzz/dolibarr
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3969c1d2c | ||
|
|
d87ebbf926 | ||
|
|
08b105502e | ||
|
|
bd2aba1a2f | ||
|
|
a4601686a6 | ||
|
|
bcf6d6a7a2 | ||
|
|
65a3b0893d | ||
|
|
92454d671f | ||
|
|
f43f2909ff | ||
|
|
60f089c015 | ||
|
|
7d898184b5 | ||
|
|
e818bf732d |
@@ -133,7 +133,7 @@
|
||||
|
||||
<rule ref="Generic.Formatting.SpaceAfterCast" />
|
||||
|
||||
<rule ref="Generic.Functions.CallTimePassByReference" />
|
||||
<!-- <rule ref="Generic.Functions.CallTimePassByReference" /> -->
|
||||
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
||||
|
||||
|
||||
@@ -2872,7 +2872,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
|
||||
// Create a purchase order
|
||||
if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_SALE_ORDER)) {
|
||||
if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && $object->statut > Commande::STATUS_DRAFT && $object->getNbOfServicesLines() > 0) {
|
||||
if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && $object->statut > Commande::STATUS_DRAFT && $object->getNbOfProductsLines() > 0) {
|
||||
if ($usercancreatepurchaseorder) {
|
||||
print dolGetButtonAction('', $langs->trans('AddPurchaseOrder'), 'default', DOL_URL_ROOT.'/fourn/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id, '');
|
||||
}
|
||||
|
||||
@@ -1174,7 +1174,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1507,6 +1507,9 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
foreach ($TTotalByTva as $tva => &$total) {
|
||||
if (empty($amountdeposit[$tva])) {
|
||||
$amountdeposit[$tva] = 0;
|
||||
}
|
||||
$coef = $total / $srcobject->total_ttc; // Calc coef
|
||||
$am = $amount * $coef;
|
||||
$amount_ttc_diff += $am;
|
||||
@@ -1531,6 +1534,9 @@ if (empty($reshook)) {
|
||||
if ($qualified) {
|
||||
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
|
||||
$tva_tx = $lines[$i]->tva_tx;
|
||||
if (empty($amountdeposit[$tva_tx])) {
|
||||
$amountdeposit[$tva_tx] = 0;
|
||||
}
|
||||
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3079,7 +3079,7 @@ class ContratLigne extends CommonObjectLine
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $ref Ref of contract line
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @return int <0 if KO, >0 if OK, 0 if not found
|
||||
*/
|
||||
public function fetch($id, $ref = '')
|
||||
{
|
||||
@@ -3200,6 +3200,9 @@ class ContratLigne extends CommonObjectLine
|
||||
$this->rang = $obj->rang;
|
||||
|
||||
$this->fetch_optionals();
|
||||
} else {
|
||||
$this->db->free($resql);
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
@@ -605,6 +605,10 @@ abstract class CommonObject
|
||||
protected $labelStatus;
|
||||
protected $labelStatusShort;
|
||||
|
||||
/**
|
||||
* @var string output
|
||||
*/
|
||||
public $output;
|
||||
|
||||
/**
|
||||
* @var array List of child tables. To test if we can delete object.
|
||||
@@ -8452,7 +8456,7 @@ abstract class CommonObject
|
||||
$("#"+child_list).hide();
|
||||
//Show mother lists
|
||||
} else if ($("#"+parent_list).val() != 0){
|
||||
$("#"+parent_list).show();
|
||||
showOptions'.$type.'(child_list, parent_list, orig_select[child_list]);
|
||||
}
|
||||
//Show the child list if the parent list value is selected
|
||||
$("select[name=\""+parent_list+"\"]").click(function() {
|
||||
|
||||
@@ -185,13 +185,13 @@ class modMyModule extends DolibarrModules
|
||||
// 'group' to add a tab in group view
|
||||
// 'intervention' to add a tab in intervention view
|
||||
// 'invoice' to add a tab in customer invoice view
|
||||
// 'invoice_supplier' to add a tab in supplier invoice view
|
||||
// 'supplier_invoice' to add a tab in supplier invoice view
|
||||
// 'member' to add a tab in fundation member view
|
||||
// 'opensurveypoll' to add a tab in opensurvey poll view
|
||||
// 'order' to add a tab in sale order view
|
||||
// 'order_supplier' to add a tab in supplier order view
|
||||
// 'supplier_order' to add a tab in supplier order view
|
||||
// 'payment' to add a tab in payment view
|
||||
// 'payment_supplier' to add a tab in supplier payment view
|
||||
// 'supplier_payment' to add a tab in supplier payment view
|
||||
// 'product' to add a tab in product view
|
||||
// 'propal' to add a tab in propal view
|
||||
// 'project' to add a tab in project view
|
||||
|
||||
Reference in New Issue
Block a user