forked from Wavyzz/dolibarr
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
44
.github/workflows/pr-18.yaml
vendored
44
.github/workflows/pr-18.yaml
vendored
@@ -1,20 +1,42 @@
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- "18.0"
|
||||
push:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Create PR review request
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
url: ${{ github.event.pull_request.html_url }}
|
||||
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install GitHub CLI
|
||||
run: |
|
||||
gh pr edit "$url" --add-assignee lvessiller-opendsi,rycks --add-reviewer lvessiller-opendsi,rycks
|
||||
gh pr merge "$url" --merge --auto
|
||||
sudo apt update
|
||||
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;
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1507,9 +1507,6 @@ if (empty($reshook)) {
|
||||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
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>';
|
||||
}
|
||||
|
||||
|
||||
@@ -8601,6 +8601,10 @@ abstract class CommonObject
|
||||
if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) {
|
||||
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) {
|
||||
// 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
|
||||
} elseif ($mode == 'view' && empty($visibility)) {
|
||||
continue;
|
||||
|
||||
@@ -112,9 +112,11 @@ if (empty($conf->dol_no_mouse_hover)) {
|
||||
success: function(response){
|
||||
// Setting content option
|
||||
console.log("ajax success");
|
||||
if (elemfortooltip.is(":hover")) {
|
||||
elemfortooltip.tooltip("option","content",response);
|
||||
elemfortooltip.tooltip("open");
|
||||
}
|
||||
}
|
||||
});
|
||||
}, opendelay));
|
||||
});
|
||||
|
||||
@@ -37,6 +37,16 @@ if (!empty($search_array_options) && is_array($search_array_options)) { // $extr
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'[]='.urlencode($val2);
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,6 +399,7 @@ if (empty($reshook)) {
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch($cmd->socid);
|
||||
$objecttmp->vat_reverse_charge = $societe->vat_reverse_charge;
|
||||
$objecttmp->thirdparty = $societe;
|
||||
}
|
||||
$objecttmp->socid = $cmd->socid;
|
||||
$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) {
|
||||
$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(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->tva_tx,
|
||||
$tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->qty,
|
||||
|
||||
@@ -1324,6 +1324,11 @@ if (empty($reshook)) {
|
||||
$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
|
||||
$object->special_code = $lines[$i]->special_code;
|
||||
|
||||
@@ -1340,7 +1345,7 @@ if (empty($reshook)) {
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$pu,
|
||||
$lines[$i]->tva_tx,
|
||||
$tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->qty,
|
||||
@@ -3171,7 +3176,6 @@ if ($action == 'create') {
|
||||
$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);
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
@@ -3179,7 +3183,6 @@ if ($action == 'create') {
|
||||
} elseif ($reshook > 0) {
|
||||
$formconfirm = $hookmanager->resPrint;
|
||||
}
|
||||
}
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
@@ -917,7 +917,7 @@ foreach ($listofreferent as $key => $value) {
|
||||
$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 ($element->sens == 1) {
|
||||
$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
|
||||
if ($qualifiedfortotal) {
|
||||
$total_ht = $total_ht + $total_ht_by_line;
|
||||
|
||||
@@ -241,7 +241,7 @@ if ($action == 'getProducts') {
|
||||
'label' => $obj->label,
|
||||
'tosell' => $obj->tosell,
|
||||
'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_ttc' => empty($objProd->multiprices_ttc[$pricelevel]) ? $obj->price_ttc : $objProd->multiprices_ttc[$pricelevel],
|
||||
'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']);
|
||||
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']);
|
||||
ClickProduct(0, data[0]['qty']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user