forked from Wavyzz/dolibarr
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
46
.github/workflows/pr-18.yaml
vendored
46
.github/workflows/pr-18.yaml
vendored
@@ -1,20 +1,42 @@
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types: [opened, synchronize, reopened]
|
||||||
- opened
|
branches:
|
||||||
|
- "18.0"
|
||||||
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "18.0"
|
- "18.0"
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
env:
|
||||||
|
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Create PR review request
|
- name: Checkout repository
|
||||||
env:
|
uses: actions/checkout@v3
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
url: ${{ github.event.pull_request.html_url }}
|
- name: Install GitHub CLI
|
||||||
run: |
|
run: |
|
||||||
gh pr edit "$url" --add-assignee lvessiller-opendsi,rycks --add-reviewer lvessiller-opendsi,rycks
|
sudo apt update
|
||||||
gh pr merge "$url" --merge --auto
|
sudo apt install gh -y
|
||||||
|
|
||||||
|
#- name: Authenticate GitHub CLI
|
||||||
|
# run: |
|
||||||
|
# echo "GH_TOKEN=$GH_TOKEN"
|
||||||
|
# gh auth login --with-token <<< "$GH_TOKEN"
|
||||||
|
|
||||||
|
- name: Assign reviewer
|
||||||
|
env:
|
||||||
|
#REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
|
||||||
|
REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
|
||||||
|
run: |
|
||||||
|
echo "GH_TOKEN=$GH_TOKEN"
|
||||||
|
pr_number=$(jq --raw-output .number < $GITHUB_EVENT_PATH)
|
||||||
|
gh pr edit $pr_number --add-reviewer "$REVIEWER"
|
||||||
|
continue-on-error: true
|
||||||
|
|||||||
19
.github/workflows/test.yaml
vendored
Normal file
19
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, reopened, synchronize]
|
||||||
|
branches:
|
||||||
|
- "18.0"
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
testjob:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Log
|
||||||
|
run: |
|
||||||
|
echo "variable org: ${{vars.AAA}}"
|
||||||
|
echo "env prg: ${{env.AAA}}"
|
||||||
|
echo "secret org: ${{secrets.BBB}}"
|
||||||
|
echo "variable repository of orga: ${{vars.CCC}}"
|
||||||
@@ -43,7 +43,7 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$usersignature = $user->signature;
|
$usersignature = $user->signature;
|
||||||
// For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html.
|
// For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html.
|
||||||
if ($action == 'test' || ($action == 'send' && $trackid = 'test')) {
|
if ($action == 'test' || ($action == 'send' && $trackid == 'test')) {
|
||||||
$usersignature = dol_string_nohtmltag($usersignature, 2);
|
$usersignature = dol_string_nohtmltag($usersignature, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1507,9 +1507,6 @@ if (empty($reshook)) {
|
|||||||
if (!empty($moreforfilter)) {
|
if (!empty($moreforfilter)) {
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
$parameters = array();
|
|
||||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
|
||||||
print $hookmanager->resPrint;
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8601,6 +8601,10 @@ abstract class CommonObject
|
|||||||
if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) {
|
if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) {
|
||||||
continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
||||||
} elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) {
|
} elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) {
|
||||||
|
// We need to make sure, that the values of hidden extrafields are also part of $_POST. Otherwise, they would be empty after an update of the object. See also getOptionalsFromPost
|
||||||
|
$ef_name = 'options_' . $key;
|
||||||
|
$ef_value = $this->array_options[$ef_name];
|
||||||
|
$out .= '<input type="hidden" name="' . $ef_name . '" id="' . $ef_name . '" value="' . $ef_value . '" />' . "\n";
|
||||||
continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation
|
continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation
|
||||||
} elseif ($mode == 'view' && empty($visibility)) {
|
} elseif ($mode == 'view' && empty($visibility)) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -112,8 +112,10 @@ if (empty($conf->dol_no_mouse_hover)) {
|
|||||||
success: function(response){
|
success: function(response){
|
||||||
// Setting content option
|
// Setting content option
|
||||||
console.log("ajax success");
|
console.log("ajax success");
|
||||||
elemfortooltip.tooltip("option","content",response);
|
if (elemfortooltip.is(":hover")) {
|
||||||
elemfortooltip.tooltip("open");
|
elemfortooltip.tooltip("option","content",response);
|
||||||
|
elemfortooltip.tooltip("open");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, opendelay));
|
}, opendelay));
|
||||||
|
|||||||
@@ -37,6 +37,16 @@ if (!empty($search_array_options) && is_array($search_array_options)) { // $extr
|
|||||||
$param .= '&'.$search_options_pattern.$tmpkey.'[]='.urlencode($val2);
|
$param .= '&'.$search_options_pattern.$tmpkey.'[]='.urlencode($val2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// test if we have checkbox type, we add the _multiselect needed into param
|
||||||
|
$tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key);
|
||||||
|
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('checkbox', 'chkbxlst'))) {
|
||||||
|
$param .= '&'.$search_options_pattern.$tmpkey.'_multiselect='.urlencode($val);
|
||||||
|
}
|
||||||
|
// test if we have boolean type, we add the _booleand needed into param
|
||||||
|
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('boolean'))) {
|
||||||
|
$param .= '&'.$search_options_pattern.$tmpkey.'_boolean='.urlencode($val);
|
||||||
|
}
|
||||||
|
|
||||||
$param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val);
|
$param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ if (empty($reshook)) {
|
|||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
$societe->fetch($cmd->socid);
|
$societe->fetch($cmd->socid);
|
||||||
$objecttmp->vat_reverse_charge = $societe->vat_reverse_charge;
|
$objecttmp->vat_reverse_charge = $societe->vat_reverse_charge;
|
||||||
|
$objecttmp->thirdparty = $societe;
|
||||||
}
|
}
|
||||||
$objecttmp->socid = $cmd->socid;
|
$objecttmp->socid = $cmd->socid;
|
||||||
$objecttmp->type = $objecttmp::TYPE_STANDARD;
|
$objecttmp->type = $objecttmp::TYPE_STANDARD;
|
||||||
@@ -504,10 +505,16 @@ if (empty($reshook)) {
|
|||||||
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
|
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
|
||||||
$fk_parent_line = 0;
|
$fk_parent_line = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tva_tx = $lines[$i]->tva_tx;
|
||||||
|
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
|
||||||
|
$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
|
||||||
|
}
|
||||||
|
|
||||||
$result = $objecttmp->addline(
|
$result = $objecttmp->addline(
|
||||||
$desc,
|
$desc,
|
||||||
$lines[$i]->subprice,
|
$lines[$i]->subprice,
|
||||||
$lines[$i]->tva_tx,
|
$tva_tx,
|
||||||
$lines[$i]->localtax1_tx,
|
$lines[$i]->localtax1_tx,
|
||||||
$lines[$i]->localtax2_tx,
|
$lines[$i]->localtax2_tx,
|
||||||
$lines[$i]->qty,
|
$lines[$i]->qty,
|
||||||
|
|||||||
@@ -1324,6 +1324,11 @@ if (empty($reshook)) {
|
|||||||
$date_end = $lines[$i]->date_end;
|
$date_end = $lines[$i]->date_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tva_tx = $lines[$i]->tva_tx;
|
||||||
|
if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) {
|
||||||
|
$tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME Missing special_code into addline and updateline methods
|
// FIXME Missing special_code into addline and updateline methods
|
||||||
$object->special_code = $lines[$i]->special_code;
|
$object->special_code = $lines[$i]->special_code;
|
||||||
|
|
||||||
@@ -1340,7 +1345,7 @@ if (empty($reshook)) {
|
|||||||
$result = $object->addline(
|
$result = $object->addline(
|
||||||
$desc,
|
$desc,
|
||||||
$pu,
|
$pu,
|
||||||
$lines[$i]->tva_tx,
|
$tva_tx,
|
||||||
$lines[$i]->localtax1_tx,
|
$lines[$i]->localtax1_tx,
|
||||||
$lines[$i]->localtax2_tx,
|
$lines[$i]->localtax2_tx,
|
||||||
$lines[$i]->qty,
|
$lines[$i]->qty,
|
||||||
@@ -3171,14 +3176,12 @@ if ($action == 'create') {
|
|||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$formconfirm) {
|
$parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid);
|
||||||
$parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid);
|
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
if (empty($reshook)) {
|
||||||
if (empty($reshook)) {
|
$formconfirm .= $hookmanager->resPrint;
|
||||||
$formconfirm .= $hookmanager->resPrint;
|
} elseif ($reshook > 0) {
|
||||||
} elseif ($reshook > 0) {
|
$formconfirm = $hookmanager->resPrint;
|
||||||
$formconfirm = $hookmanager->resPrint;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print form confirm
|
// Print form confirm
|
||||||
|
|||||||
@@ -917,7 +917,7 @@ foreach ($listofreferent as $key => $value) {
|
|||||||
$total_ttc_by_line = $element->total_ttc;
|
$total_ttc_by_line = $element->total_ttc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change sign of $total_ht_by_line and $total_ttc_by_line for some cases
|
// Change sign of $total_ht_by_line and $total_ttc_by_line for various payments
|
||||||
if ($tablename == 'payment_various') {
|
if ($tablename == 'payment_various') {
|
||||||
if ($element->sens == 1) {
|
if ($element->sens == 1) {
|
||||||
$total_ht_by_line = -$total_ht_by_line;
|
$total_ht_by_line = -$total_ht_by_line;
|
||||||
@@ -925,6 +925,12 @@ foreach ($listofreferent as $key => $value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change sign of $total_ht_by_line and $total_ttc_by_line for supplier proposal and supplier order
|
||||||
|
if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_proposal') {
|
||||||
|
$total_ht_by_line = -$total_ht_by_line;
|
||||||
|
$total_ttc_by_line = -$total_ttc_by_line;
|
||||||
|
}
|
||||||
|
|
||||||
// Add total if we have to
|
// Add total if we have to
|
||||||
if ($qualifiedfortotal) {
|
if ($qualifiedfortotal) {
|
||||||
$total_ht = $total_ht + $total_ht_by_line;
|
$total_ht = $total_ht + $total_ht_by_line;
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ if ($action == 'getProducts') {
|
|||||||
'label' => $obj->label,
|
'label' => $obj->label,
|
||||||
'tosell' => $obj->tosell,
|
'tosell' => $obj->tosell,
|
||||||
'tobuy' => $obj->tobuy,
|
'tobuy' => $obj->tobuy,
|
||||||
'barcode' => $obj->barcode,
|
'barcode' => $term, // there is only one product matches the barcode rule and so the term is considered as the barcode of this product,
|
||||||
'price' => empty($objProd->multiprices[$pricelevel]) ? $obj->price : $objProd->multiprices[$pricelevel],
|
'price' => empty($objProd->multiprices[$pricelevel]) ? $obj->price : $objProd->multiprices[$pricelevel],
|
||||||
'price_ttc' => empty($objProd->multiprices_ttc[$pricelevel]) ? $obj->price_ttc : $objProd->multiprices_ttc[$pricelevel],
|
'price_ttc' => empty($objProd->multiprices_ttc[$pricelevel]) ? $obj->price_ttc : $objProd->multiprices_ttc[$pricelevel],
|
||||||
'object' => 'product',
|
'object' => 'product',
|
||||||
|
|||||||
@@ -772,7 +772,7 @@ function Search2(keyCodeForEnter, moreorless) {
|
|||||||
console.log("There is only 1 answer with barcode matching the search, so we change the thirdparty "+data[0]['rowid']);
|
console.log("There is only 1 answer with barcode matching the search, so we change the thirdparty "+data[0]['rowid']);
|
||||||
ChangeThirdparty(data[0]['rowid']);
|
ChangeThirdparty(data[0]['rowid']);
|
||||||
}
|
}
|
||||||
else if ($('#search').val() == data[0]['barcode'] && 'product' == data[0]['object']) {
|
else if ('product' == data[0]['object'] && $('#search').val() == data[0]['barcode']) {
|
||||||
console.log("There is only 1 answer and we found search on a barcode, so we add the product in basket, qty="+data[0]['qty']);
|
console.log("There is only 1 answer and we found search on a barcode, so we add the product in basket, qty="+data[0]['qty']);
|
||||||
ClickProduct(0, data[0]['qty']);
|
ClickProduct(0, data[0]['qty']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user