Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
commit
b2fce5052f
10 changed files with 22 additions and 40 deletions
3
.github/changed-lines-count-labeler.yml
vendored
3
.github/changed-lines-count-labeler.yml
vendored
|
|
@ -1,3 +0,0 @@
|
|||
# Add this tag for any changes for more than 1 line
|
||||
"Pending analysis of PR (maintenance team)":
|
||||
min: 1
|
||||
28
.github/workflows/test.yaml
vendored
28
.github/workflows/test.yaml
vendored
|
|
@ -1,28 +0,0 @@
|
|||
name: Test github actions
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
push:
|
||||
|
||||
env:
|
||||
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
|
||||
ENVGHU: ${{ github.token }}
|
||||
TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }}
|
||||
TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }}
|
||||
ENVLOCAL: "varenvlocal"
|
||||
|
||||
jobs:
|
||||
testjob:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log
|
||||
run: |
|
||||
echo "Run action by ${{ github.actor }}"
|
||||
echo "github.token=${{ github.token }}"
|
||||
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
|
||||
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
|
||||
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
|
||||
echo "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}"
|
||||
echo "variable repository : ${{vars.TEST_VAR_REPO}}"
|
||||
echo "ENVLOCAL: ${{env.ENVLOCAL}}"
|
||||
|
|
@ -939,13 +939,12 @@ class Asset extends CommonObject
|
|||
}
|
||||
|
||||
// Delete old lines
|
||||
$sql = "DELETE " . MAIN_DB_PREFIX . "asset_depreciation FROM " . MAIN_DB_PREFIX . "asset_depreciation";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab ON ab.doc_type = 'asset' AND ab.fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid";
|
||||
$sql .= " WHERE " . MAIN_DB_PREFIX . "asset_depreciation.fk_asset = " . (int) $this->id;
|
||||
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.depreciation_mode = '" . $this->db->escape($mode_key) . "'";
|
||||
$sql .= " AND ab.fk_docdet IS NULL";
|
||||
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "asset_depreciation";
|
||||
$sql .= " WHERE fk_asset = " . (int) $this->id;
|
||||
$sql .= " AND depreciation_mode = '" . $this->db->escape($mode_key) . "'";
|
||||
$sql .= " AND NOT EXISTS (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset' AND fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid)";
|
||||
if ($last_depreciation_date !== "") {
|
||||
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.ref != ''";
|
||||
$sql .= " AND ref <> ''";
|
||||
}
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
|
|||
|
|
@ -196,6 +196,7 @@ class CashControl extends CommonObject
|
|||
$sql .= ", cash";
|
||||
$sql .= ", cheque";
|
||||
$sql .= ", card";
|
||||
$sql .= ", fk_user_creat";
|
||||
$sql .= ") VALUES (";
|
||||
//$sql .= "'(PROV)', ";
|
||||
$sql .= ((int) $conf->entity);
|
||||
|
|
@ -210,6 +211,7 @@ class CashControl extends CommonObject
|
|||
$sql .= ", ".price2num($this->cash, 'MT');
|
||||
$sql .= ", ".price2num($this->cheque, 'MT');
|
||||
$sql .= ", ".price2num($this->card, 'MT');
|
||||
$sql .= ", ".((int) $user->id);
|
||||
$sql .= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
|
|
|||
|
|
@ -1537,6 +1537,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;
|
||||
|
|
@ -1561,6 +1564,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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1147,6 +1147,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
|||
$objecttmp = new $objectclass($db);
|
||||
$nbok = 0;
|
||||
foreach ($toselect as $toselectid) {
|
||||
$objecttmp->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
$result = $objecttmp->fetch($toselectid);
|
||||
if ($result > 0) {
|
||||
$outputlangs = $langs;
|
||||
|
|
@ -1161,7 +1162,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
|||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($objecttmp->default_lang)) {
|
||||
$newlang = $objecttmp->default_lang; // for thirdparty
|
||||
}
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
|
||||
$objecttmp->fetch_thirdparty();
|
||||
$newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ...
|
||||
}
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ class FormMail extends Form
|
|||
|
||||
// Add also email aliases from the c_email_senderprofile table
|
||||
$sql = "SELECT rowid, label, email FROM ".$this->db->prefix()."c_email_senderprofile";
|
||||
$sql .= " WHERE active = 1 AND (private = 0 OR private = ".((int) $user->id).")";
|
||||
$sql .= " WHERE active = 1 AND (private = 0 OR private = ".((int) $user->id).") AND entity IN (".getEntity('c_email_senderprofile').")";
|
||||
$sql .= " ORDER BY position";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
|
|
|
|||
|
|
@ -424,7 +424,10 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref_supplier = $obj->ref_supplier;
|
||||
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
|
||||
$this->fourn_id = $obj->fk_soc;
|
||||
$this->statut = $obj->status; // deprecated
|
||||
$this->status = $obj->status;
|
||||
|
|
|
|||
|
|
@ -990,6 +990,8 @@ class FactureFournisseur extends CommonInvoice
|
|||
|
||||
$this->socid = $obj->socid;
|
||||
|
||||
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
|
||||
// Retrieve all extrafield
|
||||
// fetch optionals attributes and labels
|
||||
$this->fetch_optionals();
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month);
|
|||
$sql = "SELECT cp.rowid, cp.ref, cp.fk_user, cp.date_debut, cp.date_fin, cp.fk_type, cp.description, cp.halfday, cp.statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday cp";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid";
|
||||
$sql .= " WHERE cp.rowid > 0";
|
||||
$sql .= " WHERE cp.entity IN (".getEntity('holiday').") AND cp.rowid > 0";
|
||||
$sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
|
||||
$sql .= " AND (";
|
||||
$sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
|
||||
|
|
|
|||
Loading…
Reference in a new issue