Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
57c77f700c
@ -1,31 +1,37 @@
|
||||
FROM php:7.0-apache
|
||||
FROM php:7.2-apache
|
||||
|
||||
ENV HOST_USER_ID 33
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev \
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++\
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install ldap \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& apt-get purge -y libjpeg-dev libldap2-dev
|
||||
&& docker-php-ext-install calendar \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install intl \
|
||||
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
|
||||
|
||||
RUN echo '172.17.0.1 docker.host' >> /etc/hosts
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
build: mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
usermod -u $HOST_USER_ID www-data
|
||||
groupmod -g $HOST_USER_ID www-data
|
||||
|
||||
chown -hR www-data:www-data /var/www
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -f /usr/local/etc/php/php.ini ]; then
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
|
||||
3
build/docker/mariadb/Dockerfile
Normal file
3
build/docker/mariadb/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM mariadb:latest
|
||||
# Enable comented out UTF8 charset/collation options
|
||||
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
|
||||
@ -7665,7 +7665,8 @@ class Form
|
||||
{
|
||||
global $db, $conf, $langs, $user;
|
||||
|
||||
$sql = 'SELECT rowid, label FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat WHERE active = 1';
|
||||
$out = '';
|
||||
$sql = 'SELECT rowid, label FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat WHERE active = 1';
|
||||
$sql .= ' AND entity IN (0,'.getEntity('exp_tax_cat').')';
|
||||
if (!empty($excludeid)) $sql .= ' AND rowid NOT IN ('.implode(',', $excludeid).')';
|
||||
$sql .= ' ORDER BY label';
|
||||
@ -7754,6 +7755,7 @@ class Form
|
||||
{
|
||||
global $db, $conf, $langs;
|
||||
|
||||
$out = '';
|
||||
$sql = 'SELECT rowid, range_ik FROM '.MAIN_DB_PREFIX.'c_exp_tax_range';
|
||||
$sql .= ' WHERE entity = '.$conf->entity.' AND active = 1';
|
||||
|
||||
@ -7791,6 +7793,7 @@ class Form
|
||||
{
|
||||
global $db, $langs;
|
||||
|
||||
$out = '';
|
||||
$sql = 'SELECT id, code, label FROM '.MAIN_DB_PREFIX.'c_type_fees';
|
||||
$sql .= ' WHERE active = 1';
|
||||
|
||||
|
||||
@ -2804,15 +2804,70 @@ class SupplierInvoiceLine extends CommonObjectLine
|
||||
*/
|
||||
public $fk_prev_id;
|
||||
|
||||
/**
|
||||
* VAT code
|
||||
* @var string
|
||||
*/
|
||||
public $vat_src_code;
|
||||
|
||||
/**
|
||||
* VAT %
|
||||
* @var float
|
||||
*/
|
||||
public $tva_tx;
|
||||
|
||||
/**
|
||||
* Local tax 1 %
|
||||
* @var float
|
||||
*/
|
||||
public $localtax1_tx;
|
||||
|
||||
/**
|
||||
* Local tax 2 %
|
||||
* @var float
|
||||
*/
|
||||
public $localtax2_tx;
|
||||
|
||||
/**
|
||||
* Quantity
|
||||
* @var double
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
/**
|
||||
* Percent of discount
|
||||
* @var float
|
||||
*/
|
||||
public $remise_percent;
|
||||
|
||||
/**
|
||||
* Total amount without taxes
|
||||
* @var float
|
||||
*/
|
||||
public $total_ht;
|
||||
|
||||
/**
|
||||
* Total amount with taxes
|
||||
* @var float
|
||||
*/
|
||||
public $total_ttc;
|
||||
|
||||
/**
|
||||
* Total amount of taxes
|
||||
* @var float
|
||||
*/
|
||||
public $total_tva;
|
||||
|
||||
/**
|
||||
* Total local tax 1 amount
|
||||
* @var float
|
||||
*/
|
||||
public $total_localtax1;
|
||||
|
||||
/**
|
||||
* Total local tax 2 amount
|
||||
* @var float
|
||||
*/
|
||||
public $total_localtax2;
|
||||
|
||||
/**
|
||||
@ -2820,8 +2875,24 @@ class SupplierInvoiceLine extends CommonObjectLine
|
||||
*/
|
||||
public $fk_product;
|
||||
|
||||
/**
|
||||
* Type of the product. 0 for product 1 for service
|
||||
* @var int
|
||||
*/
|
||||
public $product_type;
|
||||
|
||||
/**
|
||||
* Label of the product
|
||||
* @var string
|
||||
*/
|
||||
public $product_label;
|
||||
|
||||
/**
|
||||
* List of cumulative options:
|
||||
* Bit 0: 0 si TVA normal - 1 si TVA NPR
|
||||
* Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except)
|
||||
* @var int
|
||||
*/
|
||||
public $info_bits;
|
||||
|
||||
/**
|
||||
@ -2830,8 +2901,22 @@ class SupplierInvoiceLine extends CommonObjectLine
|
||||
public $fk_parent_line;
|
||||
|
||||
public $special_code;
|
||||
|
||||
/**
|
||||
* @var int rank of line
|
||||
*/
|
||||
public $rang;
|
||||
|
||||
/**
|
||||
* Total local tax 1 amount
|
||||
* @var float
|
||||
*/
|
||||
public $localtax1_type;
|
||||
|
||||
/**
|
||||
* Total local tax 2 amount
|
||||
* @var float
|
||||
*/
|
||||
public $localtax2_type;
|
||||
|
||||
// Multicurrency
|
||||
|
||||
@ -447,7 +447,7 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
|
||||
'date' => $order->date ?dol_print_date($order->date, 'dayrfc') : '',
|
||||
'date_creation' => $order->date_creation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
|
||||
'date_validation' => $order->date_validation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
|
||||
'date_modification' => $order->datem ?dol_print_date($order->datem, 'dayhourrfc') : '',
|
||||
'date_modification' => $order->date_modification ?dol_print_date($order->date_modification, 'dayhourrfc') : '',
|
||||
|
||||
'remise' => $order->remise,
|
||||
'remise_percent' => $order->remise_percent,
|
||||
@ -531,10 +531,10 @@ function getOrdersForThirdParty($authentication, $idthirdparty)
|
||||
{
|
||||
$linesorders=array();
|
||||
|
||||
$sql.='SELECT c.rowid as orderid';
|
||||
$sql.=' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||
$sql.=" WHERE c.entity = ".$conf->entity;
|
||||
if ($idthirdparty != 'all' ) $sql.=" AND c.fk_soc = ".$db->escape($idthirdparty);
|
||||
$sql = 'SELECT c.rowid as orderid';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||
$sql .= " WHERE c.entity = ".$conf->entity;
|
||||
if ($idthirdparty != 'all' ) $sql .= " AND c.fk_soc = ".$db->escape($idthirdparty);
|
||||
|
||||
|
||||
$resql=$db->query($sql);
|
||||
@ -677,7 +677,8 @@ function createOrder($authentication, $order)
|
||||
|
||||
// Init and check authentication
|
||||
$objectresp = array();
|
||||
$errorcode = ''; $errorlabel = '';
|
||||
$errorcode = '';
|
||||
$errorlabel = '';
|
||||
$error = 0;
|
||||
$fuser = check_authentication($authentication, $error, $errorcode, $errorlabel);
|
||||
|
||||
@ -820,7 +821,8 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
||||
|
||||
// Init and check authentication
|
||||
$objectresp=array();
|
||||
$errorcode='';$errorlabel='';
|
||||
$errorcode='';
|
||||
$errorlabel='';
|
||||
$error=0;
|
||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||
$fuser=check_authentication($authentication, $error, $errorcode, $errorlabel);
|
||||
@ -851,7 +853,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
||||
$db->rollback();
|
||||
$error++;
|
||||
$errorcode = 'KO';
|
||||
$errorlabel = $newobject->error;
|
||||
$errorlabel = $order->error;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -859,7 +861,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
||||
$db->rollback();
|
||||
$error++;
|
||||
$errorcode = 'KO';
|
||||
$errorlabel = $newobject->error;
|
||||
$errorlabel = $order->error;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -867,7 +869,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
||||
$db->rollback();
|
||||
$error++;
|
||||
$errorcode = 'KO';
|
||||
$errorlabel = $newobject->error;
|
||||
$errorlabel = $order->error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user