Merge remote-tracking branch 'Upstream/develop' into develop-loan
Conflicts: htdocs/install/mysql/migration/3.7.0-3.8.0.sql
This commit is contained in:
commit
c119ce382e
@ -22,7 +22,7 @@ odtPHP 1.0.1 GPL-2+ b Yes
|
||||
PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
TCPDF 6.0.093 LGPL-3+ Yes PDF generation
|
||||
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
||||
|
||||
JS libraries:
|
||||
jQuery 1.8.2 MIT License Yes JS library
|
||||
|
||||
@ -222,6 +222,7 @@ Dolibarr better:
|
||||
- Fix: [ bug #1830 ] Salaries payment only allows checking accounts
|
||||
- Fix: [ bug #1825 ] External agenda: hide/show checkbox doesn't work
|
||||
- Fix: [ bug #1790 ] Email form behaves in an unexpected way when pressing Enter key
|
||||
- Fix: Bad SEPA xml file creation
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||
|
||||
@ -21,8 +21,9 @@ vous devez vous réorienter vers DoliWamp (la version tout-en-un
|
||||
de Dolibarr pour Windows), DoliDeb (la version tout-en-un pour Debian ou
|
||||
Ubuntu) ou DoliRpm (la version tout-en-un de Dolibarr pour Fedora, Redhat,
|
||||
OpenSuse, Mandriva ou Mageia).
|
||||
Vous pouvez les télécharger à l'adresse:
|
||||
http://www.dolibarr.org/downloads/
|
||||
|
||||
Vous pouvez les télécharger depuis la rubrique *download* du portail officiel:
|
||||
http://www.dolibarr.org/
|
||||
|
||||
Si vous avez déjà installé un serveur Web avec PHP et une base de donnée (Mysql),
|
||||
vous pouvez installer Dolibarr avec cette version de la manière suivante:
|
||||
|
||||
@ -22,7 +22,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](COPYRIGHT)
|
||||
|
||||
### Download
|
||||
|
||||
Official releases are available on the [website](http://www.dolibarr.org/downloads).
|
||||
Releases can be downloaded from [official website](http://www.dolibarr.org/).
|
||||
|
||||
### Simple setup
|
||||
|
||||
|
||||
@ -23,6 +23,21 @@ Replace call to serialize_val with no bugged value
|
||||
|
||||
|
||||
|
||||
FPDI:
|
||||
-----
|
||||
Replace:
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
with:
|
||||
try {
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
print $e->getMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
* Removed all fonts except
|
||||
@ -47,6 +62,19 @@ In htdocs/includes/tcpdf/tcpdf.php
|
||||
* Renamed getmypid into dol_getmypid().
|
||||
|
||||
|
||||
TCPDI:
|
||||
------
|
||||
Add fpdf_tpl.php 1.2
|
||||
Add tcpdi.php
|
||||
Add tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
with:
|
||||
require_once(dirname(__FILE__).'/../tcpdf/include/tcpdf_filters.php');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
|
||||
@ -103,9 +103,7 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "bank as b";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc on bu1.url_id=soc.rowid";
|
||||
// To isolate the cash of the other accounts
|
||||
$sql .= " WHERE ba.courant <> 2";
|
||||
$sql .= " AND ba.rowid=".$id_accountancy_journal;
|
||||
$sql .= " WHERE ba.rowid=".$id_accountancy_journal;
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND ba.entity = " . $conf->entity;
|
||||
}
|
||||
@ -143,9 +141,9 @@ if ($result) {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$tabcompany[$obj->rowid] = array(
|
||||
'id' => $obj->socid,
|
||||
'name' => $obj->name,
|
||||
'code_client' => $obj->code_compta
|
||||
'id' => $obj->socid,
|
||||
'name' => $obj->name,
|
||||
'code_client' => $obj->code_compta
|
||||
);
|
||||
|
||||
// Controls
|
||||
@ -172,133 +170,96 @@ if ($result) {
|
||||
// get_url may return -1 which is not traversable
|
||||
if (is_array($links))
|
||||
{
|
||||
foreach ($links as $key => $val)
|
||||
|
||||
foreach ( $links as $key => $val )
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
|
||||
|
||||
if ($links[$key]['type'] == 'payment')
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
|
||||
|
||||
if ($links[$key]['type'] == 'payment')
|
||||
{
|
||||
$paymentstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_supplier')
|
||||
{
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid)
|
||||
{
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
}
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_vat')
|
||||
{
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_salary')
|
||||
{
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'banktransfert')
|
||||
{
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_vat')
|
||||
{
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_salary')
|
||||
{
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'banktransfert')
|
||||
{
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
$paymentstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||
}
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_supplier')
|
||||
{
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
||||
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid)
|
||||
{
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
}
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_vat')
|
||||
{
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_salary')
|
||||
{
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$paymentsalstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'banktransfert')
|
||||
{
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||
|
||||
// if($obj->socid)$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
|
||||
$i ++;
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
@ -306,17 +267,16 @@ if ($result) {
|
||||
|
||||
/*
|
||||
* Actions
|
||||
* FIXME Action should be before any view
|
||||
*/
|
||||
|
||||
// Write bookkeeping
|
||||
if ($action == 'writeBookKeeping')
|
||||
{
|
||||
$error = 0;
|
||||
foreach ($tabpay as $key => $val)
|
||||
foreach ( $tabpay as $key => $val )
|
||||
{
|
||||
// Bank
|
||||
foreach ($tabbq[$key] as $k => $mt)
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
@ -368,7 +328,7 @@ if ($action == 'writeBookKeeping')
|
||||
}
|
||||
}
|
||||
// Third party
|
||||
foreach ($tabtp[$key] as $k => $mt)
|
||||
foreach ( $tabtp[$key] as $k => $mt )
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
@ -467,6 +427,7 @@ if ($action == 'export_csv')
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
||||
|
||||
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
|
||||
@ -484,21 +445,44 @@ if ($action == 'export_csv')
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
print $date . $sep;
|
||||
print $bank_journal . $sep;
|
||||
if ($val["lib"] == '(SupplierInvoicePayment)') {
|
||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep;
|
||||
} else {
|
||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep;
|
||||
if (is_array ( $tabtp[$key]))
|
||||
{
|
||||
foreach ( $tabtp[$key] as $k => $mt )
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print $date . $sep;
|
||||
print $bank_journal . $sep;
|
||||
if ($val["lib"] == '(SupplierInvoicePayment)') {
|
||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep;
|
||||
} else {
|
||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep;
|
||||
}
|
||||
print length_accounta(html_entity_decode($k)) . $sep;
|
||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||
print $val["type_payment"] . $sep;
|
||||
print $val["ref"] . $sep;
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
if (1)
|
||||
{
|
||||
print $date . $sep;
|
||||
print $bank_journal . $sep;
|
||||
print $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE . $sep;
|
||||
print $sep;
|
||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||
print $val["type_payment"] . $sep;
|
||||
print $val["ref"] . $sep;
|
||||
print "\n";
|
||||
}
|
||||
print length_accounta(html_entity_decode($k)) . $sep;
|
||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||
print $val["type_payment"] . $sep;
|
||||
print $val["ref"] . $sep;
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -522,15 +506,35 @@ if ($action == 'export_csv')
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["type_payment"] . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $companystatic->name . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||
print "\n";
|
||||
if (is_array ( $tabtp[$key]))
|
||||
{
|
||||
foreach ( $tabtp[$key] as $k => $mt )
|
||||
{
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["type_payment"] . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $companystatic->name . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
if (1)
|
||||
{
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE . '"' . $sep;
|
||||
print '"' . $langs->trans("Bank") . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -544,13 +548,53 @@ else
|
||||
llxHeader('', $langs->trans("BankJournal"));
|
||||
|
||||
$namereport = $langs->trans("BankJournal");
|
||||
$namelink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
$builddate = time();
|
||||
$description = $langs->trans("DescBankJournal") . '<br>';
|
||||
$description = $langs->trans("DescBankJournal");
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
report_header($namereport, $namelink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
|
||||
// Report
|
||||
$h=0;
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?id_account='.$id_accountancy_journal;
|
||||
$head[$h][1] = $langs->trans("Report");
|
||||
$head[$h][2] = 'report';
|
||||
|
||||
dol_fiche_head($head, $hselected);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id_account='.$id_accountancy_journal.'">';
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
// Title
|
||||
print '<tr>';
|
||||
print '<td valign="top" width="110">'.$langs->trans("ReportName").'</td>';
|
||||
print '<td colspan="3">'.$namereport.'</td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Period report
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("ReportPeriod").'</td>';
|
||||
if (! $periodlink) print '<td colspan="3">';
|
||||
else print '<td>';
|
||||
if ($period) print $period;
|
||||
if ($periodlink) print '</td><td colspan="2">'.$periodlink;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Description
|
||||
print '<tr>';
|
||||
print '<td valign="top">'.$langs->trans("ReportDescription").'</td>';
|
||||
print '<td colspan="3">'.$description.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td colspan="4" align="center"><input type="submit" class="button" name="submit" value="'.$langs->trans("Refresh").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '</div>';
|
||||
// End report
|
||||
|
||||
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
|
||||
|
||||
@ -611,20 +655,36 @@ else
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($k != 'type') {
|
||||
if (is_array ( $tabtp[$key]))
|
||||
{
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($k != 'type') {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $val["soclib"] . "</td>";
|
||||
print "<td>" . length_accounta($k) . "</td>";
|
||||
print "<td>" . $langs->trans('ThirdParty') . " (" . $val['soclib'] . ")</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $val["soclib"] . "</td>";
|
||||
print "<td>" . length_accounta($k) . "</td>";
|
||||
print "<td>" . $langs->trans('ThirdParty') . " (" . $val['soclib'] . ")</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td>" . $reflabel . "</td>";
|
||||
print "<td>" . $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE . "</td>";
|
||||
print "<td>" . $langs->trans('ThirdParty') . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
$var = ! $var;
|
||||
}
|
||||
|
||||
|
||||
@ -1,533 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/cashjournal.php
|
||||
* \ingroup Accounting Expert
|
||||
* \brief Page with cash journal
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("companies");
|
||||
$langs->load("other");
|
||||
$langs->load("compta");
|
||||
$langs->load("bank");
|
||||
$langs->load("accountancy");
|
||||
|
||||
$date_startmonth = GETPOST('date_startmonth');
|
||||
$date_startday = GETPOST('date_startday');
|
||||
$date_startyear = GETPOST('date_startyear');
|
||||
$date_endmonth = GETPOST('date_endmonth');
|
||||
$date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
$action = GETPOST('action');
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$year_current = strftime("%Y", dol_now());
|
||||
$pastmonth = strftime("%m", dol_now()) - 1;
|
||||
$pastmonthyear = $year_current;
|
||||
if ($pastmonth == 0) {
|
||||
$pastmonth = 12;
|
||||
$pastmonthyear --;
|
||||
}
|
||||
|
||||
$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
|
||||
$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
|
||||
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
|
||||
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
|
||||
}
|
||||
|
||||
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
$idpays = $p[0];
|
||||
|
||||
$sql = "SELECT b.rowid , b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type, soc.code_compta, ba.courant,";
|
||||
$sql .= " soc.code_compta_fournisseur, soc.rowid as socid, soc.nom as name, ba.account_number, bu1.type as typeop";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "bank as b";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc on bu1.url_id=soc.rowid";
|
||||
|
||||
// Code opération type caisse
|
||||
$sql .= " WHERE ba.courant = 2";
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND ba.entity = " . $conf->entity;
|
||||
}
|
||||
|
||||
if ($date_start && $date_end)
|
||||
$sql .= " AND b.dateo >= '" . $db->idate($date_start) . "' AND b.dateo <= '" . $db->idate($date_end) . "'";
|
||||
$sql .= " ORDER BY b.datev";
|
||||
|
||||
$object = new Account($db);
|
||||
$paymentstatic = new Paiement($db);
|
||||
$paymentsupplierstatic = new PaiementFourn($db);
|
||||
$societestatic = new Societe($db);
|
||||
$chargestatic = new ChargeSociales($db);
|
||||
$paymentvatstatic = new TVA($db);
|
||||
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sql=" . $sql, LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
// les variables
|
||||
$cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
||||
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
||||
$cptsociale = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
||||
|
||||
$tabpay = array ();
|
||||
$tabbq = array ();
|
||||
$tabtp = array ();
|
||||
$tabcompany = array ();
|
||||
$tabtype = array ();
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
// controls
|
||||
$compta_bank = $obj->account_number;
|
||||
if ($obj->label == '(SupplierInvoicePayment)')
|
||||
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $cptfour);
|
||||
if ($obj->label == '(CustomerInvoicePayment)')
|
||||
$compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $cptcli);
|
||||
if ($obj->typeop == '(BankTransfert)')
|
||||
$compta_soc = $conf->global->ACCOUNTING_ACCOUNT_TRANSFER_CASH;
|
||||
|
||||
// variable bookkeeping
|
||||
|
||||
$tabpay[$obj->rowid]["date"] = $obj->do;
|
||||
$tabpay[$obj->rowid]["ref"] = $obj->label;
|
||||
$tabpay[$obj->rowid]["fk_bank"] = $obj->rowid;
|
||||
if (preg_match('/^\((.*)\)$/i', $obj->label, $reg)) {
|
||||
$tabpay[$obj->rowid]["lib"] = $langs->trans($reg[1]);
|
||||
} else {
|
||||
$tabpay[$obj->rowid]["lib"] = dol_trunc($obj->label, 60);
|
||||
}
|
||||
$links = $object->get_url($obj->rowid);
|
||||
|
||||
// get_url may return -1 which is not traversable
|
||||
if (is_array($links))
|
||||
{
|
||||
foreach ( $links as $key => $val )
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
|
||||
if ($links[$key]['type'] == 'payment') {
|
||||
$paymentstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||
} else if ($links[$key]['type'] == 'payment_supplier') {
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
} else if ($links[$key]['type'] == 'company') {
|
||||
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'sc') {
|
||||
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
} else {
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$cptsociale] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||
|
||||
// if($obj->socid)$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
|
||||
$i ++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// write bookkeeping
|
||||
if ($action == 'writeBookKeeping')
|
||||
{
|
||||
$error = 0;
|
||||
foreach ( $tabpay as $key => $val )
|
||||
{
|
||||
// cash
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->doc_ref = $val["ref"];
|
||||
$bookkeeping->doc_type = 'cash';
|
||||
$bookkeeping->fk_doc = $key;
|
||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||
$bookkeeping->code_tiers = $tabcompany[$key]['code_client'];
|
||||
$bookkeeping->numero_compte = $k;
|
||||
$bookkeeping->label_compte = $compte->label;
|
||||
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
|
||||
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
||||
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
|
||||
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_CASH_JOURNAL;
|
||||
|
||||
if ($tabtype[$key] == 'payment')
|
||||
{
|
||||
$sqlmid = 'SELECT fac.facnumber';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
|
||||
$sqlmid .= " WHERE pay.fk_bank=" . $key;
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$bookkeeping->doc_ref = $objmid->facnumber;
|
||||
}
|
||||
} else if ($tabtype[$key] == 'payment_supplier') {
|
||||
|
||||
$sqlmid = 'SELECT facf.facnumber';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
|
||||
$sqlmid .= " WHERE payf.fk_bank=" . $key;
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$bookkeeping->doc_ref = $objmid->facnumber;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
// third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->doc_ref = $val["ref"];
|
||||
$bookkeeping->doc_type = 'cash';
|
||||
$bookkeeping->fk_doc = $key;
|
||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||
$bookkeeping->label_compte = $tabcompany[$key]['name'];
|
||||
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
|
||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
||||
$bookkeeping->credit = ($mt >= 0 ? $mt : 0);
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_CASH_JOURNAL;
|
||||
|
||||
if ($tabtype[$key] == 'sc') {
|
||||
$bookkeeping->code_tiers = '';
|
||||
$bookkeeping->numero_compte = $k;
|
||||
} else if ($tabtype[$key] == 'payment') {
|
||||
|
||||
$sqlmid = 'SELECT fac.facnumber';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
|
||||
$sqlmid .= " WHERE pay.fk_bank=" . $key;
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$bookkeeping->doc_ref = $objmid->facnumber;
|
||||
}
|
||||
$bookkeeping->code_tiers = $k;
|
||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||
} else if ($tabtype[$key] == 'payment_supplier') {
|
||||
|
||||
$sqlmid = 'SELECT facf.facnumber';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
|
||||
$sqlmid .= " WHERE payf.fk_bank=" . $key;
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$bookkeeping->doc_ref = $objmid->facnumber;
|
||||
}
|
||||
$bookkeeping->code_tiers = $k;
|
||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
||||
} else if ($tabtype[$key] == 'company') {
|
||||
|
||||
$sqlmid = 'SELECT fac.facnumber';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
|
||||
$sqlmid .= " WHERE pay.fk_bank=" . $key;
|
||||
dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$bookkeeping->doc_ref = $objmid->facnumber;
|
||||
}
|
||||
$bookkeeping->code_tiers = $k;
|
||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||
} else {
|
||||
|
||||
$bookkeeping->doc_ref = $k;
|
||||
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||
}
|
||||
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
setEventMessage($langs->trans('Success'), 'mesgs');
|
||||
}
|
||||
}
|
||||
// Export
|
||||
if ($action == 'export_csv') {
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$cash_journal = $conf->global->ACCOUNTING_CASH_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition:attachment;filename=journal_caisse.csv');
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
|
||||
{
|
||||
$sep = ";";
|
||||
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
||||
|
||||
// Cash
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
print $date . $sep;
|
||||
print $cash_journal . $sep;
|
||||
print length_accountg(html_entity_decode($k)) . $sep;
|
||||
print $sep;
|
||||
print ($mt < 0 ? 'C' : 'D') . $sep;
|
||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||
print $val["type_payment"] . $sep;
|
||||
print $val["ref"] . $sep;
|
||||
print "\n";
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
print $date . $sep;
|
||||
print $cash_journal . $sep;
|
||||
if ($val["lib"] == '(SupplierInvoicePayment)') {
|
||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep;
|
||||
} else {
|
||||
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep;
|
||||
}
|
||||
print length_accounta(html_entity_decode($k)) . $sep;
|
||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
|
||||
print $val["type_payment"] . $sep;
|
||||
print $val["ref"] . $sep;
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else // Model Classic Export
|
||||
{
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
// Cash
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Cash") . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("ThirdParty") . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans("CashJournal"), '');
|
||||
|
||||
$name = $langs->trans("CashJournal");
|
||||
$nomlink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
$builddate = time();
|
||||
$description = $langs->trans("DescCashJournal") . '<br>';
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
report_header($name, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
|
||||
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
|
||||
|
||||
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writeBookKeeping();" />';
|
||||
|
||||
print '
|
||||
<script type="text/javascript">
|
||||
function launch_export() {
|
||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
|
||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||
}
|
||||
function writeBookKeeping() {
|
||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("writeBookKeeping");
|
||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||
}
|
||||
</script>';
|
||||
|
||||
/*
|
||||
* Show result array
|
||||
*/
|
||||
print '<br><br>';
|
||||
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td>" . $langs->trans("Date") . "</td>";
|
||||
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
|
||||
print "<td>" . $langs->trans("Account") . "</td>";
|
||||
print "<td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$var = true;
|
||||
$r = '';
|
||||
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
// Cash
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
if (1) {
|
||||
print "<tr " . $bc[$var] . " >";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $val["lib"] . "</td>";
|
||||
print "<td>" . length_accountg($k) . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
// third party
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($k != 'type') {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $val["soclib"] . "</td>";
|
||||
|
||||
print "<td>" . length_accounta($k) . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
}
|
||||
}
|
||||
|
||||
$var = ! $var;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
}
|
||||
$db->close();
|
||||
@ -58,6 +58,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv("Members");
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
@ -70,42 +72,7 @@ $head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Members")).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -74,42 +74,7 @@ $head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -302,6 +302,7 @@ if (empty($reshook))
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
// Check if we need to also synchronize user information
|
||||
$nosyncuser=0;
|
||||
@ -471,6 +472,7 @@ if (empty($reshook))
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
// Check parameters
|
||||
if (empty($morphy) || $morphy == "-1") {
|
||||
|
||||
@ -89,6 +89,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if ($adht->libelle)
|
||||
{
|
||||
@ -126,6 +127,7 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$adht);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
$adht->update($user);
|
||||
|
||||
|
||||
@ -76,41 +76,7 @@ $head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Agenda"), 0, 'action');
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Agenda")).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -59,6 +59,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv("Bank");
|
||||
|
||||
llxHeader('',$langs->trans("BankSetupModule"),$help_url);
|
||||
|
||||
|
||||
@ -70,45 +72,7 @@ $head = bank_admin_prepare_head(null);
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("BankSetupModule"), 0, 'account');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -77,42 +77,7 @@ $head = order_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Orders"), 0, 'order');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Orders");
|
||||
$textobject=$langs->transnoentitiesnoconv("OrderLines");
|
||||
|
||||
llxHeader('',$langs->trans("OrdersSetup"));
|
||||
|
||||
@ -76,44 +76,9 @@ print "<br>\n";
|
||||
|
||||
$head = order_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributeslines', $langs->trans("Orders"), 0, 'order');
|
||||
dol_fiche_head($head, 'attributeslines', $langs->trans("OrderLines"), 0, 'order');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ if ($action == 'update')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
|
||||
dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", $_POST["MAIN_PROFID1_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
@ -222,7 +222,7 @@ if ($action == 'edit') // Edit
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Hide Tva Intra on adress
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowVATIntaInAddress").'</td><td>';
|
||||
@ -385,14 +385,14 @@ else // Show
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px" colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
|
||||
|
||||
// Hide any PDF informations
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
// Encrypt and protect PDF
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
@ -417,16 +417,16 @@ else // Show
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_pdfsecurity">'.$langs->trans("Disable").'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Hide Tva Intra on adress
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowVATIntaInAddress").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
//Desc
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDescOnPDF").'</td><td colspan="2">';
|
||||
@ -501,6 +501,13 @@ else // Show
|
||||
print ' ('.@constant('FPDI_PATH').')';
|
||||
$i++;
|
||||
}
|
||||
if (class_exists('TCPDI'))
|
||||
{
|
||||
if ($i) print ' + ';
|
||||
print 'TCPDI';
|
||||
print ' ('.@constant('TCPDI_PATH').')';
|
||||
$i++;
|
||||
}
|
||||
print '<!-- $conf->global->MAIN_USE_FPDF = '.$conf->global->MAIN_USE_FPDF.' -->';
|
||||
print '</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -139,6 +139,8 @@ print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var=true;
|
||||
|
||||
$found=0;
|
||||
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
@ -151,6 +153,7 @@ if (! empty($conf->facture->enabled))
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
$found++;
|
||||
}
|
||||
|
||||
if (! empty($conf->commande->enabled))
|
||||
@ -165,6 +168,7 @@ if (! empty($conf->commande->enabled))
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
$found++;
|
||||
}
|
||||
|
||||
if (! empty($conf->expedition->enabled))
|
||||
@ -179,7 +183,17 @@ if (! empty($conf->expedition->enabled))
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
$found++;
|
||||
}
|
||||
|
||||
if (! $found)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="2">'.$langs->trans("NoModueToManageStockDecrease").'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
@ -192,6 +206,8 @@ print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var=true;
|
||||
|
||||
$found=0;
|
||||
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
@ -204,6 +220,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
$found++;
|
||||
}
|
||||
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
@ -218,6 +235,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
$found++;
|
||||
}
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
@ -231,65 +249,76 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
$found++;
|
||||
}
|
||||
|
||||
if (! $found)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="2">'.$langs->trans("NoModueToManageStockIncrease").'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
// Optio to force stock to be enough before adding a line into document
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockAvailability")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabled)
|
||||
{
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockAvailability")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
if($conf->invoice->enabled) {
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForInvoice").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_INVOICE\">";
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
if($conf->invoice->enabled) {
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForInvoice").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_INVOICE\">";
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if($conf->order->enabled) {
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_ORDER\">";
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if($conf->expedition->enabled) {
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForShipment").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT\">";
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
if($conf->order->enabled) {
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_ORDER\">";
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if($conf->expedition->enabled) {
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForShipment").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT\">";
|
||||
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
$virtualdiffersfromphysical=0;
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
|| ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)
|
||||
|
||||
@ -81,42 +81,7 @@ $head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'supplierinvoice', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -81,42 +81,7 @@ $head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'supplierinvoicedet', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -77,42 +77,7 @@ $head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'supplierorder', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -78,42 +78,7 @@ $head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'supplierorderdet', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("InfoBrowser"),'','setup');
|
||||
|
||||
$tmp=getBrowserInfo();
|
||||
$tmp=getBrowserInfo($_SERVER["HTTP_USER_AGENT"]);
|
||||
|
||||
// Browser
|
||||
$var=true;
|
||||
|
||||
@ -73,8 +73,10 @@ $configfileparameters=array(
|
||||
'?dolibarr_main_auth_ldap_debug',
|
||||
'separator',
|
||||
'?dolibarr_lib_ADODB_PATH',
|
||||
'?dolibarr_lib_TCPDF_PATH',
|
||||
'?dolibarr_lib_FPDI_PATH',
|
||||
'?dolibarr_lib_FPDF_PATH',
|
||||
'?dolibarr_lib_TCPDF_PATH',
|
||||
'?dolibarr_lib_FPDI_PATH',
|
||||
'?dolibarr_lib_TCPDI_PATH',
|
||||
'?dolibarr_lib_NUSOAP_PATH',
|
||||
'?dolibarr_lib_PHPEXCEL_PATH',
|
||||
'?dolibarr_lib_GEOIP_PATH',
|
||||
|
||||
@ -266,9 +266,10 @@ $configfileparameters=array(
|
||||
'?dolibarr_main_auth_ldap_debug' => 'dolibarr_main_auth_ldap_debug',
|
||||
'separator3' => '',
|
||||
'?dolibarr_lib_ADODB_PATH' => 'dolibarr_lib_ADODB_PATH',
|
||||
'?dolibarr_lib_TCPDF_PATH' => 'dolibarr_lib_TCPDF_PATH',
|
||||
'?dolibarr_lib_FPDF_PATH' => 'dolibarr_lib_FPDF_PATH',
|
||||
'?dolibarr_lib_TCPDF_PATH' => 'dolibarr_lib_TCPDF_PATH',
|
||||
'?dolibarr_lib_FPDI_PATH' => 'dolibarr_lib_FPDI_PATH',
|
||||
'?dolibarr_lib_TCPDI_PATH' => 'dolibarr_lib_TCPDI_PATH',
|
||||
'?dolibarr_lib_NUSOAP_PATH' => 'dolibarr_lib_NUSOAP_PATH',
|
||||
'?dolibarr_lib_PHPEXCEL_PATH' => 'dolibarr_lib_PHPEXCEL_PATH',
|
||||
'?dolibarr_lib_GEOIP_PATH' => 'dolibarr_lib_GEOIP_PATH',
|
||||
@ -332,7 +333,7 @@ foreach($configfileparameters as $key => $value)
|
||||
{
|
||||
if ($i > 0) print ', ';
|
||||
print $value2;
|
||||
if (! is_readable($value2))
|
||||
if (! is_readable($value2))
|
||||
{
|
||||
$langs->load("errors");
|
||||
print ' '.img_warning($langs->trans("ErrorCantReadDir",$value2));
|
||||
|
||||
@ -69,42 +69,7 @@ $head = categoriesadmin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), 0, 'category');
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -127,6 +127,7 @@ if ($action == 'add' && $user->rights->categorie->creer)
|
||||
if ($parent != "-1") $object->fk_parent = $parent;
|
||||
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $object->label)
|
||||
{
|
||||
|
||||
@ -90,7 +90,8 @@ if ($action == 'update' && $user->rights->categorie->creer)
|
||||
if (empty($categorie->error))
|
||||
{
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$categorie);
|
||||
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if ($categorie->update($user) > 0)
|
||||
{
|
||||
header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$categorie->id.'&type='.$type);
|
||||
|
||||
@ -275,6 +275,7 @@ if ($action == 'add')
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@ -430,6 +431,7 @@ if ($action == 'update')
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -185,12 +185,12 @@ class ActionComm extends CommonObject
|
||||
$now=dol_now();
|
||||
|
||||
// Check parameters
|
||||
if (empty($this->userownerid))
|
||||
if (empty($this->userownerid))
|
||||
{
|
||||
$this->errors[]='ErrorPropertyUserowneridNotDefined';
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// Clean parameters
|
||||
$this->label=dol_trunc(trim($this->label),128);
|
||||
$this->location=dol_trunc(trim($this->location),128);
|
||||
@ -222,7 +222,7 @@ class ActionComm extends CommonObject
|
||||
$userdoneid=$this->userdoneid;
|
||||
|
||||
// Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...).
|
||||
if (empty($this->userassigned) || count($this->userassigned) == 0 || ! is_array($this->userassigned))
|
||||
if (empty($this->userassigned) || count($this->userassigned) == 0 || ! is_array($this->userassigned))
|
||||
$this->userassigned = array($userownerid=>array('id'=>$userownerid));
|
||||
|
||||
if (! $this->type_id || ! $this->type_code)
|
||||
@ -314,9 +314,9 @@ class ActionComm extends CommonObject
|
||||
{
|
||||
$val=array('id'=>$val);
|
||||
}
|
||||
|
||||
|
||||
$sql ="INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||
$sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".($val['mandatory']?$val['mandatory']:'0').", ".($val['transparency']?$val['transparency']:'0').", ".($val['answer_status']?$val['answer_status']:'0').")";
|
||||
$sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory'])?'0':$val['mandatory']).", ".(empty($val['transparency'])?'0':$val['transparency']).", ".(empty($val['answer_status'])?'0':$val['answer_status']).")";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql)
|
||||
@ -680,7 +680,7 @@ class ActionComm extends CommonObject
|
||||
foreach($this->userassigned as $key => $val)
|
||||
{
|
||||
$sql ="INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||
$sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".($val['manadatory']?$val['manadatory']:'0').", ".($val['transparency']?$val['transparency']:'0').", ".($val['answer_status']?$val['answer_status']:'0').")";
|
||||
$sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['manadatory'])?'0':$val['manadatory']).", ".(empty($val['transparency'])?'0':$val['transparency']).", ".(empty($val['answer_status'])?'0':$val['answer_status']).")";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql)
|
||||
|
||||
@ -61,10 +61,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Proposals");
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("PropalSetup"));
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("PropalSetup"),$linkback,'setup');
|
||||
|
||||
@ -73,45 +71,7 @@ $head = propal_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Proposals"), 0, 'propal');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -78,42 +78,7 @@ $head = propal_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributeslines', $langs->trans("Proposals"), 0, 'propal');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ class Mailing extends CommonObject
|
||||
|
||||
var $date_creat;
|
||||
var $date_valid;
|
||||
|
||||
|
||||
var $extraparams=array();
|
||||
|
||||
public $statut_dest=array();
|
||||
@ -78,12 +78,12 @@ class Mailing extends CommonObject
|
||||
$this->statuts[1] = 'MailingStatusValidated';
|
||||
$this->statuts[2] = 'MailingStatusSentPartialy';
|
||||
$this->statuts[3] = 'MailingStatusSentCompletely';
|
||||
|
||||
|
||||
$this->statut_dest[-1] = 'MailingStatusError';
|
||||
$this->statut_dest[1] = 'MailingStatusSent';
|
||||
$this->statut_dest[2] = 'MailingStatusRead';
|
||||
$this->statut_dest[3] = 'MailingStatusNotContact';
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -186,7 +186,7 @@ class Mailing extends CommonObject
|
||||
function fetch($rowid)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$sql = "SELECT m.rowid, m.titre, m.sujet, m.body, m.bgcolor, m.bgimage";
|
||||
$sql.= ", m.email_from, m.email_replyto, m.email_errorsto";
|
||||
$sql.= ", m.statut, m.nbemail";
|
||||
@ -211,14 +211,14 @@ class Mailing extends CommonObject
|
||||
$this->statut = $obj->statut;
|
||||
$this->nbemail = $obj->nbemail;
|
||||
$this->titre = $obj->titre;
|
||||
|
||||
$this->sujet = $obj->sujet;
|
||||
|
||||
$this->sujet = $obj->sujet;
|
||||
if (!empty($conf->global->FCKEDITOR_ENABLE_MAILING) && dol_textishtml(dol_html_entity_decode($obj->body, ENT_COMPAT | ENT_HTML401))) {
|
||||
$this->body = dol_html_entity_decode($obj->body, ENT_COMPAT | ENT_HTML401);
|
||||
}else {
|
||||
$this->body = $obj->body;
|
||||
}
|
||||
|
||||
|
||||
$this->bgcolor = $obj->bgcolor;
|
||||
$this->bgimage = $obj->bgimage;
|
||||
|
||||
@ -232,7 +232,7 @@ class Mailing extends CommonObject
|
||||
$this->date_creat = $this->db->jdate($obj->date_creat);
|
||||
$this->date_valid = $this->db->jdate($obj->date_valid);
|
||||
$this->date_envoi = $this->db->jdate($obj->date_envoi);
|
||||
|
||||
|
||||
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
||||
|
||||
return 1;
|
||||
@ -267,6 +267,8 @@ class Mailing extends CommonObject
|
||||
|
||||
$object=new Mailing($this->db);
|
||||
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -313,13 +315,13 @@ class Mailing extends CommonObject
|
||||
{
|
||||
//Clone target
|
||||
if (!empty($option2)) {
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/mailings/modules_mailings.php';
|
||||
|
||||
|
||||
$mailing_target = new MailingTargets($this->db);
|
||||
|
||||
|
||||
$target_array=array();
|
||||
|
||||
|
||||
$sql = "SELECT fk_contact, ";
|
||||
$sql.=" lastname, ";
|
||||
$sql.=" firstname,";
|
||||
@ -330,7 +332,7 @@ class Mailing extends CommonObject
|
||||
$sql.=" source_type ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles ";
|
||||
$sql.= " WHERE fk_mailing = ".$fromid;
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::createFromClone", LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
@ -338,17 +340,17 @@ class Mailing extends CommonObject
|
||||
if ($this->db->num_rows($result))
|
||||
{
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
|
||||
|
||||
$target_array[]=array('fk_contact'=>$obj->fk_contact,
|
||||
'lastname'=>$obj->lastname,
|
||||
'firstname'=>$obj->firstname,
|
||||
'email'=>$obj->email,
|
||||
'email'=>$obj->email,
|
||||
'other'=>$obj->other,
|
||||
'source_url'=>$obj->source_url,
|
||||
'source_id'=>$obj->source_id,
|
||||
'source_type'=>$obj->source_type);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -356,12 +358,14 @@ class Mailing extends CommonObject
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
$mailing_target->add_to_target($object->id, $target_array);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
@ -514,7 +518,7 @@ class Mailing extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
@ -526,7 +530,7 @@ class Mailing extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('mails');
|
||||
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $langs->trans($this->statut_dest[$statut]);
|
||||
@ -563,10 +567,10 @@ class Mailing extends CommonObject
|
||||
if ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut6');
|
||||
if ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut8');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -435,12 +435,12 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
|
||||
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
||||
$array_option = $lines[$i]->array_options;
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$tva_tx=get_default_tva($mysoc, $object->thirdparty);
|
||||
|
||||
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_option);
|
||||
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options);
|
||||
|
||||
if ($result > 0) {
|
||||
$lineid = $result;
|
||||
@ -652,7 +652,7 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
// Unset extrafield
|
||||
if (is_array($extralabelsline)) {
|
||||
// Get extra fields
|
||||
@ -812,7 +812,7 @@ if (empty($reshook))
|
||||
setEventMessage($mesg, 'errors');
|
||||
} else {
|
||||
// Insert line
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $date_start, $date_end, $array_option);
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $date_start, $date_end, $array_options);
|
||||
|
||||
if ($result > 0) {
|
||||
$db->commit();
|
||||
@ -895,7 +895,7 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
// Unset extrafield
|
||||
if (is_array($extralabelsline)) {
|
||||
// Get extra fields
|
||||
@ -940,7 +940,7 @@ if (empty($reshook))
|
||||
if (! $error) {
|
||||
$db->begin();
|
||||
|
||||
$result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_option);
|
||||
$result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options);
|
||||
|
||||
if ($result >= 0) {
|
||||
$db->commit();
|
||||
@ -987,6 +987,11 @@ if (empty($reshook))
|
||||
if (GETPOST('model')) {
|
||||
$object->setDocModel($user, GETPOST('model'));
|
||||
}
|
||||
if (GETPOST('fk_bank')) { // this field may come from an external module
|
||||
$object->fk_bank = GETPOST('fk_bank');
|
||||
} else {
|
||||
$object->fk_bank = $object->fk_account;
|
||||
}
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
@ -1110,10 +1115,10 @@ if (empty($reshook))
|
||||
// Fill array 'array_options' with data from update form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
// FIXME le hook fait double emploi avec le trigger !!
|
||||
$hookmanager->initHooks(array('propaldao'));
|
||||
|
||||
@ -235,27 +235,30 @@ class Propal extends CommonObject
|
||||
return -5;
|
||||
}
|
||||
|
||||
$propalligne=new PropaleLigne($this->db);
|
||||
$propalligne->fk_propal=$this->id;
|
||||
$propalligne->fk_remise_except=$remise->id;
|
||||
$propalligne->desc=$remise->description; // Description ligne
|
||||
$propalligne->tva_tx=$remise->tva_tx;
|
||||
$propalligne->subprice=-$remise->amount_ht;
|
||||
$propalligne->fk_product=0; // Id produit predefini
|
||||
$propalligne->qty=1;
|
||||
$propalligne->remise=0;
|
||||
$propalligne->remise_percent=0;
|
||||
$propalligne->rang=-1;
|
||||
$propalligne->info_bits=2;
|
||||
$line=new PropaleLigne($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
$line->fk_propal=$this->id;
|
||||
$line->fk_remise_except=$remise->id;
|
||||
$line->desc=$remise->description; // Description ligne
|
||||
$line->tva_tx=$remise->tva_tx;
|
||||
$line->subprice=-$remise->amount_ht;
|
||||
$line->fk_product=0; // Id produit predefini
|
||||
$line->qty=1;
|
||||
$line->remise=0;
|
||||
$line->remise_percent=0;
|
||||
$line->rang=-1;
|
||||
$line->info_bits=2;
|
||||
|
||||
// TODO deprecated
|
||||
$propalligne->price=-$remise->amount_ht;
|
||||
$line->price=-$remise->amount_ht;
|
||||
|
||||
$propalligne->total_ht = -$remise->amount_ht;
|
||||
$propalligne->total_tva = -$remise->amount_tva;
|
||||
$propalligne->total_ttc = -$remise->amount_ttc;
|
||||
$line->total_ht = -$remise->amount_ht;
|
||||
$line->total_tva = -$remise->amount_tva;
|
||||
$line->total_ttc = -$remise->amount_ttc;
|
||||
|
||||
$result=$propalligne->insert();
|
||||
$result=$line->insert();
|
||||
if ($result > 0)
|
||||
{
|
||||
$result=$this->update_price(1);
|
||||
@ -272,7 +275,7 @@ class Propal extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$propalligne->error;
|
||||
$this->error=$line->error;
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
@ -311,12 +314,12 @@ class Propal extends CommonObject
|
||||
* @param string $label ???
|
||||
* @param int $date_start Start date of the line
|
||||
* @param int $date_end End date of the line
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*
|
||||
* @see add_product
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_option=0)
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0)
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
@ -389,6 +392,8 @@ class Propal extends CommonObject
|
||||
// Insert line
|
||||
$this->line=new PropaleLigne($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
$this->line->fk_propal=$this->id;
|
||||
$this->line->label=$label;
|
||||
$this->line->desc=$desc;
|
||||
@ -435,8 +440,8 @@ class Propal extends CommonObject
|
||||
$this->line->price=$price;
|
||||
$this->line->remise=$remise;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$this->line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->insert();
|
||||
@ -491,10 +496,10 @@ class Propal extends CommonObject
|
||||
* @param int $type 0/1=Product/service
|
||||
* @param int $date_start Start date of the line
|
||||
* @param int $date_end End date of the line
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @return int 0 if OK, <0 if KO
|
||||
*/
|
||||
function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_option=0)
|
||||
function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_options=0)
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
@ -541,6 +546,8 @@ class Propal extends CommonObject
|
||||
// Update line
|
||||
$this->line=new PropaleLigne($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
// Stock previous line records
|
||||
$staticline=new PropaleLigne($this->db);
|
||||
$staticline->fetch($rowid);
|
||||
@ -594,8 +601,8 @@ class Propal extends CommonObject
|
||||
$this->line->price=$price;
|
||||
$this->line->remise=$remise;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$this->line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->update();
|
||||
@ -949,6 +956,8 @@ class Propal extends CommonObject
|
||||
{
|
||||
global $user,$langs,$conf,$hookmanager;
|
||||
|
||||
$this->context['createfromclone']='createfromclone';
|
||||
|
||||
$error=0;
|
||||
$now=dol_now();
|
||||
|
||||
@ -1042,6 +1051,8 @@ class Propal extends CommonObject
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
@ -3112,6 +3123,7 @@ class PropaleLigne extends CommonObject
|
||||
if (empty($this->special_code)) $this->special_code=0;
|
||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
||||
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
||||
if (empty($this->subprice)) $this->subprice=0;
|
||||
|
||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||
|
||||
|
||||
@ -93,6 +93,9 @@ if ($id > 0 || ! empty($ref)) {
|
||||
$hookmanager->initHooks(array('ordercard','globalcard'));
|
||||
|
||||
$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
||||
$permissionedit = $user->rights->commande->creer; // Used by the include of actions_lineupdown.inc.php
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -104,7 +107,11 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
||||
if ($cancel) $action='';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->creer)
|
||||
@ -281,8 +288,7 @@ if (empty($reshook))
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@ -338,10 +344,10 @@ if (empty($reshook))
|
||||
// trigger used
|
||||
{
|
||||
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
||||
$array_option = $lines[$i]->array_options;
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $date_start, $date_end, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_option);
|
||||
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $date_start, $date_end, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options);
|
||||
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
@ -375,10 +381,10 @@ if (empty($reshook))
|
||||
} else {
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$object_id = $object->create($user);
|
||||
|
||||
// If some invoice's lines already known
|
||||
@ -556,7 +562,7 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
// Unset extrafield
|
||||
if (is_array($extralabelsline)) {
|
||||
// Get extra fields
|
||||
@ -729,7 +735,7 @@ if (empty($reshook))
|
||||
setEventMessage($mesg, 'errors');
|
||||
} else {
|
||||
// Insert line
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_option);
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options);
|
||||
|
||||
if ($result > 0) {
|
||||
$ret = $object->fetch($object->id); // Reload to get new records
|
||||
@ -786,9 +792,10 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
/*
|
||||
* Mise a jour d'une ligne dans la commande
|
||||
*/
|
||||
else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST('save') == $langs->trans('Save')) {
|
||||
* Update a line
|
||||
*/
|
||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('save') == $langs->trans('Save'))
|
||||
{
|
||||
// Clean parameters
|
||||
$date_start='';
|
||||
$date_end='';
|
||||
@ -815,7 +822,7 @@ if (empty($reshook))
|
||||
// Extrafields Lines
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
// Unset extrafield POST Data
|
||||
if (is_array($extralabelsline)) {
|
||||
foreach ($extralabelsline as $key => $value) {
|
||||
@ -853,7 +860,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, 0, $array_option);
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, 0, $array_options);
|
||||
|
||||
if ($result >= 0) {
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
@ -891,7 +898,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST('cancel') == $langs->trans('Cancel')) {
|
||||
else if ($action == 'updateline' && $user->rights->commande->creer && GETPOST('cancel') == $langs->trans('Cancel')) {
|
||||
header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition
|
||||
exit();
|
||||
}
|
||||
@ -1045,67 +1052,18 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Ordonnancement des lignes
|
||||
*/
|
||||
|
||||
else if ($action == 'up' && $user->rights->commande->creer) {
|
||||
$object->line_up(GETPOST('rowid'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
||||
$newlang = $object->thirdparty->default_lang;
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid'));
|
||||
exit();
|
||||
}
|
||||
|
||||
else if ($action == 'down' && $user->rights->commande->creer) {
|
||||
$object->line_down(GETPOST('rowid'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
||||
$newlang = $object->thirdparty->default_lang;
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid'));
|
||||
exit();
|
||||
}
|
||||
|
||||
else if ($action == 'builddoc') // In get or post
|
||||
if ($action == 'builddoc') // In get or post
|
||||
{
|
||||
/*
|
||||
* Generate order document
|
||||
* define into /core/modules/commande/modules_commande.php
|
||||
*/
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model'))
|
||||
$object->setDocModel($user, GETPOST('model', 'alpha'));
|
||||
if (GETPOST('fk_bank')) { // this field may come from an external module
|
||||
$object->fk_bank = GETPOST('fk_bank');
|
||||
} else {
|
||||
$object->fk_bank = $object->fk_account;
|
||||
}
|
||||
|
||||
// Define output language
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
||||
@ -1125,8 +1083,10 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Remove file in doc form
|
||||
else if ($action == 'remove_file') {
|
||||
if ($object->id > 0) {
|
||||
if ($action == 'remove_file')
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
|
||||
$langs->load("other");
|
||||
@ -1141,14 +1101,15 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'update_extras') {
|
||||
if ($action == 'update_extras')
|
||||
{
|
||||
// Fill array 'array_options' with data from update form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
// FIXME le hook fait double emploi avec le trigger !!
|
||||
$hookmanager->initHooks(array('orderdao'));
|
||||
@ -1727,9 +1688,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirmation de la suppression d'une ligne produit
|
||||
*/
|
||||
// Confirmation to delete line
|
||||
if ($action == 'ask_deleteline')
|
||||
{
|
||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
|
||||
@ -2101,7 +2060,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
||||
<input type="hidden" name="mode" value="">
|
||||
<input type="hidden" name="id" value="' . $object->id . '">
|
||||
';
|
||||
|
||||
@ -877,6 +877,8 @@ class Commande extends CommonOrder
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
@ -941,6 +943,8 @@ class Commande extends CommonOrder
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
@ -1088,8 +1092,8 @@ class Commande extends CommonOrder
|
||||
* @param int $fk_remise_except Id remise
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param float $pu_ttc Prix unitaire TTC
|
||||
* @param int $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||
* @param int $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||
* @param int $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||
* @param int $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $rang Position of line
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
@ -1097,7 +1101,7 @@ class Commande extends CommonOrder
|
||||
* @param int $fk_fournprice Id supplier price
|
||||
* @param int $pa_ht Buying price (without tax)
|
||||
* @param string $label Label
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*
|
||||
* @see add_product
|
||||
@ -1107,7 +1111,7 @@ class Commande extends CommonOrder
|
||||
* par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit)
|
||||
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_option=0)
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_options=0)
|
||||
{
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
@ -1200,6 +1204,8 @@ class Commande extends CommonOrder
|
||||
// Insert line
|
||||
$this->line=new OrderLine($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
$this->line->fk_commande=$this->id;
|
||||
$this->line->label=$label;
|
||||
$this->line->desc=$desc;
|
||||
@ -1244,8 +1250,8 @@ class Commande extends CommonOrder
|
||||
$this->line->price=$price;
|
||||
$this->line->remise=$remise;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$this->line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->insert();
|
||||
@ -1314,6 +1320,8 @@ class Commande extends CommonOrder
|
||||
|
||||
$line=new OrderLine($this->db);
|
||||
|
||||
$line->context = $this->context;
|
||||
|
||||
$line->fk_product=$idproduct;
|
||||
$line->desc=$prod->description;
|
||||
$line->qty=$qty;
|
||||
@ -2338,10 +2346,10 @@ class Commande extends CommonOrder
|
||||
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||
* @param string $label Label
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
*/
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_option=0)
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0)
|
||||
{
|
||||
global $conf, $mysoc;
|
||||
|
||||
@ -2396,6 +2404,8 @@ class Commande extends CommonOrder
|
||||
// Update line
|
||||
$this->line=new OrderLine($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
// Stock previous line records
|
||||
$staticline=new OrderLine($this->db);
|
||||
$staticline->fetch($rowid);
|
||||
@ -2448,8 +2458,8 @@ class Commande extends CommonOrder
|
||||
$this->line->price=$price;
|
||||
$this->line->remise=$remise;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$this->line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->update();
|
||||
@ -3506,7 +3516,7 @@ class OrderLine extends CommonOrderLine
|
||||
}
|
||||
}
|
||||
|
||||
if (! $notrigger)
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINEORDER_INSERT',$user);
|
||||
|
||||
@ -366,19 +366,22 @@ if ($resql)
|
||||
// stock order and stock order_supplier
|
||||
$stock_order=0;
|
||||
$stock_order_supplier=0;
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) {
|
||||
if (! empty($conf->commande->enabled)) {
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
|
||||
{
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) {
|
||||
$generic_product->load_stats_commande(0,'1,2',true);
|
||||
$generic_product->load_stats_commande(0,'1,2');
|
||||
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty'];
|
||||
} else {
|
||||
$generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'];
|
||||
}
|
||||
$stock_order=$generic_product->stats_commande['qty'];
|
||||
}
|
||||
if (! empty($conf->fournisseur->enabled)) {
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) {
|
||||
$generic_product->load_stats_commande_fournisseur(0,'3',true);
|
||||
$generic_product->load_stats_commande_fournisseur(0,'3');
|
||||
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty'];
|
||||
} else {
|
||||
$generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'];
|
||||
|
||||
@ -300,7 +300,9 @@ class BankCateg // extends CommonObject
|
||||
|
||||
$object=new BankCateg($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
$object->fetch($fromid);
|
||||
@ -327,6 +329,8 @@ class BankCateg // extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -646,7 +646,7 @@ if (empty($reshook))
|
||||
// Fill array 'array_options' with data from add form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
if ($ret < 0) $error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
// Replacement invoice
|
||||
if ($_POST['type'] == Facture::TYPE_REPLACEMENT)
|
||||
@ -1061,10 +1061,10 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
|
||||
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
||||
$array_option = $lines[$i]->array_options;
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_option, $lines[$i]->situation_percent, $lines[$i]->fk_prev_id);
|
||||
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->situation_percent, $lines[$i]->fk_prev_id);
|
||||
|
||||
if ($result > 0) {
|
||||
$lineid = $result;
|
||||
@ -1196,7 +1196,7 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
// Unset extrafield
|
||||
if (is_array($extralabelsline)) {
|
||||
// Get extra fields
|
||||
@ -1374,7 +1374,7 @@ if (empty($reshook))
|
||||
setEventMessage($mesg, 'errors');
|
||||
} else {
|
||||
// Insert line
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $date_start, $date_end, 0, $info_bits, '', $price_base_type, $pu_ttc, $type, - 1, $special_code, '', 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_option, $_POST['progress']);
|
||||
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $date_start, $date_end, 0, $info_bits, '', $price_base_type, $pu_ttc, $type, - 1, $special_code, '', 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $_POST['progress']);
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -1469,7 +1469,7 @@ if (empty($reshook))
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
// Unset extrafield
|
||||
if (is_array($extralabelsline)) {
|
||||
// Get extra fields
|
||||
@ -1528,7 +1528,7 @@ if (empty($reshook))
|
||||
|
||||
// Update line
|
||||
if (! $error) {
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'), $date_start, $date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, 0, $array_option, GETPOST('progress'));
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'), $date_start, $date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, 0, $array_options, GETPOST('progress'));
|
||||
|
||||
if ($result >= 0) {
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
@ -1788,8 +1788,7 @@ if (empty($reshook))
|
||||
// Fill array 'array_options' with data from add form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
@ -3858,13 +3857,13 @@ if ($action == 'create')
|
||||
$formmail->withdeliveryreceipt = 1;
|
||||
$formmail->withcancel = 1;
|
||||
// Tableau des substitutions
|
||||
$formmail->substit ['__FACREF__'] = $object->ref;
|
||||
$formmail->substit ['__SIGNATURE__'] = $user->signature;
|
||||
$formmail->substit ['__REFCLIENT__'] = $object->ref_client;
|
||||
$formmail->substit ['__THIRPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit ['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
|
||||
$formmail->substit ['__PERSONALIZED__'] = '';
|
||||
$formmail->substit ['__CONTACTCIVNAME__'] = '';
|
||||
$formmail->substit['__FACREF__'] = $object->ref;
|
||||
$formmail->substit['__SIGNATURE__'] = $user->signature;
|
||||
$formmail->substit['__REFCLIENT__'] = $object->ref_client;
|
||||
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
|
||||
$formmail->substit['__PERSONALIZED__'] = '';
|
||||
$formmail->substit['__CONTACTCIVNAME__'] = '';
|
||||
|
||||
// Find the good contact adress
|
||||
$custcontact = '';
|
||||
@ -3873,7 +3872,7 @@ if ($action == 'create')
|
||||
|
||||
if (is_array($contactarr) && count($contactarr) > 0) {
|
||||
foreach ($contactarr as $contact) {
|
||||
if ($contact ['libelle'] == $langs->trans('TypeContact_facture_external_BILLING')) { // TODO Use code and not label
|
||||
if ($contact['libelle'] == $langs->trans('TypeContact_facture_external_BILLING')) { // TODO Use code and not label
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||
|
||||
@ -3884,15 +3883,15 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
if (! empty($custcontact)) {
|
||||
$formmail->substit ['__CONTACTCIVNAME__'] = $custcontact;
|
||||
$formmail->substit['__CONTACTCIVNAME__'] = $custcontact;
|
||||
}
|
||||
}
|
||||
|
||||
// Tableau des parametres complementaires du post
|
||||
$formmail->param ['action'] = $action;
|
||||
$formmail->param ['models'] = $modelmail;
|
||||
$formmail->param ['facid'] = $object->id;
|
||||
$formmail->param ['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
|
||||
$formmail->param['action'] = $action;
|
||||
$formmail->param['models'] = $modelmail;
|
||||
$formmail->param['facid'] = $object->id;
|
||||
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
|
||||
|
||||
// Init list of files
|
||||
if (GETPOST("mode") == 'init') {
|
||||
|
||||
@ -62,10 +62,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$textobject=strtolower($langs->transnoentitiesnoconv("BillsCustomers"));
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("BillsSetup"));
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BillsSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
@ -74,44 +72,7 @@ $head = invoice_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Invoices"), 0, 'invoice');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br><br>'."\n";
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@ -147,7 +108,7 @@ if ($action == 'create')
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
$langs->load("members");
|
||||
|
||||
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
|
||||
@ -63,10 +63,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$textobject=strtolower($langs->transnoentitiesnoconv("BillsCustomers"));
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("BillsSetup"));
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BillsSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
@ -75,44 +73,7 @@ $head = invoice_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributeslines', $langs->trans("Invoices"), 0, 'invoice');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br><br>'."\n";
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -639,6 +639,8 @@ class Facture extends CommonInvoice
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
@ -725,6 +727,8 @@ class Facture extends CommonInvoice
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
@ -2030,12 +2034,12 @@ class Facture extends CommonInvoice
|
||||
* @param int $fk_fournprice Supplier price id (to calculate margin) or ''
|
||||
* @param int $pa_ht Buying price of line (to calculate margin) or ''
|
||||
* @param string $label Label of the line (deprecated, do not use)
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @param int $situation_percent Situation advance percentage
|
||||
* @param int $fk_prev_id Previous situation line id reference
|
||||
* @return int <0 if KO, Id of line if OK
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_option=0, $situation_percent=100, $fk_prev_id='')
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id='')
|
||||
{
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
@ -2120,6 +2124,9 @@ class Facture extends CommonInvoice
|
||||
|
||||
// Insert line
|
||||
$this->line=new FactureLigne($this->db);
|
||||
|
||||
$this->line->context = $this->context;
|
||||
|
||||
$this->line->fk_facture=$this->id;
|
||||
$this->line->label=$label; // deprecated
|
||||
$this->line->desc=$desc;
|
||||
@ -2155,8 +2162,8 @@ class Facture extends CommonInvoice
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$this->line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->insert();
|
||||
@ -2210,11 +2217,11 @@ class Facture extends CommonInvoice
|
||||
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||
* @param string $label Label of the line (deprecated, do not use)
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @param int $situation_percent Situation advance percentage
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
*/
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_option=0, $situation_percent=0)
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=0)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
@ -2263,7 +2270,9 @@ class Facture extends CommonInvoice
|
||||
// Update line into database
|
||||
$this->line=new FactureLigne($this->db);
|
||||
|
||||
// Stock previous line records
|
||||
$this->line->context = $this->context;
|
||||
|
||||
// Stock previous line records
|
||||
$staticline=new FactureLigne($this->db);
|
||||
$staticline->fetch($rowid);
|
||||
$this->line->oldline = $staticline;
|
||||
@ -2313,8 +2322,8 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$this->line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$this->line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$this->line->update();
|
||||
@ -2403,6 +2412,8 @@ class Facture extends CommonInvoice
|
||||
|
||||
$line=new FactureLigne($this->db);
|
||||
|
||||
$line->context = $this->context;
|
||||
|
||||
// For triggers
|
||||
$line->fetch($rowid);
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ class PaymentTerm // extends CommonObject
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
//public $element='c_payment_term'; //!< Id that identify managed objects
|
||||
//public $table_element='c_payment_term'; //!< Name of table without prefix where object is stored
|
||||
var $context =array();
|
||||
|
||||
var $id;
|
||||
|
||||
@ -409,6 +410,8 @@ class PaymentTerm // extends CommonObject
|
||||
|
||||
$object=new PaymentTerm($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -436,6 +439,8 @@ class PaymentTerm // extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -31,7 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
if ($conf->deplacement->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
if ($conf->expensereport->enabled) require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||
|
||||
$langs->load('users');
|
||||
@ -69,6 +71,39 @@ print_fiche_titre($langs->trans("HRMArea"));
|
||||
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
/*
|
||||
* Search expenses
|
||||
*/
|
||||
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
|
||||
{
|
||||
$langs->load("trips");
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/deplacement/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchATripAndExpense").'</td></tr>';
|
||||
print "<tr ".$bc[0].">";
|
||||
print "<td><label for=\"search_ref\">".$langs->trans("Ref").'</label>:</td><td><input type="text" name="search_ref" id="search_ref" class="flat" size="18"></td>';
|
||||
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||
//print "<tr ".$bc[0]."><td><label for=\"sall\">".$langs->trans("Other").'</label>:</td><td><input type="text" name="sall" id="sall" class="flat" size="18"></td>';
|
||||
print '</tr>';
|
||||
print "</table></form><br>";
|
||||
}
|
||||
|
||||
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
|
||||
{
|
||||
$langs->load("trips");
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/expensereport/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchATripAndExpense").'</td></tr>';
|
||||
print "<tr ".$bc[0].">";
|
||||
print "<td><label for=\"search_ref\">".$langs->trans("Ref").'</label>:</td><td><input type="text" name="search_ref" id="search_ref" class="flat" size="18"></td>';
|
||||
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||
//print "<tr ".$bc[0]."><td><label for=\"sall\">".$langs->trans("Other").'</label>:</td><td><input type="text" name="sall" id="sall" class="flat" size="18"></td>';
|
||||
print '</tr>';
|
||||
print "</table></form><br>";
|
||||
}
|
||||
|
||||
|
||||
if (! empty($conf->holiday->enabled))
|
||||
{
|
||||
@ -89,25 +124,6 @@ if (! empty($conf->holiday->enabled))
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Search expenses
|
||||
*/
|
||||
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
|
||||
{
|
||||
$langs->load("trips");
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/deplacement/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchATripAndExpense").'</td></tr>';
|
||||
print "<tr ".$bc[0].">";
|
||||
print "<td><label for=\"search_ref\">".$langs->trans("Ref").'</label>:</td><td><input type="text" name="search_ref" id="search_ref" class="flat" size="18"></td>';
|
||||
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||
//print "<tr ".$bc[0]."><td><label for=\"sall\">".$langs->trans("Other").'</label>:</td><td><input type="text" name="sall" id="sall" class="flat" size="18"></td>';
|
||||
print '</tr>';
|
||||
print "</table></form><br>";
|
||||
}
|
||||
|
||||
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
$max=10;
|
||||
@ -115,65 +131,131 @@ $max=10;
|
||||
$langs->load("boxes");
|
||||
|
||||
// Last trips
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE u.rowid = d.fk_user";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if (!empty($socid)) $sql.= " AND d.fk_soc = ".$socid;
|
||||
$sql.= $db->order("d.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
|
||||
{
|
||||
$var=false;
|
||||
$num = $db->num_rows($result);
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE u.rowid = d.fk_user";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if (!empty($socid)) $sql.= " AND d.fk_soc = ".$socid;
|
||||
$sql.= $db->order("d.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$i = 0;
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$var=false;
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",min($max,$num)).'</td>';
|
||||
print '<td align="right">'.$langs->trans("FeesKilometersOrAmout").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
$total_ttc = $totalam = $total = 0;
|
||||
$i = 0;
|
||||
|
||||
$deplacementstatic=new Deplacement($db);
|
||||
$userstatic=new User($db);
|
||||
while ($i < $num && $i < $max)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$deplacementstatic->ref=$obj->rowid;
|
||||
$deplacementstatic->id=$obj->rowid;
|
||||
$userstatic->id=$obj->uid;
|
||||
$userstatic->lastname=$obj->lastname;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$deplacementstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.$obj->km.'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->dm),'day').'</td>';
|
||||
print '<td>'.$deplacementstatic->LibStatut($obj->fk_statut,3).'</td>';
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",min($max,$num)).'</td>';
|
||||
print '<td align="right">'.$langs->trans("FeesKilometersOrAmout").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
$total_ttc = $totalam = $total = 0;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td colspan="5">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
$deplacementstatic=new Deplacement($db);
|
||||
$userstatic=new User($db);
|
||||
while ($i < $num && $i < $max)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$deplacementstatic->ref=$obj->rowid;
|
||||
$deplacementstatic->id=$obj->rowid;
|
||||
$userstatic->id=$obj->uid;
|
||||
$userstatic->lastname=$obj->lastname;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$deplacementstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.$obj->km.'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->dm),'day').'</td>';
|
||||
print '<td>'.$deplacementstatic->LibStatut($obj->fk_statut,3).'</td>';
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td colspan="5">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
|
||||
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
|
||||
{
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, x.rowid, x.date_debut as date, x.tms as dm, x.total_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE u.rowid = x.fk_user_author";
|
||||
$sql.= " AND x.entity = ".$conf->entity;
|
||||
if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql.=' AND x.fk_user_author IN ('.join(',',$childids).')';
|
||||
//if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
//if (!empty($socid)) $sql.= " AND x.fk_soc = ".$socid;
|
||||
$sql.= $db->order("x.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$var=false;
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",min($max,$num)).'</td>';
|
||||
print '<td align="right">'.$langs->trans("FeesAmount").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
$total_ttc = $totalam = $total = 0;
|
||||
|
||||
$expensereportstatic=new ExpenseReport($db);
|
||||
$userstatic=new User($db);
|
||||
while ($i < $num && $i < $max)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$expensereportstatic->ref=$obj->rowid;
|
||||
$expensereportstatic->id=$obj->rowid;
|
||||
$userstatic->id=$obj->uid;
|
||||
$userstatic->lastname=$obj->lastname;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.$obj->total_ttc.'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->dm),'day').'</td>';
|
||||
//print '<td>'.$expensereportstatic->LibStatut($obj->fk_statut,3).'</td>';
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td colspan="5">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
|
||||
print '</div></div></div>';
|
||||
|
||||
@ -1249,14 +1249,29 @@ class BonPrelevement extends CommonObject
|
||||
$fileDebiteurSection = '';
|
||||
$fileEmetteurSection = '';
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
$this->total = 0;
|
||||
|
||||
/*
|
||||
* section Debiteur (sepa Debiteurs bloc lines)
|
||||
*/
|
||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||
$sql.= " pl.client_nom as name, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.iban_prefix as iban, rib.bic as bic, rib.datec, rib.rowid as drum";
|
||||
|
||||
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
while ($j < $num)
|
||||
{
|
||||
$objfac = $this->db->fetch_object($resql);
|
||||
$ListOfFactures = $ListOfFactures . $objfac->fac . ",";
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, soc.datec, p.code as country_code,";
|
||||
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
|
||||
$sql.= " FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
|
||||
@ -1279,7 +1294,7 @@ class BonPrelevement extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->name, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->facnumber, $obj->idfac, $obj->iban, $obj->bic, $obj->datec, $obj->drum);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $obj->datec, $obj->drum);
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@ -1314,13 +1329,14 @@ class BonPrelevement extends CommonObject
|
||||
fputs($this->file, ' <CtrlSum>'.$this->total.'</CtrlSum>'.$CrLf);
|
||||
fputs($this->file, ' <InitgPty>'.$CrLf);
|
||||
fputs($this->file, ' <Nm>'.$this->raison_sociale.'</Nm>'.$CrLf);
|
||||
/* fputs($this->file, ' <Id>'.$CrLf);
|
||||
fputs($this->file, ' <Othr>'.$CrLf);
|
||||
fputs($this->file, ' <Id>0533883248</Id>'.$CrLf);
|
||||
fputs($this->file, ' <Issr>KBO-BCE</Issr>'.$CrLf);
|
||||
fputs($this->file, ' <Id>'.$CrLf);
|
||||
fputs($this->file, ' <PrvtId>'.$CrLf);
|
||||
fputs($this->file, ' <Othr>'.$CrLf);
|
||||
fputs($this->file, ' <Id>'.$conf->global->PRELEVEMENT_ICS.'</Id>'.$CrLf);
|
||||
fputs($this->file, ' </Othr>'.$CrLf);
|
||||
fputs($this->file, ' </PrvtId>'.$CrLf);
|
||||
fputs($this->file, ' </Id>'.$CrLf);
|
||||
*/ fputs($this->file, ' </InitgPty>'.$CrLf);
|
||||
fputs($this->file, ' </InitgPty>'.$CrLf);
|
||||
fputs($this->file, ' </GrpHdr>'.$CrLf);
|
||||
// SEPA File Emetteur
|
||||
if ($result != -2)
|
||||
@ -1509,19 +1525,19 @@ class BonPrelevement extends CommonObject
|
||||
// Define value for RUM
|
||||
// Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId)
|
||||
$Date_Rum = strtotime($row_datec);
|
||||
$pre = ($date_Rum > 1359673200) ? 'RUM' : '++R';
|
||||
$Rum = dol_trunc($pre.$row_code_client.'-'.$row_drum.'-0'.date('U', $Date_Rum), 35, 'right', 'UTF-8', 1);
|
||||
|
||||
$DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d');
|
||||
$pre = ($date_Rum > 1359673200) ? 'Rum' : '++R';
|
||||
$Rum = $pre.$row_code_client.$row_drum.'-0'.date('U', $Date_Rum);
|
||||
$XML_DEBITOR ='';
|
||||
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' <PmtId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.$row_facnumber.'-'.$Rowing).'</EndToEndId>'.$CrLf;
|
||||
$XML_DEBITOR .=' </PmtId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <InstdAmt Ccy.="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
||||
$XML_DEBITOR .=' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DrctDbtTx>'.$CrLf;
|
||||
$XML_DEBITOR .=' <MndtRltdInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' <MndtId>'.$Rum.'</MndtId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DtOfSgntr>'.$row_datec.'</DtOfSgntr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DtOfSgntr>'.$DtOfSgntr.'</DtOfSgntr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AmdmntInd>false</AmdmntInd>'.$CrLf;
|
||||
$XML_DEBITOR .=' </MndtRltdInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' </DrctDbtTx>'.$CrLf;
|
||||
@ -1534,17 +1550,18 @@ class BonPrelevement extends CommonObject
|
||||
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.strtr($row_adr, array(CHR(13) => ", ", CHR(10) => "")).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Id>'.$CrLf;
|
||||
$XML_DEBITOR .=' <IBAN>'.$row_iban.'</IBAN>'.$CrLf;
|
||||
$XML_DEBITOR .=' <IBAN>'.preg_replace('/\s/', '', $row_iban).'</IBAN>'.$CrLf;
|
||||
$XML_DEBITOR .=' </Id>'.$CrLf;
|
||||
$XML_DEBITOR .=' </DbtrAcct>'.$CrLf;
|
||||
$XML_DEBITOR .=' <RmtInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Ustrd>'.($row_facnumber.'/'.$Rowing.'/'.$Rum).'</Ustrd>'.$CrLf;
|
||||
// $XML_DEBITOR .=' <Ustrd>'.($row_facnumber.'/'.$Rowing.'/'.$Rum).'</Ustrd>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Ustrd>'.$row_facnumber.'</Ustrd>'.$CrLf;
|
||||
$XML_DEBITOR .=' </RmtInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' </DrctDbtTxInf>'.$CrLf;
|
||||
return $XML_DEBITOR;
|
||||
|
||||
@ -384,6 +384,8 @@ class PaymentSocialContribution extends CommonObject
|
||||
|
||||
$object=new PaymentSocialContribution($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -411,6 +413,8 @@ class PaymentSocialContribution extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -200,6 +200,7 @@ if (empty($reshook))
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! GETPOST("lastname"))
|
||||
{
|
||||
@ -303,6 +304,7 @@ if (empty($reshook))
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
$result = $object->update($contactid, $user);
|
||||
|
||||
|
||||
@ -62,10 +62,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv('Contracts');
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup');
|
||||
|
||||
@ -74,46 +74,7 @@ $head=contract_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Contracts"), 0, 'contract');
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv('Contracts');
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -62,10 +62,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv('Contracts');
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup');
|
||||
|
||||
@ -74,46 +74,7 @@ $head=contract_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributeslines', $langs->trans("Contracts"), 0, 'contract');
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv('Contracts');
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// fetch optionals attributes lines and labels
|
||||
// fetch optionals attributes lines and labels
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
|
||||
@ -359,6 +359,7 @@ if ($action == 'add' && $user->rights->contrat->creer)
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
$result = $object->create($user);
|
||||
if ($result > 0)
|
||||
@ -415,7 +416,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
// Unset extrafield
|
||||
if (is_array($extralabelsline)) {
|
||||
// Get extra fields
|
||||
@ -537,7 +538,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
$info_bits,
|
||||
$fk_fournprice,
|
||||
$pa_ht,
|
||||
$array_option
|
||||
$array_options
|
||||
);
|
||||
}
|
||||
|
||||
@ -637,9 +638,9 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST(
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($objectline->table_element);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$objectline->array_options=$array_option;
|
||||
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$objectline->array_options=$array_options;
|
||||
|
||||
// TODO verifier price_min si fk_product et multiprix
|
||||
|
||||
$result=$objectline->update($user);
|
||||
@ -725,19 +726,20 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
||||
// Fill array 'array_options' with data from update form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
else if ($reshook < 0) $error++;
|
||||
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error ++;
|
||||
|
||||
if ($error) {
|
||||
if ($error)
|
||||
{
|
||||
$action = 'edit_extras';
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
@ -1414,8 +1416,8 @@ else
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Display lines extrafields
|
||||
if (is_array($extralabelslines) && count($extralabelslines)>0) {
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@ -1481,7 +1483,7 @@ else
|
||||
print '<br>'.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
|
||||
print '</td>';
|
||||
|
||||
|
||||
if (is_array($extralabelslines) && count($extralabelslines)>0) {
|
||||
print '<tr '.$bc[$var].'>';
|
||||
$line = new ContratLigne($db);
|
||||
@ -1489,7 +1491,7 @@ else
|
||||
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan));
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -1239,10 +1239,10 @@ class Contrat extends CommonObject
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
* @param int $fk_fournprice Fourn price id
|
||||
* @param int $pa_ht Buying price HT
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @return int <0 si erreur, >0 si ok
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_option=0)
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0)
|
||||
{
|
||||
global $user, $langs, $conf, $mysoc;
|
||||
|
||||
@ -1350,11 +1350,11 @@ class Contrat extends CommonObject
|
||||
$result=$this->update_statut($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_option) && count($array_option)>0) // For avoid conflicts if trigger used
|
||||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used
|
||||
{
|
||||
$contractline = new ContratLigne($this->db);
|
||||
$contractline->array_options=$array_option;
|
||||
$contractline->array_options=$array_options;
|
||||
$contractline->id= $this->db->last_insert_id(MAIN_DB_PREFIX.$contractline->table_element);
|
||||
$result=$contractline->insertExtraFields();
|
||||
if ($result < 0)
|
||||
@ -1363,7 +1363,7 @@ class Contrat extends CommonObject
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($error)) {
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINECONTRACT_CREATE',$user);
|
||||
@ -1373,7 +1373,7 @@ class Contrat extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
@ -1417,10 +1417,10 @@ class Contrat extends CommonObject
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
* @param int $fk_fournprice Fourn price id
|
||||
* @param int $pa_ht Buying price HT
|
||||
* @param array $array_option extrafields array
|
||||
* @param array $array_options extrafields array
|
||||
* @return int < 0 si erreur, > 0 si ok
|
||||
*/
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_option=0)
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0)
|
||||
{
|
||||
global $user, $conf, $langs, $mysoc;
|
||||
|
||||
@ -1520,8 +1520,8 @@ class Contrat extends CommonObject
|
||||
$result=$this->update_statut($user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_option) && count($array_option)>0) // For avoid conflicts if trigger used
|
||||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used
|
||||
{
|
||||
$contractline = new ContratLigne($this->db);
|
||||
$contractline->array_options=$array_option;
|
||||
@ -1533,7 +1533,7 @@ class Contrat extends CommonObject
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($error)) {
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINECONTRACT_UPDATE',$user);
|
||||
@ -1543,7 +1543,7 @@ class Contrat extends CommonObject
|
||||
return -3;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
@ -1597,7 +1597,7 @@ class Contrat extends CommonObject
|
||||
$this->error="Error ".$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
if (empty($error)) {
|
||||
// Remove extrafields
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
@ -2522,10 +2522,10 @@ class ContratLigne extends CommonObject
|
||||
$error++;
|
||||
//return -1;
|
||||
}
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used
|
||||
{
|
||||
|
||||
|
||||
$result=$this->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
73
htdocs/core/actions_lineupdown.inc.php
Normal file
73
htdocs/core/actions_lineupdown.inc.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/actions_lineupdown.inc.php
|
||||
* \brief Code for actions on moving lines up or down onto object page
|
||||
*/
|
||||
|
||||
|
||||
// $action must be defined
|
||||
// $permissiontoedit must be defined to permission to edit object
|
||||
// $object must be defined
|
||||
// $langs must be defined
|
||||
// $hidedetails, $hidedesc, $hideref must de defined
|
||||
|
||||
if ($action == 'up' && $permissiontoedit)
|
||||
{
|
||||
$object->line_up(GETPOST('rowid'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid'));
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($action == 'down' && $permissiontoedit)
|
||||
{
|
||||
$object->line_down(GETPOST('rowid'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid'));
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
// $action must be defined
|
||||
// $permission must be defined to permission to edit object
|
||||
// $permissionnote must be defined to permission to edit object
|
||||
// $object must be defined (object is loaded in this file with fetch)
|
||||
// $id must be defined (object is loaded in this file with fetch)
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ abstract class CommonObject
|
||||
public $errors;
|
||||
|
||||
public $canvas; // Contains canvas name if it is
|
||||
public $context=array(); // Use to pass context information
|
||||
|
||||
public $name;
|
||||
public $lastname;
|
||||
@ -2136,7 +2137,7 @@ abstract class CommonObject
|
||||
$fieldstatus="fk_statut";
|
||||
if ($elementTable == 'user') $fieldstatus="statut";
|
||||
if ($elementTable == 'expensereport') $fieldstatus="fk_c_expensereport_statuts";
|
||||
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$elementTable;
|
||||
$sql.= " SET ".$fieldstatus." = ".$status;
|
||||
// If status = 1 = validated, update also fk_user_valid
|
||||
@ -2567,38 +2568,43 @@ abstract class CommonObject
|
||||
* @param string $buyer Object of buyer third party
|
||||
* @param string $selected Object line selected
|
||||
* @param int $dateSelector 1=Show also date range input fields
|
||||
* @param int $permtoedit Permission to edit line
|
||||
* @return void
|
||||
*/
|
||||
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0)
|
||||
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0, $permtoedit=0)
|
||||
{
|
||||
global $conf, $hookmanager, $inputalsopricewithtax, $langs, $user;
|
||||
global $conf, $hookmanager, $inputalsopricewithtax, $usemargins, $langs, $user;
|
||||
|
||||
# Define usemargins
|
||||
$usemargins=0;
|
||||
if (! empty($conf->margin->enabled) && ! empty($this->element) && in_array($this->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
|
||||
print '<tr class="liste_titre nodrag nodrop">';
|
||||
|
||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td align="center" width="5"> </td>';
|
||||
|
||||
// Description
|
||||
print '<td><label for="">'.$langs->trans('Description').'</label></td>';
|
||||
print '<td>'.$langs->trans('Description').'</td>';
|
||||
|
||||
// VAT
|
||||
print '<td align="right" width="50"><label for="tva_tx">'.$langs->trans('VAT').'</label></td>';
|
||||
print '<td align="right" width="50">'.$langs->trans('VAT').'</td>';
|
||||
|
||||
// Price HT
|
||||
print '<td align="right" width="80"><label for="price_ht">'.$langs->trans('PriceUHT').'</label></td>';
|
||||
print '<td align="right" width="80">'.$langs->trans('PriceUHT').'</td>';
|
||||
|
||||
if ($inputalsopricewithtax) print '<td align="right" width="80"> </td>';
|
||||
if ($inputalsopricewithtax) print '<td align="right" width="80">'.$langs->trans('PriceUTTC').'</td>';
|
||||
|
||||
// Qty
|
||||
print '<td align="right" width="50"><label for="qty">'.$langs->trans('Qty').'</label></td>';
|
||||
print '<td align="right" width="50">'.$langs->trans('Qty').'</td>';
|
||||
|
||||
// Reduction short
|
||||
print '<td align="right" width="50"><label for="remise_percent">'.$langs->trans('ReductionShort').'</label></td>';
|
||||
print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>';
|
||||
|
||||
if ($this->situation_cycle_ref) {
|
||||
print '<td align="right" width="50"><label for="progress">' . $langs->trans('Progress') . '</label></td>';
|
||||
print '<td align="right" width="50">' . $langs->trans('Progress') . '</td>';
|
||||
}
|
||||
|
||||
if (! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||
{
|
||||
if ($conf->global->MARGIN_TYPE == "1")
|
||||
print '<td align="right" class="margininfos" width="80">'.$langs->trans('BuyingPrice').'</td>';
|
||||
@ -2653,7 +2659,7 @@ abstract class CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected,$extrafieldsline);
|
||||
$this->printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected,$extrafieldsline,$permtoedit);
|
||||
}
|
||||
|
||||
$i++;
|
||||
@ -2674,9 +2680,10 @@ abstract class CommonObject
|
||||
* @param string $buyer Object of buyer third party
|
||||
* @param string $selected Object line selected
|
||||
* @param object $extrafieldsline Object of extrafield line attribute
|
||||
* @param int $permtoedit Permission to edit
|
||||
* @return void
|
||||
*/
|
||||
function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$extrafieldsline=0)
|
||||
function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$extrafieldsline=0,$permtoedit=0)
|
||||
{
|
||||
global $conf,$langs,$user,$object,$hookmanager;
|
||||
global $form,$bc,$bcdd;
|
||||
@ -3496,7 +3503,8 @@ abstract class CommonObject
|
||||
|
||||
/**
|
||||
* Add/Update all extra fields values for the current object.
|
||||
* All data to describe values to insert are stored into $this->array_options=array('keyextrafield'=>'valueextrafieldtoadd')
|
||||
* Data to describe values to insert/update are stored into $this->array_options=array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...)
|
||||
* This function delte record with all extrafields and insert them again from the array $this->array_options.
|
||||
*
|
||||
* @return int -1=error, O=did nothing, 1=OK
|
||||
*/
|
||||
|
||||
@ -54,6 +54,10 @@ class Conf
|
||||
public $modules_parts = array('css'=>array(),'js'=>array(),'tabs'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'sms'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'societe'=>array(),'hooks'=>array(),'dir'=>array());
|
||||
|
||||
var $logbuffer = array();
|
||||
|
||||
/**
|
||||
* @var LogHandlerInterface[]
|
||||
*/
|
||||
var $loghandlers = array();
|
||||
|
||||
//! To store properties of multi-company
|
||||
|
||||
@ -1264,7 +1264,7 @@ class ExtraFields
|
||||
* @param array $extralabels $array of extrafields
|
||||
* @param object $object Object
|
||||
* @param string $onlykey Only following key is filled. When we make update of only one extrafield ($action = 'update_extras'), calling page must must set this to avoid to have other extrafields being reset.
|
||||
* @return int 1 if array_options set / 0 if no value
|
||||
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
|
||||
*/
|
||||
function setOptionalsFromPost($extralabels,&$object,$onlykey='')
|
||||
{
|
||||
|
||||
@ -4097,7 +4097,7 @@ class Form
|
||||
* Function to show a form to select a duration on a page
|
||||
*
|
||||
* @param string $prefix Prefix for input fields
|
||||
* @param int $iSecond Default preselected duration (number of seconds)
|
||||
* @param int $iSecond Default preselected duration (number of seconds or '')
|
||||
* @param int $disabled Disable the combo box
|
||||
* @param string $typehour If 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo
|
||||
* @param string $minunderhours If 1, show minutes selection under the hours
|
||||
@ -4112,7 +4112,7 @@ class Form
|
||||
|
||||
$hourSelected=0; $minSelected=0;
|
||||
|
||||
if ($iSecond)
|
||||
if ($iSecond != '')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
|
||||
@ -670,10 +670,9 @@ class FormFile
|
||||
if (! function_exists('dol_dir_list')) include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$out='';
|
||||
|
||||
$this->numoffiles=0;
|
||||
|
||||
$file_list=dol_dir_list($filedir, 'files', 0, preg_quote($modulesubdir.'.pdf','/'), '\.meta$|\.png$');
|
||||
|
||||
$file_list=dol_dir_list($filedir, 'files', 0, preg_quote(basename($modulesubdir).'.pdf','/'), '\.meta$|\.png$');
|
||||
|
||||
// For ajax treatment
|
||||
$out.= '<div id="gen_pdf_'.$modulesubdir.'" class="linkobject hideobject">'.img_picto('', 'refresh').'</div>'."\n";
|
||||
|
||||
@ -208,6 +208,8 @@ class DoliDBPgsql extends DoliDB
|
||||
$line=preg_replace('/tinytext/i','text',$line);
|
||||
$line=preg_replace('/mediumtext/i','text',$line);
|
||||
|
||||
$line=preg_replace('/text\([0-9]+\)/i','text',$line);
|
||||
|
||||
// change not null datetime field to null valid ones
|
||||
// (to support remapping of "zero time" to null
|
||||
$line=preg_replace('/datetime not null/i','datetime',$line);
|
||||
|
||||
@ -166,7 +166,7 @@ function convertTime2Seconds($iHours=0,$iMinutes=0,$iSeconds=0)
|
||||
/** Return, in clear text, value of a number of seconds in days, hours and minutes
|
||||
*
|
||||
* @param int $iSecond Number of seconds
|
||||
* @param string $format Output format (all: total delay days hour:min like "2 days 12:30"", allhourmin: total delay hours:min like "60:30", allhour: total delay hours without min/sec like "60:30", fullhour: total delay hour decimal like "60.5" for 60:30, hour: only hours part "12", min: only minutes part "30", sec: only seconds part, month: only month part, year: only year part);
|
||||
* @param string $format Output format ('all': total delay days hour:min like "2 days 12:30"", 'allhourmin': total delay hours:min like "60:30", 'allhour': total delay hours without min/sec like "60:30", 'fullhour': total delay hour decimal like "60.5" for 60:30, 'hour': only hours part "12", 'min': only minutes part "30", 'sec': only seconds part, 'month': only month part, 'year': only year part);
|
||||
* @param int $lengthOfDay Length of day (default 86400 seconds for 1 day, 28800 for 8 hour)
|
||||
* @param int $lengthOfWeek Length of week (default 7)
|
||||
* @return string Formated text of duration
|
||||
|
||||
@ -187,19 +187,19 @@ function supplierorder_admin_prepare_head()
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierorderdet_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierOrdersLines");
|
||||
$head[$h][2] = 'supplierorderdet';
|
||||
$h++;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierinvoice_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierInvoices");
|
||||
$head[$h][2] = 'supplierinvoice';
|
||||
$h++;
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierinvoicedet_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierInvoicesLines");
|
||||
$head[$h][2] = 'supplierinvoicedet';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/lib/json.lib.php';
|
||||
* @param string $class Class name
|
||||
* @param string $member Name of property
|
||||
* @return mixed Return value of static property
|
||||
* @deprecated Dolibarr now requires 5.3.0+
|
||||
*/
|
||||
function getStaticMember($class, $member)
|
||||
{
|
||||
@ -122,49 +123,85 @@ function getEntity($element=false, $shared=0)
|
||||
/**
|
||||
* Return information about user browser
|
||||
*
|
||||
* @return array Array of information ('browsername'=>,'browseros'=>,'browserversion'=>,'layout'=>(classic|phone|tablet))
|
||||
* Returns array with the following format:
|
||||
* array(
|
||||
* 'browsername' => Browser name (firefox|chrome|iceweasel|epiphany|safari|opera|ie|unknown)
|
||||
* 'browserversion' => Browser version. Empty if unknown
|
||||
* 'browseros' => Set with mobile OS (android|blackberry|ios|palm|symbian|webos|maemo|windows|unknown)
|
||||
* 'layout' => (tablet|phone|classic)
|
||||
* 'phone' => empty if not mobile, (android|blackberry|ios|palm|unknown) if mobile
|
||||
* 'tablet' => true/false
|
||||
* )
|
||||
*
|
||||
* @param string $user_agent Content of $_SERVER["HTTP_USER_AGENT"] variable
|
||||
* @return array Check function documentation
|
||||
*/
|
||||
function getBrowserInfo()
|
||||
function getBrowserInfo($user_agent)
|
||||
{
|
||||
$name='unknown'; $version=''; $os='unknown'; $phone=''; $tablet='';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/mobiledetect.class.php';
|
||||
|
||||
// If phone/smartphone, we set phone os name.
|
||||
if (preg_match('/android/i',$_SERVER["HTTP_USER_AGENT"])) { $os=$phone='android'; }
|
||||
elseif (preg_match('/blackberry/i',$_SERVER["HTTP_USER_AGENT"])) { $os=$phone='blackberry'; }
|
||||
elseif (preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) { $os='ios'; $phone='iphone'; }
|
||||
elseif (preg_match('/ipod/i',$_SERVER["HTTP_USER_AGENT"])) { $os='ios'; $phone='iphone'; }
|
||||
elseif (preg_match('/palm/i',$_SERVER["HTTP_USER_AGENT"])) { $os=$phone='palm'; }
|
||||
elseif (preg_match('/symbian/i',$_SERVER["HTTP_USER_AGENT"])) { $os='symbian'; $phone='unknown'; }
|
||||
elseif (preg_match('/webos/i',$_SERVER["HTTP_USER_AGENT"])) { $os='webos'; $phone='unknown'; }
|
||||
elseif (preg_match('/maemo/i',$_SERVER["HTTP_USER_AGENT"])) { $os='maemo'; $phone='unknown'; }
|
||||
// MS products at end
|
||||
elseif (preg_match('/iemobile/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; }
|
||||
elseif (preg_match('/windows ce/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; }
|
||||
$name='unknown';
|
||||
$version='';
|
||||
$os='unknown';
|
||||
$phone = '';
|
||||
|
||||
$detectmobile = new MobileDetect(null, $user_agent);
|
||||
$tablet = $detectmobile->isTablet();
|
||||
|
||||
if ($detectmobile->isMobile()) {
|
||||
|
||||
$phone = 'unknown';
|
||||
|
||||
// If phone/smartphone, we set phone os name.
|
||||
if ($detectmobile->is('AndroidOS')) {
|
||||
$os = $phone = 'android';
|
||||
} elseif ($detectmobile->is('BlackBerryOS')) {
|
||||
$os = $phone = 'blackberry';
|
||||
} elseif ($detectmobile->is('iOS')) {
|
||||
$os = 'ios';
|
||||
$phone = 'iphone';
|
||||
} elseif ($detectmobile->is('PalmOS')) {
|
||||
$os = $phone = 'palm';
|
||||
} elseif ($detectmobile->is('SymbianOS')) {
|
||||
$os = 'symbian';
|
||||
} elseif ($detectmobile->is('webOS')) {
|
||||
$os = 'webos';
|
||||
} elseif ($detectmobile->is('MaemoOS')) {
|
||||
$os = 'maemo';
|
||||
} elseif ($detectmobile->is('WindowsMobileOS') || $detectmobile->is('WindowsPhoneOS')) {
|
||||
$os = 'windows';
|
||||
}
|
||||
}
|
||||
|
||||
// OS
|
||||
if (preg_match('/android/i',$_SERVER["HTTP_USER_AGENT"])) { $os='android'; }
|
||||
elseif (preg_match('/linux/i',$_SERVER["HTTP_USER_AGENT"])) { $os='linux'; }
|
||||
if (preg_match('/linux/i', $user_agent)) { $os='linux'; }
|
||||
|
||||
// Name
|
||||
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='firefox'; $version=$reg[2]; }
|
||||
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
|
||||
elseif (preg_match('/chrome/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; }
|
||||
elseif (preg_match('/iceweasel/i',$_SERVER["HTTP_USER_AGENT"])) { $name='iceweasel'; $version=$reg[2]; }
|
||||
elseif (preg_match('/epiphany/i',$_SERVER["HTTP_USER_AGENT"])) { $name='epiphany'; $version=$reg[2]; }
|
||||
elseif ((empty($phone) || preg_match('/iphone/i',$_SERVER["HTTP_USER_AGENT"])) && preg_match('/safari(\/|\s)([\d\.]*)/i',$_SERVER["HTTP_USER_AGENT"], $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
|
||||
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='opera'; $version=$reg[2]; }
|
||||
elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='ie'; $version= end($reg); } // MS products at end
|
||||
// Other
|
||||
$firefox=0;
|
||||
if (in_array($name,array('firefox','iceweasel'))) $firefox=1;
|
||||
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='firefox'; $version=$reg[2]; }
|
||||
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $user_agent, $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
|
||||
elseif (preg_match('/chrome/i', $user_agent, $reg)) { $name='chrome'; }
|
||||
elseif (preg_match('/iceweasel/i', $user_agent)) { $name='iceweasel'; $version=$reg[2]; }
|
||||
elseif (preg_match('/epiphany/i', $user_agent)) { $name='epiphany'; $version=$reg[2]; }
|
||||
elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='safari'; $version=$reg[2]; } // Safari is often present in string for mobile but its not.
|
||||
elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name='opera'; $version=$reg[2]; }
|
||||
elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];\srv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name='ie'; $version=end($reg); } // MS products at end
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/mobiledetect.class.php';
|
||||
$detectmobile=new MobileDetect();
|
||||
$phone=$detectmobile->isMobile();
|
||||
$tablet=$detectmobile->isTablet();
|
||||
unset($detectmobile); // free memory
|
||||
if ($tablet) {
|
||||
$layout = 'tablet';
|
||||
} elseif ($phone) {
|
||||
$layout = 'phone';
|
||||
} else {
|
||||
$layout = 'classic';
|
||||
}
|
||||
|
||||
return array('browsername'=>$name, 'browserversion'=>$version, 'browseros'=>$os, 'browserfirefox'=>$firefox, 'layout'=> ($tablet?'tablet':($phone?'phone':'classic')), 'phone'=>$phone, 'tablet'=>$tablet);
|
||||
return array(
|
||||
'browsername' => $name,
|
||||
'browserversion' => $version,
|
||||
'browseros' => $os,
|
||||
'layout' => $layout,
|
||||
'phone' => $phone,
|
||||
'tablet' => $tablet
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -382,7 +419,7 @@ function dol_size($size,$type='')
|
||||
*
|
||||
* @param string $str String to clean
|
||||
* @param string $newstr String to replace bad chars with
|
||||
* @param string $unaccent 1=Remove also accent (default), 0 do not remove them
|
||||
* @param int $unaccent 1=Remove also accent (default), 0 do not remove them
|
||||
* @return string String cleaned (a-zA-Z_)
|
||||
*
|
||||
* @see dol_string_nospecial, dol_string_unaccent
|
||||
@ -484,8 +521,8 @@ function dolEscapeXML($string)
|
||||
* Returns text escaped for inclusion into javascript code
|
||||
*
|
||||
* @param string $stringtoescape String to escape
|
||||
* @param string $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
|
||||
* @param string $noescapebackslashn 0=Escape also \n. 1=Do not escape \n.
|
||||
* @param int $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \
|
||||
* @param int $noescapebackslashn 0=Escape also \n. 1=Do not escape \n.
|
||||
* @return string Escaped string. Both ' and " are escaped into ' if they are escaped.
|
||||
*/
|
||||
function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
|
||||
@ -569,7 +606,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
|
||||
global $conf, $user;
|
||||
|
||||
// If syslog module enabled
|
||||
if (empty($conf->syslog->enabled)) return false;
|
||||
if (empty($conf->syslog->enabled)) return;
|
||||
|
||||
if (! empty($level))
|
||||
{
|
||||
@ -579,7 +616,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
|
||||
{
|
||||
throw new Exception('Incorrect log level');
|
||||
}
|
||||
if ($level > $conf->global->SYSLOG_LEVEL) return false;
|
||||
if ($level > $conf->global->SYSLOG_LEVEL) return;
|
||||
|
||||
// If adding log inside HTML page is required
|
||||
if (! empty($_REQUEST['logtohtml']) && ! empty($conf->global->MAIN_LOGTOHTML))
|
||||
@ -587,6 +624,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
|
||||
$conf->logbuffer[] = dol_print_date(time(),"%Y-%m-%d %H:%M:%S")." ".$message;
|
||||
}
|
||||
|
||||
//TODO: Remove this. MAIN_ENABLE_LOG_HTML should be deprecated and use a HTML handler
|
||||
// If enable html log tag enabled and url parameter log defined, we show output log on HTML comments
|
||||
if (! empty($conf->global->MAIN_ENABLE_LOG_HTML) && ! empty($_GET["log"]))
|
||||
{
|
||||
@ -812,7 +850,7 @@ function dol_bc($var,$moreclass='')
|
||||
* @param Object $object A company or contact object
|
||||
* @param int $withcountry 1=Add country into address string
|
||||
* @param string $sep Separator to use to build string
|
||||
* @param Tranlsate $outputlangs Object lang that contains language for text translation.
|
||||
* @param Translate $outputlangs Object lang that contains language for text translation.
|
||||
* @return string Formated string
|
||||
*/
|
||||
function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
@ -1393,7 +1431,7 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
|
||||
* @param string $country Country code to use for formatting
|
||||
* @param int $cid Id of contact if known
|
||||
* @param int $socid Id of third party if known
|
||||
* @param int $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
* @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
* @param string $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx
|
||||
* @param string $withpicto Show picto
|
||||
* @return string Formated phone number
|
||||
@ -1610,6 +1648,7 @@ function isValidEmail($address)
|
||||
/**
|
||||
* Return true if phone number syntax is ok
|
||||
*
|
||||
* TODO: Decide what to do with this
|
||||
* @param string $phone phone (Ex: "0601010101")
|
||||
* @return boolean true if phone syntax is OK, false if KO or empty string
|
||||
*/
|
||||
@ -2697,7 +2736,7 @@ function print_fiche_titre($title, $mesg='', $picto='title.png', $pictoisfullpat
|
||||
* @param int $id To force an id on html objects
|
||||
* @return string
|
||||
*/
|
||||
function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath=0, $id='')
|
||||
function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath=0, $id=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -3243,7 +3282,7 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)
|
||||
{
|
||||
global $db;
|
||||
|
||||
dol_syslog("getLocalTaxesFromRate vatrate=".$vatrate." local=".$local." thirdparty id=".(is_object($thirdparty)?$thirdparty->id:''));
|
||||
dol_syslog("getLocalTaxesFromRate vatrate=".$vatrate." local=".$local);
|
||||
|
||||
// Search local taxes
|
||||
$sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.accountancy_code_sell, t.accountancy_code_buy";
|
||||
@ -3301,30 +3340,6 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)
|
||||
return array($obj->localtax1_type, $obj->localtax1, $obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy);
|
||||
}
|
||||
}
|
||||
|
||||
if(! isOnlyOneLocalTax(2))
|
||||
{
|
||||
if(! isOnlyOneLocalTax(1))
|
||||
{
|
||||
return array($obj->localtax2_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, get_localtax($vatrate, 2, $buyer, $seller),$obj->accountancy_code_sell,$obj->accountancy_code_buy);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array($obj->localtax2_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(! isOnlyOneLocalTax(1))
|
||||
{
|
||||
return array($obj->localtax2_type, $obj->localtax2, $obj->localtax1_type,get_localtax($vatrate, 1, $buyer, $seller) ,$obj->accountancy_code_sell,$obj->accountancy_code_buy);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array($obj->localtax2_type, $obj->localtax2, $obj->localtax1_type, $obj->localtax1,$obj->accountancy_code_sell,$obj->accountancy_code_buy);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3917,16 +3932,14 @@ function dol_html_entity_decode($a,$b,$c='UTF-8')
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace htmlentities functions to manage errors
|
||||
* http://php.net/manual/en/function.htmlentities.php
|
||||
* TODO Remove this function to replace it with direct htmlentities.
|
||||
* Replace htmlentities functions to manage errors http://php.net/manual/en/function.htmlentities.php
|
||||
* Goal of this function is to be sure to have default values of htmlentities that match what we need.
|
||||
*
|
||||
* @param string $string The input string.
|
||||
* @param int $flags Flags(see PHP doc above)
|
||||
* @param string $encoding Encoding
|
||||
* @param bool $double_encode When double_encode is turned off PHP will not encode existing html entities
|
||||
* @return string $ret Encoded string
|
||||
* @deprecated Since PHP4 support is no longer available, this function does not make sense.
|
||||
*/
|
||||
function dol_htmlentities($string, $flags=null, $encoding='UTF-8', $double_encode=false)
|
||||
{
|
||||
@ -4067,7 +4080,7 @@ function dol_textishtml($msg,$option=0)
|
||||
*
|
||||
* @param string $text1 Text 1
|
||||
* @param string $text2 Text 2
|
||||
* @param string $forxml false=Use <br>, true=Use <br />
|
||||
* @param bool $forxml false=Use <br>, true=Use <br />
|
||||
* @return string Text 1 + new line + Text2
|
||||
* @see dol_textishtml
|
||||
*/
|
||||
@ -4109,7 +4122,7 @@ function make_substitutions($chaine,$substitutionarray)
|
||||
*
|
||||
* @param array $substitutionarray Array substitution old value => new value value
|
||||
* @param Translate $outputlangs If we want substitution from special constants, we provide a language
|
||||
* @param Object $object If we want substitution from special constants, we provide data in a source object
|
||||
* @param object $object If we want substitution from special constants, we provide data in a source object
|
||||
* @param Mixed $parameters Add more parameters (useful to pass product lines)
|
||||
* @param string $callfunc What is the name of the custom function that will be called? (default: completesubstitutionarray)
|
||||
* @return void
|
||||
@ -4152,8 +4165,8 @@ function complete_substitutions_array(&$substitutionarray,$outputlangs,$object='
|
||||
/**
|
||||
* Format output for start and end date
|
||||
*
|
||||
* @param timestamp $date_start Start date
|
||||
* @param timestamp $date_end End date
|
||||
* @param int $date_start Start date
|
||||
* @param int $date_end End date
|
||||
* @param string $format Output format
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return void
|
||||
@ -4166,8 +4179,8 @@ function print_date_range($date_start,$date_end,$format = '',$outputlangs='')
|
||||
/**
|
||||
* Format output for start and end date
|
||||
*
|
||||
* @param timestamp $date_start Start date
|
||||
* @param timestamp $date_end End date
|
||||
* @param int $date_start Start date
|
||||
* @param int $date_end End date
|
||||
* @param string $format Output format
|
||||
* @param Translate $outputlangs Output language
|
||||
* @param string $withparenthesis 1=Add parenthesis, 0=non parenthesis
|
||||
|
||||
@ -125,8 +125,9 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
if (empty($conf->global->MAIN_USE_FPDF)) require_once TCPDF_PATH.'tcpdf.php';
|
||||
else require_once FPDF_PATH.'fpdf.php';
|
||||
|
||||
// We need to instantiate fpdi object (instead of tcpdf) to use merging features. But we can disable it.
|
||||
if (empty($conf->global->MAIN_DISABLE_FPDI)) require_once FPDI_PATH.'fpdi.php';
|
||||
// We need to instantiate tcpdi or fpdi object (instead of tcpdf) to use merging features. But we can disable it (this will break all merge features).
|
||||
if (empty($conf->global->MAIN_DISABLE_TCPDI)) require_once TCPDI_PATH.'tcpdi.php';
|
||||
else if (empty($conf->global->MAIN_DISABLE_FPDI)) require_once FPDI_PATH.'fpdi.php';
|
||||
|
||||
//$arrayformat=pdf_getFormat();
|
||||
//$format=array($arrayformat['width'],$arrayformat['height']);
|
||||
@ -146,7 +147,8 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
- print-high : Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this is not set, printing is limited to a low-level representation of the appearance, possibly of degraded quality.
|
||||
- owner : (inverted logic - only for public-key) when set permits change of encryption and enables all other permissions.
|
||||
*/
|
||||
if (class_exists('FPDI')) $pdf = new FPDI($pagetype,$metric,$format);
|
||||
if (class_exists('TCPDI')) $pdf = new TCPDI($pagetype,$metric,$format);
|
||||
else if (class_exists('FPDI')) $pdf = new FPDI($pagetype,$metric,$format);
|
||||
else $pdf = new TCPDF($pagetype,$metric,$format);
|
||||
// For TCPDF, we specify permission we want to block
|
||||
$pdfrights = array('modify','copy');
|
||||
@ -157,7 +159,8 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
}
|
||||
else
|
||||
{
|
||||
if (class_exists('FPDI')) $pdf = new FPDI($pagetype,$metric,$format);
|
||||
if (class_exists('TCPDI')) $pdf = new TCPDI($pagetype,$metric,$format);
|
||||
else if (class_exists('FPDI')) $pdf = new FPDI($pagetype,$metric,$format);
|
||||
else $pdf = new TCPDF($pagetype,$metric,$format);
|
||||
}
|
||||
|
||||
|
||||
@ -163,6 +163,38 @@ function task_prepare_head($object)
|
||||
return $head;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param string $mode Mode
|
||||
* @return array Array of tabs to show
|
||||
*/
|
||||
function project_timesheet_prepare_head($mode)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$h = 0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/projet/activity/perday.php".($mode?'?mode='.$mode:'');
|
||||
$head[$h][1] = $langs->trans("InputPerDay");
|
||||
$head[$h][2] = 'inputperday';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/projet/activity/pertime.php".($mode?'?mode='.$mode:'');
|
||||
$head[$h][1] = $langs->trans("InputPerTime");
|
||||
$head[$h][2] = 'inputpertime';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,null,$head,$h,'project_timesheet');
|
||||
|
||||
complete_head_from_modules($conf,$langs,null,$head,$h,'project_timesheet','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
@ -352,11 +384,16 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print dol_print_date($lines[$i]->date_end,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
$plannedworkloadoutputformat='allhourmin';
|
||||
$timespentoutputformat='allhourmin';
|
||||
if (! empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) $plannedworkloadoutputformat=$conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT;
|
||||
if (! empty($conf->global->PROJECT_TIMES_PENT_FORMAT)) $timespentoutputformat=$conf->global->PROJECT_TIME_SPENT_FORMAT;
|
||||
|
||||
// Planned Workload (in working hours)
|
||||
print '<td align="right">';
|
||||
$fullhour=convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
|
||||
$fullhour=convertSecondToTime($lines[$i]->planned_workload,$plannedworkloadoutputformat);
|
||||
$workingdelay=convertSecondToTime($lines[$i]->planned_workload,'all',86400,7); // TODO Replace 86400 and 7 to take account working hours per day and working day per weeks
|
||||
if ($lines[$i]->planned_workload)
|
||||
if ($lines[$i]->planned_workload != '')
|
||||
{
|
||||
print $fullhour;
|
||||
// TODO Add delay taking account of working hours per day and working day per week
|
||||
@ -367,14 +404,17 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
|
||||
// Progress declared
|
||||
print '<td align="right">';
|
||||
print $lines[$i]->progress.' %';
|
||||
if ($lines[$i]->progress != '')
|
||||
{
|
||||
print $lines[$i]->progress.' %';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Time spent
|
||||
print '<td align="right">';
|
||||
if ($showlineingray) print '<i>';
|
||||
else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.($showproject?'':'&withproject=1').'">';
|
||||
if ($lines[$i]->duration) print convertSecondToTime($lines[$i]->duration,'allhourmin');
|
||||
if ($lines[$i]->duration) print convertSecondToTime($lines[$i]->duration,$timespentoutputformat);
|
||||
else print '--:--';
|
||||
if ($showlineingray) print '</i>';
|
||||
else print '</a>';
|
||||
@ -440,7 +480,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
|
||||
|
||||
/**
|
||||
* Output a task line
|
||||
* Output a task line into a pertime intput mode
|
||||
*
|
||||
* @param string $inc ?
|
||||
* @param string $parent ?
|
||||
@ -452,7 +492,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
|
||||
* @return $inc
|
||||
*/
|
||||
function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0)
|
||||
function projectLinesPerTime(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0)
|
||||
{
|
||||
global $db, $user, $bc, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic;
|
||||
@ -504,25 +544,15 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
|
||||
|
||||
// Label task
|
||||
print "<td>";
|
||||
for ($k = 0 ; $k < $level ; $k++)
|
||||
{
|
||||
print " ";
|
||||
}
|
||||
for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
$taskstatic->id=$lines[$i]->id;
|
||||
$taskstatic->ref=$lines[$i]->label;
|
||||
print $taskstatic->getNomUrl(0);
|
||||
print "<br>";
|
||||
for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
print get_date_range($lines[$i]->date_start,$lines[$i]->date_end);
|
||||
print "</td>\n";
|
||||
|
||||
// Date start
|
||||
print '<td align="center">';
|
||||
print dol_print_date($lines[$i]->date_start,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Date end
|
||||
print '<td align="center">';
|
||||
print dol_print_date($lines[$i]->date_end,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Planned Workload
|
||||
print '<td align="right">';
|
||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
|
||||
@ -581,7 +611,158 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
|
||||
|
||||
$inc++;
|
||||
$level++;
|
||||
if ($lines[$i]->id) projectLinesb($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);
|
||||
if ($lines[$i]->id) projectLinesPerTime($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);
|
||||
$level--;
|
||||
}
|
||||
else
|
||||
{
|
||||
//$level--;
|
||||
}
|
||||
}
|
||||
|
||||
return $inc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Output a task line into a perday intput mode
|
||||
*
|
||||
* @param string $inc ?
|
||||
* @param string $parent ?
|
||||
* @param Task[] $lines ?
|
||||
* @param int $level ?
|
||||
* @param string $projectsrole ?
|
||||
* @param string $tasksrole ?
|
||||
* @param string $mine Show only task lines I am assigned to
|
||||
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
|
||||
* @return $inc
|
||||
*/
|
||||
function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0)
|
||||
{
|
||||
global $db, $user, $bc, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic;
|
||||
|
||||
if (! is_object($formother))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
$formother = new FormOther($db);
|
||||
}
|
||||
|
||||
$lastprojectid=0;
|
||||
|
||||
$var=true;
|
||||
|
||||
$numlines=count($lines);
|
||||
for ($i = 0 ; $i < $numlines ; $i++)
|
||||
{
|
||||
if ($parent == 0) $level = 0;
|
||||
|
||||
if ($lines[$i]->fk_parent == $parent)
|
||||
{
|
||||
// Break on a new project
|
||||
if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid)
|
||||
{
|
||||
$var = !$var;
|
||||
$lastprojectid=$lines[$i]->fk_project;
|
||||
}
|
||||
|
||||
// If we want all or we have a role on task, we show it
|
||||
if (empty($mine) || ! empty($tasksrole[$lines[$i]->id]))
|
||||
{
|
||||
print "<tr ".$bc[$var].">\n";
|
||||
|
||||
// Project
|
||||
print "<td>";
|
||||
$projectstatic->id=$lines[$i]->fk_project;
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
$projectstatic->public=$lines[$i]->public;
|
||||
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
// Ref
|
||||
print '<td>';
|
||||
$taskstatic->id=$lines[$i]->id;
|
||||
$taskstatic->ref=($lines[$i]->ref?$lines[$i]->ref:$lines[$i]->id);
|
||||
print $taskstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
// Label task
|
||||
print "<td>";
|
||||
for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
$taskstatic->id=$lines[$i]->id;
|
||||
$taskstatic->ref=$lines[$i]->label;
|
||||
print $taskstatic->getNomUrl(0);
|
||||
print "<br>";
|
||||
for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
print get_date_range($lines[$i]->date_start,$lines[$i]->date_end);
|
||||
print "</td>\n";
|
||||
|
||||
// Planned Workload
|
||||
print '<td align="right">';
|
||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
|
||||
else print '--:--';
|
||||
print '</td>';
|
||||
|
||||
// Progress declared %
|
||||
print '<td align="right">';
|
||||
print $formother->select_percent($lines[$i]->progress, $lines[$i]->id . 'progress');
|
||||
print '</td>';
|
||||
|
||||
// Time spent
|
||||
print '<td align="right">';
|
||||
if ($lines[$i]->duration)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration,'allhourmin');
|
||||
print '</a>';
|
||||
}
|
||||
else print '--:--';
|
||||
print "</td>\n";
|
||||
|
||||
$disabledproject=1;$disabledtask=1;
|
||||
//print "x".$lines[$i]->fk_project;
|
||||
//var_dump($lines[$i]);
|
||||
//var_dump($projectsrole[$lines[$i]->fk_project]);
|
||||
// If at least one role for project
|
||||
if ($lines[$i]->public || ! empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer)
|
||||
{
|
||||
$disabledproject=0;
|
||||
$disabledtask=0;
|
||||
}
|
||||
// If $restricteditformytask is on and I have no role on task, i disable edit
|
||||
if ($restricteditformytask && empty($tasksrole[$lines[$i]->id]))
|
||||
{
|
||||
$disabledtask=1;
|
||||
}
|
||||
|
||||
// Fields to add new time
|
||||
print '<td align="right">';
|
||||
print $langs->trans("FeatureNotYetAvailable");
|
||||
/*
|
||||
print '<td class="nowrap" align="right">';
|
||||
$s='';
|
||||
$s.=$form->select_date('',$lines[$i]->id,0,0,2,"addtime",1,0,1,$disabledtask);
|
||||
$s.=' ';
|
||||
$s.=$form->select_duration($lines[$i]->id,'',$disabledtask,'text',0,1);
|
||||
$s.=' <input type="submit" class="button"'.($disabledtask?' disabled="disabled"':'').' value="'.$langs->trans("Add").'">';
|
||||
print $s;
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
|
||||
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
|
||||
print '</td>';
|
||||
*/
|
||||
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
$inc++;
|
||||
$level++;
|
||||
if ($lines[$i]->id) projectLinesPerDay($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);
|
||||
$level--;
|
||||
}
|
||||
else
|
||||
@ -653,8 +834,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
||||
$project_year_filter=0;
|
||||
|
||||
$title=$langs->trans("Project");
|
||||
if ($statut == 0) $title=$langs->trans("ProjectDraft");
|
||||
if ($statut == 1) $title=$langs->trans("Project").' ('.$langs->trans("Validated").')';
|
||||
if ($statut != '' && $statut >= 0) $title=$langs->trans("Project").' ('.$langs->trans($projectstatic->statuts[$statut]).')';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -248,12 +248,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3700__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects', 'Activities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3701__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3702__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks/index.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3703__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/activity/list.php?leftmenu=projects', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3703__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/activity/perday.php?leftmenu=projects', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3800__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects&mode=mine', 'MyActivities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3801__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create&mode=mine', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3802__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks/index.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3803__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/activity/list.php?leftmenu=projects&mode=mine', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3803__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/activity/perday.php?leftmenu=projects&mode=mine', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
-- Tools
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3900__+MAX_llx_menu__, 'tools', 'mailing', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/card.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0, __ENTITY__);
|
||||
|
||||
@ -1158,13 +1158,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add("/projet/activity/index.php?mode=mine", $langs->trans("MyActivities"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/tasks.php?action=create&mode=mine", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/tasks/index.php?mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/list.php?mode=mine", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/activity/perday.php?mode=mine", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer);
|
||||
|
||||
// All project i have permission on
|
||||
$newmenu->add("/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/tasks.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/tasks/index.php", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/activity/perday.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -718,19 +718,20 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// If payment mode not forced or forced to VIR, show payment with BAN
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
|
||||
{
|
||||
if (! empty($conf->global->FACTURE_RIB_NUMBER))
|
||||
{
|
||||
$account = new Account($this->db);
|
||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
||||
if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER))
|
||||
{
|
||||
$bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank);
|
||||
$account = new Account($this->db);
|
||||
$account->fetch($bankid);
|
||||
|
||||
$curx=$this->marge_gauche;
|
||||
$cury=$posy;
|
||||
$curx=$this->marge_gauche;
|
||||
$cury=$posy;
|
||||
|
||||
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account,0,$default_font_size);
|
||||
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account,0,$default_font_size);
|
||||
|
||||
$posy+=2;
|
||||
}
|
||||
}
|
||||
$posy+=2;
|
||||
}
|
||||
}
|
||||
|
||||
return $posy;
|
||||
}
|
||||
|
||||
@ -354,6 +354,7 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_insert_id_array = array(); // store the last inserted auto_increment id for each table, so that dependent tables can be inserted with the appropriate id (eg: extrafields fk_object will be set with the last inserted object's id)
|
||||
// For each table to insert, me make a separate insert
|
||||
foreach($objimport->array_import_tables[0] as $alias => $tablename)
|
||||
{
|
||||
@ -590,7 +591,7 @@ class ImportCsv extends ModeleImports
|
||||
elseif (preg_match('/^lastrowid-/',$val))
|
||||
{
|
||||
$tmp=explode('-',$val);
|
||||
$lastinsertid=$this->db->last_insert_id($tmp[1]);
|
||||
$lastinsertid=(isset($last_insert_id_array[$tmp[1]]))?$last_insert_id_array[$tmp[1]]:0;
|
||||
$listfields.=preg_replace('/^'.preg_quote($alias).'\./','',$key);
|
||||
$listvalues.=$lastinsertid;
|
||||
//print $key."-".$val."-".$listfields."-".$listvalues."<br>";exit;
|
||||
@ -632,6 +633,7 @@ class ImportCsv extends ModeleImports
|
||||
if ($sql)
|
||||
{
|
||||
$resql=$this->db->query($sql);
|
||||
$last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that dependent tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr).
|
||||
if ($resql)
|
||||
{
|
||||
//print '.';
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE admin_extrafields.tpl.php -->
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_typeoffields(type)
|
||||
{
|
||||
var size = jQuery("#size");
|
||||
var unique = jQuery("#unique");
|
||||
var required = jQuery("#required");
|
||||
if (type == 'date') { size.val('').attr('disabled','disabled'); }
|
||||
else if (type == 'datetime') { size.val('').attr('disabled','disabled'); }
|
||||
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); }
|
||||
else if (type == 'int') { size.val('10').removeAttr('disabled'); }
|
||||
else if (type == 'text') { size.val('2000').removeAttr('disabled'); }
|
||||
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); }
|
||||
else if (type == 'boolean') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled');}
|
||||
else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled');}
|
||||
else size.val('').attr('disabled','disabled');
|
||||
}
|
||||
init_typeoffields();
|
||||
jQuery("#type").change(function() {
|
||||
init_typeoffields($(this).val());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- END PHP TEMPLATE admin_extrafields.tpl.php -->
|
||||
@ -112,4 +112,4 @@
|
||||
|
||||
</form>
|
||||
|
||||
<!-- END PHP TEMPLATE admin_extrafields.tpl.php -->
|
||||
<!-- END PHP TEMPLATE admin_extrafields_add.tpl.php -->
|
||||
|
||||
@ -121,4 +121,4 @@ if(($type == 'select') || ($type == 'sellist') || ($type == 'checkbox') || ($typ
|
||||
|
||||
</form>
|
||||
|
||||
<!-- END PHP TEMPLATE admin_extrafields.tpl.php -->
|
||||
<!-- END PHP TEMPLATE admin_extrafields_edit.tpl.php -->
|
||||
|
||||
72
htdocs/core/tpl/admin_extrafields_view.tpl.php
Normal file
72
htdocs/core/tpl/admin_extrafields_view.tpl.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* To call this template, you must define
|
||||
* $textobject
|
||||
* $langs
|
||||
* $extrafield
|
||||
* $elementtype
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
||||
<?php
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td align="center">'.$langs->trans("AlwaysEditable").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_alwayseditable[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
?>
|
||||
<!-- END PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
||||
@ -263,7 +263,8 @@ else {
|
||||
</td>
|
||||
<?php
|
||||
// Lines for extrafield
|
||||
if (!empty($extrafieldsline)) {
|
||||
if (!empty($extrafieldsline))
|
||||
{
|
||||
if ($this->table_element_line=='commandedet') {
|
||||
$newline = new OrderLine($this->db);
|
||||
}
|
||||
@ -276,6 +277,12 @@ else {
|
||||
elseif ($this->table_element_line=='contratdet') {
|
||||
$newline = new ContratLigne($this->db);
|
||||
}
|
||||
elseif ($this->table_element_line=='commande_fournisseurdet') {
|
||||
$newline = new CommandeFournisseurLigne($this->db);
|
||||
}
|
||||
elseif ($this->table_element_line=='facture_fourn_det') {
|
||||
$newline = new FactureFournisseurLigne($this->db);
|
||||
}
|
||||
if (is_object($newline)) {
|
||||
print $newline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8));
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
// Define colspan for button Add
|
||||
$colspan = 3; // Col total ht + col edit + col delete
|
||||
if (! empty($inputalsopricewithtax)) $colspan++; // We add 1 if col total ttc
|
||||
if (in_array($object->element,array('propal','facture','invoice','commande','order'))) $colspan++; // With this, there is a column move button
|
||||
if (in_array($object->element,array('propal','facture','invoice','commande','order','order_supplier','invoice_supplier'))) $colspan++; // With this, there is a column move button
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->
|
||||
@ -109,20 +109,18 @@ $coldisplay=-1; // We remove first td
|
||||
}
|
||||
|
||||
$coldisplay++;
|
||||
print '<td align="right"><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="' . price($line->subprice,0,'',0) . '" ';
|
||||
if ($this->situation_counter > 1) {
|
||||
print 'readonly="readonly" ';
|
||||
}
|
||||
print '<td align="right"><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly="readonly"';
|
||||
print '></td>';
|
||||
|
||||
if ($inputalsopricewithtax) {
|
||||
if ($inputalsopricewithtax)
|
||||
{
|
||||
$coldisplay++;
|
||||
print '<td align="right"><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="' . price($pu_ttc,0,'',0) . '"';
|
||||
if ($this->situation_counter > 1) {
|
||||
print 'readonly="readonly" ';
|
||||
}
|
||||
print '<td align="right"><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"';
|
||||
if ($this->situation_counter > 1) print ' readonly="readonly"';
|
||||
print '></td>';
|
||||
} ?>
|
||||
}
|
||||
?>
|
||||
|
||||
<td align="right"><?php $coldisplay++; ?>
|
||||
<?php if (($line->info_bits & 2) != 2) {
|
||||
@ -130,11 +128,9 @@ $coldisplay=-1; // We remove first td
|
||||
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
||||
// must also not be output for most entities (proposal, intervention, ...)
|
||||
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
||||
print '<input size="3" type="text" class="flat" name="qty" id="qty" value="' . $line->qty . '" ';
|
||||
if ($this->situation_counter > 1) {
|
||||
print 'readonly="readonly" ';
|
||||
}
|
||||
print '/>';
|
||||
print '<input size="3" type="text" class="flat" name="qty" id="qty" value="' . $line->qty . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly="readonly"';
|
||||
print '>';
|
||||
} else { ?>
|
||||
|
||||
<?php } ?>
|
||||
@ -142,11 +138,9 @@ $coldisplay=-1; // We remove first td
|
||||
|
||||
<td align="right" nowrap><?php $coldisplay++; ?>
|
||||
<?php if (($line->info_bits & 2) != 2) {
|
||||
print '<input size="1" type="text" class="flat" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '" ';
|
||||
if ($this->situation_counter > 1) {
|
||||
print 'readonly="readonly" ';
|
||||
}
|
||||
print '/>%';
|
||||
print '<input size="1" type="text" class="flat" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly="readonly"';
|
||||
print '>%';
|
||||
} else { ?>
|
||||
|
||||
<?php } ?>
|
||||
@ -189,7 +183,8 @@ $coldisplay=-1; // We remove first td
|
||||
$coldisplay++;
|
||||
}
|
||||
}
|
||||
} ?>
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- colspan=4 for this td because it replace total_ht+3 td for buttons -->
|
||||
<td align="center" colspan="<?php echo $colspan; ?>" valign="middle"><?php $coldisplay+=4; ?>
|
||||
@ -199,7 +194,8 @@ $coldisplay=-1; // We remove first td
|
||||
|
||||
<?php
|
||||
//Line extrafield
|
||||
if (!empty($extrafieldsline)) {
|
||||
if (!empty($extrafieldsline))
|
||||
{
|
||||
print $line->showOptionals($extrafieldsline,'edit',array('style'=>$bc[$var],'colspan'=>$coldisplay));
|
||||
}
|
||||
?>
|
||||
|
||||
@ -25,20 +25,21 @@
|
||||
* $langs
|
||||
* $dateSelector
|
||||
* $forceall (0 by default, 1 for supplier invoices/orders)
|
||||
* $element (used to test $user->rights->$element->creer)
|
||||
* $permtoedit (used to replace test $user->rights->$element->creer)
|
||||
* $senderissupplier (0 by default, 1 for supplier invoices/orders)
|
||||
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||
* $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
|
||||
*
|
||||
* $type, $text, $description, $line
|
||||
*/
|
||||
|
||||
$usemargins=0;
|
||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
|
||||
global $forceall, $senderissupplier, $inputalsopricewithtax;
|
||||
global $forceall, $senderissupplier, $inputalsopricewithtax, $usemargins;
|
||||
if (empty($dateSelector)) $dateSelector=0;
|
||||
if (empty($forceall)) $forceall=0;
|
||||
if (empty($senderissupplier)) $senderissupplier=0;
|
||||
if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
if (empty($usemargins)) $usemargins=0;
|
||||
|
||||
?>
|
||||
<?php $coldisplay=0; ?>
|
||||
@ -83,7 +84,8 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($line->fk_product > 0) {
|
||||
if ($line->fk_product > 0)
|
||||
{
|
||||
|
||||
echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
|
||||
|
||||
@ -96,7 +98,9 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
||||
else $text = img_object($langs->trans('Product'),'product');
|
||||
@ -118,10 +122,10 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo vatrate($line->tva_tx,'%',$line->info_bits); ?></td>
|
||||
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo (isset($line->pu_ht)?price($line->pu_ht):price($line->subprice)); ?></td>
|
||||
|
||||
<?php if ($inputalsopricewithtax) { ?>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?> </td>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
|
||||
<?php } ?>
|
||||
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?>
|
||||
@ -135,7 +139,11 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
</td>
|
||||
|
||||
<?php if (!empty($line->remise_percent) && $line->special_code != 3) { ?>
|
||||
<td align="right"><?php $coldisplay++; ?><?php echo dol_print_reduction($line->remise_percent,$langs); ?></td>
|
||||
<td align="right"><?php
|
||||
$coldisplay++;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
echo dol_print_reduction($line->remise_percent,$langs);
|
||||
?></td>
|
||||
<?php } else { ?>
|
||||
<td><?php $coldisplay++; ?> </td>
|
||||
<?php }
|
||||
@ -145,17 +153,19 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
print '<td align="right" nowrap="nowrap">' . $line->situation_percent . '%</td>';
|
||||
}
|
||||
|
||||
if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
|
||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
?>
|
||||
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||
{
|
||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
?>
|
||||
<td align="right" class="nowrap margininfos"><?php $coldisplay++; ?><?php echo price($line->pa_ht); ?></td>
|
||||
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) {?>
|
||||
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?>
|
||||
<td align="right" class="nowrap margininfos"><?php $coldisplay++; ?><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
|
||||
<?php
|
||||
}
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
|
||||
<?php }
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
|
||||
<td align="right" class="nowrap margininfos"><?php $coldisplay++; ?><?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
|
||||
<?php } } ?>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($line->special_code == 3) { ?>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
||||
@ -163,7 +173,7 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->total_ht); ?></td>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->statut == 0 && $user->rights->$element->creer) { ?>
|
||||
<?php if ($this->statut == 0 && ($user->rights->$element->creer || $permtoedit)) { ?>
|
||||
<td align="center"><?php $coldisplay++; ?>
|
||||
<?php if (($line->info_bits & 2) == 2) { ?>
|
||||
<?php } else { ?>
|
||||
|
||||
@ -718,6 +718,8 @@ class Cronjob extends CommonObject
|
||||
|
||||
$object=new Cronjob($this->db);
|
||||
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
@ -744,6 +746,8 @@ class Cronjob extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -63,7 +64,7 @@ $html = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$expensereporttmp=new ExpenseReport($db);
|
||||
|
||||
llxHeader('', $langs->trans("ListOfExpenseReports"));
|
||||
llxHeader('', $langs->trans("ListOfTrips"));
|
||||
|
||||
$max_year = 5;
|
||||
$min_year = 5;
|
||||
@ -302,7 +303,7 @@ if ($resql)
|
||||
print "</form>";
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a href="'.dol_buildpath('/expensereport/card.php',1).'?action=create" class="butAction">Ajouter une note de frais</a>';
|
||||
print '<a href="'.dol_buildpath('/expensereport/card.php',1).'?action=create" class="butAction">'.$langs->trans("NewTrip").'</a>';
|
||||
print '</div>';
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
@ -62,60 +62,18 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Interventions");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Interventions");
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
|
||||
|
||||
|
||||
$head=fichinter_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), 0, 'intervention');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td align="center">'.$langs->trans("AlwaysEditable").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_alwayseditable[$key])."</td>\n"; // TODO This must be generalised into all page to admin extrafield. Mutualize code here is easy and will save a lot of code
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -62,11 +62,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Interventions");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Interventions");
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
|
||||
|
||||
@ -75,45 +74,7 @@ $head=fichinter_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), 0, 'intervention');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -206,9 +206,9 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
// Extrafields
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$array_option = $extrafields->getOptionalsFromPost($extralabels);
|
||||
$array_options = $extrafields->getOptionalsFromPost($extralabels);
|
||||
|
||||
$object->array_options = $array_option;
|
||||
$object->array_options = $array_options;
|
||||
|
||||
$id = $object->create($user);
|
||||
|
||||
@ -288,7 +288,7 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
|
||||
|
||||
$result = $object->addline(
|
||||
@ -297,7 +297,7 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
$desc,
|
||||
$date_intervention,
|
||||
$duration,
|
||||
$array_option
|
||||
$array_options
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@ -327,9 +327,9 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
// Extrafields
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$array_option = $extrafields->getOptionalsFromPost($extralabels);
|
||||
$array_options = $extrafields->getOptionalsFromPost($extralabels);
|
||||
|
||||
$object->array_options = $array_option;
|
||||
$object->array_options = $array_options;
|
||||
|
||||
$result = $object->create($user);
|
||||
if ($result > 0)
|
||||
@ -470,7 +470,7 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
|
||||
$result=$object->addline(
|
||||
$user,
|
||||
@ -478,7 +478,7 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
|
||||
$desc,
|
||||
$date_intervention,
|
||||
$duration,
|
||||
$array_option
|
||||
$array_options
|
||||
);
|
||||
|
||||
// Define output language
|
||||
@ -568,8 +568,8 @@ else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST(
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$objectline->array_options = $array_option;
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$objectline->array_options = $array_options;
|
||||
|
||||
$result = $objectline->update($user);
|
||||
if ($result < 0)
|
||||
|
||||
@ -889,10 +889,10 @@ class Fichinter extends CommonObject
|
||||
* @param string $desc Line description
|
||||
* @param date $date_intervention Intervention date
|
||||
* @param int $duration Intervention duration
|
||||
* @param array $array_option Array option
|
||||
* @param array $array_options Array option
|
||||
* @return int >0 if ok, <0 if ko
|
||||
*/
|
||||
function addline($user,$fichinterid, $desc, $date_intervention, $duration, $array_option='')
|
||||
function addline($user,$fichinterid, $desc, $date_intervention, $duration, $array_options='')
|
||||
{
|
||||
dol_syslog(get_class($this)."::addline $fichinterid, $desc, $date_intervention, $duration");
|
||||
|
||||
@ -908,8 +908,8 @@ class Fichinter extends CommonObject
|
||||
$line->datei = $date_intervention;
|
||||
$line->duration = $duration;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
$line->array_options=$array_option;
|
||||
if (is_array($array_options) && count($array_options)>0) {
|
||||
$line->array_options=$array_options;
|
||||
}
|
||||
|
||||
$result=$line->insert($user);
|
||||
|
||||
@ -191,9 +191,10 @@ define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix);
|
||||
*/
|
||||
// Path to root libraries
|
||||
if (! defined('ADODB_PATH')) { define('ADODB_PATH', (!isset($dolibarr_lib_ADODB_PATH))?DOL_DOCUMENT_ROOT.'/includes/adodbtime/':(empty($dolibarr_lib_ADODB_PATH)?'':$dolibarr_lib_ADODB_PATH.'/')); }
|
||||
if (! defined('TCPDF_PATH')) { define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/tcpdf/':$dolibarr_lib_TCPDF_PATH.'/'); }
|
||||
if (! defined('FPDF_PATH')) { define('FPDF_PATH', (empty($dolibarr_lib_FPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/fpdf/':$dolibarr_lib_FPDF_PATH.'/'); } // Used only for package that can't include tcpdf
|
||||
if (! defined('TCPDF_PATH')) { define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/tcpdf/':$dolibarr_lib_TCPDF_PATH.'/'); }
|
||||
if (! defined('FPDI_PATH')) { define('FPDI_PATH', (empty($dolibarr_lib_FPDI_PATH))?DOL_DOCUMENT_ROOT.'/includes/fpdfi/':$dolibarr_lib_FPDI_PATH.'/'); }
|
||||
if (! defined('TCPDI_PATH')) { define('TCPDI_PATH', (empty($dolibarr_lib_TCPDI_PATH))?DOL_DOCUMENT_ROOT.'/includes/tcpdi/':$dolibarr_lib_TCPDI_PATH.'/'); }
|
||||
if (! defined('NUSOAP_PATH')) { define('NUSOAP_PATH', (!isset($dolibarr_lib_NUSOAP_PATH))?DOL_DOCUMENT_ROOT.'/includes/nusoap/lib/':(empty($dolibarr_lib_NUSOAP_PATH)?'':$dolibarr_lib_NUSOAP_PATH.'/')); }
|
||||
if (! defined('PHPEXCEL_PATH')) { define('PHPEXCEL_PATH', (!isset($dolibarr_lib_PHPEXCEL_PATH))?DOL_DOCUMENT_ROOT.'/includes/phpexcel/':(empty($dolibarr_lib_PHPEXCEL_PATH)?'':$dolibarr_lib_PHPEXCEL_PATH.'/')); }
|
||||
if (! defined('GEOIP_PATH')) { define('GEOIP_PATH', (!isset($dolibarr_lib_GEOIP_PATH))?DOL_DOCUMENT_ROOT.'/includes/geoip/':(empty($dolibarr_lib_GEOIP_PATH)?'':$dolibarr_lib_GEOIP_PATH.'/')); }
|
||||
|
||||
@ -214,13 +214,13 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql.= " l.qty,";
|
||||
$sql.= " l.tva_tx, l.remise_percent, l.subprice,";
|
||||
$sql.= " l.localtax1_tx, l. localtax2_tx, l.total_localtax1, l.total_localtax2,";
|
||||
$sql.= " l.total_ht, l.total_tva, l.total_ttc,";
|
||||
$sql.= " l.total_ht, l.total_tva, l.total_ttc, l.special_code, l.fk_parent_line, l.rang,";
|
||||
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc,";
|
||||
$sql.= " l.date_start, l.date_end";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
|
||||
$sql.= " WHERE l.fk_commande = ".$this->id;
|
||||
$sql.= " ORDER BY l.rowid";
|
||||
$sql.= " ORDER BY l.rang, l.rowid";
|
||||
//print $sql;
|
||||
|
||||
dol_syslog(get_class($this)."::fetch get lines", LOG_DEBUG);
|
||||
@ -267,6 +267,11 @@ class CommandeFournisseur extends CommonOrder
|
||||
$line->date_start = $this->db->jdate($objp->date_start);
|
||||
$line->date_end = $this->db->jdate($objp->date_end);
|
||||
|
||||
$this->special_line = $objp->special_line;
|
||||
$this->fk_parent_line = $objp->fk_parent_line;
|
||||
|
||||
$this->rang = $objp->rang;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@ -662,7 +667,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
if (! empty($conf->global->SUPPLIER_ORDER_AUTOADD_USER_CONTACT))
|
||||
{
|
||||
$result=$this->add_contact($user->id, 'SALESREPFOLL', 'internal', 1);
|
||||
if ($result < 0)
|
||||
if ($result < 0 && $result != -2) // -2 means already exists
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
@ -1044,7 +1049,9 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->db->begin();
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
$objFrom = dol_clone($this);
|
||||
@ -1080,7 +1087,9 @@ class CommandeFournisseur extends CommonOrder
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
// End
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
@ -1113,9 +1122,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
* @param bool $notrigger Disable triggers
|
||||
* @param int $date_start Date start of service
|
||||
* @param int $date_end Date end of service
|
||||
* @param array $array_options extrafields array
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null)
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null, $array_options=0)
|
||||
{
|
||||
global $langs,$mysoc;
|
||||
|
||||
@ -1250,7 +1260,19 @@ class CommandeFournisseur extends CommonOrder
|
||||
{
|
||||
$this->rowid = $this->db->last_insert_id(MAIN_DB_PREFIX.'commande_fournisseurdet');
|
||||
|
||||
if (! $notrigger)
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$linetmp = new CommandeFournisseurLigne($this->db);
|
||||
$linetmp->id=$this->rowid;
|
||||
$linetmp->array_options = $array_options;
|
||||
$result=$linetmp->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
// Call trigger
|
||||
@ -1389,51 +1411,53 @@ class CommandeFournisseur extends CommonOrder
|
||||
*
|
||||
* @param int $idline Id of line to delete
|
||||
* @param int $notrigger 1=Disable call to triggers
|
||||
* @return >=0 if OK, <0 if KO
|
||||
* @return <0 if KO, >0 if OK
|
||||
*/
|
||||
function deleteline($idline, $notrigger=0)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
if ($this->statut == 0)
|
||||
|
||||
if ($this->statut != 0)
|
||||
{
|
||||
$this->db->begin();
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (! $notrigger)
|
||||
$this->db->begin();
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINEORDER_SUPPLIER_DELETE',$user);
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid = ".$idline;
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
dol_syslog(get_class($this)."::deleteline sql=".$sql);
|
||||
if (! $resql)
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINEORDER_SUPPLIER_DELETE',$user);
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid = ".$idline;
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $error)
|
||||
{
|
||||
$result=$this->update_price();
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::deleteline sql=".$sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$this->update_price();
|
||||
|
||||
$this->db->commit();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -1755,23 +1779,24 @@ class CommandeFournisseur extends CommonOrder
|
||||
/**
|
||||
* Update line
|
||||
*
|
||||
* @param int $rowid Id de la ligne de facture
|
||||
* @param string $desc Description de la ligne
|
||||
* @param double $pu Prix unitaire
|
||||
* @param double $qty Quantity
|
||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||
* @param double $txtva Taux TVA
|
||||
* @param double $txlocaltax1 Localtax1 tax
|
||||
* @param double $txlocaltax2 Localtax2 tax
|
||||
* @param double $price_base_type Type of price base
|
||||
* @param int $info_bits Miscellaneous informations
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param timestamp $date_start Date start of service
|
||||
* @param timestamp $date_end Date end of service
|
||||
* @return int < 0 if error, > 0 if ok
|
||||
* @param int $rowid Id de la ligne de facture
|
||||
* @param string $desc Description de la ligne
|
||||
* @param double $pu Prix unitaire
|
||||
* @param double $qty Quantity
|
||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||
* @param double $txtva Taux TVA
|
||||
* @param double $txlocaltax1 Localtax1 tax
|
||||
* @param double $txlocaltax2 Localtax2 tax
|
||||
* @param double $price_base_type Type of price base
|
||||
* @param int $info_bits Miscellaneous informations
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param timestamp $date_start Date start of service
|
||||
* @param timestamp $date_end Date end of service
|
||||
* @param array $array_options extrafields array
|
||||
* @return int < 0 if error, > 0 if ok
|
||||
*/
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $notrigger=false, $date_start='', $date_end='')
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $notrigger=false, $date_start='', $date_end='', $array_options=0)
|
||||
{
|
||||
global $mysoc;
|
||||
dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type");
|
||||
@ -1848,8 +1873,19 @@ class CommandeFournisseur extends CommonOrder
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->rowid = $rowid;
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$tmpline = new CommandeFournisseurLigne($this->db);
|
||||
$tmpline->id=$this->rowid;
|
||||
$tmpline->array_options = $array_options;
|
||||
$result=$tmpline->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $notrigger)
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
// Call trigger
|
||||
@ -1863,14 +1899,25 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
|
||||
// Mise a jour info denormalisees au niveau facture
|
||||
$this->update_price('','auto');
|
||||
if (! $error)
|
||||
{
|
||||
$this->update_price('','auto');
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return $result;
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
@ -2138,17 +2185,22 @@ class CommandeFournisseur extends CommonOrder
|
||||
*/
|
||||
function getMaxDeliveryTimeDay($langs)
|
||||
{
|
||||
if (empty($this->lines)) return $langs->trans('Undefined');
|
||||
if (empty($this->lines)) return '';
|
||||
|
||||
$obj = new ProductFournisseur($this->db);
|
||||
|
||||
$nb = 0;
|
||||
foreach ($this->lines as $line) {
|
||||
$obj = new ProductFournisseur($this->db);
|
||||
$idp = $obj->find_min_price_product_fournisseur($line->fk_product, $line->qty);
|
||||
if ($idp) {
|
||||
$obj->fetch($idp);
|
||||
if ($obj->delivery_time_days > $nb) $nb = $obj->delivery_time_days;
|
||||
foreach ($this->lines as $line)
|
||||
{
|
||||
if ($line->fk_product > 0)
|
||||
{
|
||||
$idp = $obj->find_min_price_product_fournisseur($line->fk_product, $line->qty);
|
||||
if ($idp)
|
||||
{
|
||||
$obj->fetch($idp);
|
||||
if ($obj->delivery_time_days > $nb) $nb = $obj->delivery_time_days;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($nb === 0) return $langs->trans('Undefined');
|
||||
@ -2163,6 +2215,14 @@ class CommandeFournisseur extends CommonOrder
|
||||
*/
|
||||
class CommandeFournisseurLigne extends CommonOrderLine
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
|
||||
public $element='commande_fournisseurdet';
|
||||
public $table_element='commande_fournisseurdet';
|
||||
|
||||
var $oldline;
|
||||
|
||||
// From llx_commandedet
|
||||
var $qty;
|
||||
var $tva_tx;
|
||||
|
||||
@ -450,7 +450,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$result=$this->fetch_lines();
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -3;
|
||||
}
|
||||
|
||||
@ -482,11 +482,12 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx, f.tva';
|
||||
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits';
|
||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line';
|
||||
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
||||
$sql.= ' WHERE fk_facture_fourn='.$this->id;
|
||||
$sql.= ' ORDER BY f.rang, f.rowid';
|
||||
|
||||
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
|
||||
$resql_rows = $this->db->query($sql);
|
||||
@ -500,7 +501,9 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql_rows);
|
||||
|
||||
$this->lines[$i] = new stdClass();
|
||||
$this->lines[$i] = new FactureFournisseurLigne($this->db);
|
||||
|
||||
$this->lines[$i]->id = $obj->rowid;
|
||||
$this->lines[$i]->rowid = $obj->rowid;
|
||||
$this->lines[$i]->description = $obj->description;
|
||||
$this->lines[$i]->product_ref = $obj->product_ref; // Internal reference
|
||||
@ -523,7 +526,10 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->lines[$i]->total_ttc = $obj->total_ttc;
|
||||
$this->lines[$i]->fk_product = $obj->fk_product;
|
||||
$this->lines[$i]->product_type = $obj->product_type;
|
||||
$this->lines[$i]->info_bits = $obj->info_bits;
|
||||
$this->lines[$i]->info_bits = $obj->info_bits;
|
||||
$this->lines[$i]->fk_parent_line = $obj->fk_parent_line;
|
||||
$this->lines[$i]->special_code = $obj->special_code;
|
||||
$this->lines[$i]->rang = $obj->rang;
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -1109,11 +1115,12 @@ class FactureFournisseur extends CommonInvoice
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $rang Position of line
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param array $array_options extrafields array
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*
|
||||
* FIXME Add field ref (that should be named ref_supplier) and label into update. For example can be filled when product line created from order.
|
||||
*/
|
||||
function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false)
|
||||
function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false, $array_options=0)
|
||||
{
|
||||
dol_syslog(get_class($this)."::addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits,$price_base_type,$type", LOG_DEBUG);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
@ -1150,7 +1157,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
|
||||
|
||||
$result=$this->updateline($idligne, $desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product, $price_base_type, $info_bits, $type, $remise_percent, true);
|
||||
$result=$this->updateline($idligne, $desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product, $price_base_type, $info_bits, $type, $remise_percent, true, '', '', $array_options);
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->rowid = $idligne;
|
||||
@ -1189,22 +1196,25 @@ class FactureFournisseur extends CommonInvoice
|
||||
/**
|
||||
* Update a line detail into database
|
||||
*
|
||||
* @param int $id Id of line invoice
|
||||
* @param string $desc Description of line
|
||||
* @param double $pu Prix unitaire (HT ou TTC selon price_base_type)
|
||||
* @param double $vatrate VAT Rate
|
||||
* @param double $txlocaltax1 LocalTax1 Rate
|
||||
* @param double $txlocaltax2 LocalTax2 Rate
|
||||
* @param double $qty Quantity
|
||||
* @param int $idproduct Id produit
|
||||
* @param double $price_base_type HT or TTC
|
||||
* @param int $info_bits Miscellaneous informations of line
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||
* @param int $notrigger Disable triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param int $id Id of line invoice
|
||||
* @param string $desc Description of line
|
||||
* @param double $pu Prix unitaire (HT ou TTC selon price_base_type)
|
||||
* @param double $vatrate VAT Rate
|
||||
* @param double $txlocaltax1 LocalTax1 Rate
|
||||
* @param double $txlocaltax2 LocalTax2 Rate
|
||||
* @param double $qty Quantity
|
||||
* @param int $idproduct Id produit
|
||||
* @param double $price_base_type HT or TTC
|
||||
* @param int $info_bits Miscellaneous informations of line
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param timestamp $date_start Date start of service
|
||||
* @param timestamp $date_end Date end of service
|
||||
* @param array $array_options extrafields array
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false)
|
||||
function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0)
|
||||
{
|
||||
global $mysoc;
|
||||
dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent", LOG_DEBUG);
|
||||
@ -1285,7 +1295,19 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$this->rowid = $id;
|
||||
|
||||
if (! $notrigger)
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$linetmp = new FactureFournisseurLigne($this->db);
|
||||
$linetmp->id=$this->rowid;
|
||||
$linetmp->array_options = $array_options;
|
||||
$result=$linetmp->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
// Call trigger
|
||||
@ -1301,9 +1323,16 @@ class FactureFournisseur extends CommonInvoice
|
||||
// Update total price into invoice record
|
||||
$result=$this->update_price('','auto');
|
||||
|
||||
$this->db->commit();
|
||||
|
||||
return $result;
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1318,7 +1347,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
*
|
||||
* @param int $rowid Id of line to delete
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return void
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function deleteline($rowid, $notrigger=0)
|
||||
{
|
||||
@ -1356,7 +1385,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
if (! $error)
|
||||
{
|
||||
// Mise a jour prix facture
|
||||
$this->update_price();
|
||||
$result=$this->update_price();
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -1716,7 +1745,9 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
$object=new FactureFournisseur($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
$object->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Load source object
|
||||
$object->fetch($fromid);
|
||||
@ -1762,6 +1793,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
}
|
||||
|
||||
unset($object->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
@ -1810,3 +1843,35 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage line invoices
|
||||
*/
|
||||
class FactureFournisseurLigne extends CommonInvoice
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
|
||||
var $pu_ht;
|
||||
var $pu_ttc;
|
||||
|
||||
public $element='facture_fourn_det';
|
||||
public $table_element='facture_fourn_det';
|
||||
|
||||
var $oldline;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db= $db;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -485,14 +485,20 @@ class ProductFournisseur extends Product
|
||||
/**
|
||||
* Load properties for minimum price
|
||||
*
|
||||
* @param int $prodid Product id
|
||||
* @param int $qty Minimum quantity
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param int $prodid Product id
|
||||
* @param int $qty Minimum quantity
|
||||
* @return int <0 if KO, 0=Not found of no product id provided, >0 if OK
|
||||
*/
|
||||
function find_min_price_product_fournisseur($prodid, $qty=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($prodid))
|
||||
{
|
||||
dol_syslog("Warning function find_min_price_product_fournisseur were called with prodid empty. May be a bug.", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->product_fourn_price_id = '';
|
||||
$this->product_fourn_id = '';
|
||||
$this->fourn_ref = '';
|
||||
@ -582,7 +588,7 @@ class ProductFournisseur extends Product
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -457,11 +457,11 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td align="right">';
|
||||
if (count($listwarehouses)>1)
|
||||
{
|
||||
print $form->selectarray("entrepot".$suffix, $listwarehouses, '', 1, 0, 0, '', 0, 0, $disabled);
|
||||
print $form->selectarray("entrepot".$suffix, $listwarehouses, GETPOST("entrepot".$suffix), 1, 0, 0, '', 0, 0, $disabled);
|
||||
}
|
||||
elseif (count($listwarehouses)==1)
|
||||
{
|
||||
print $form->selectarray("entrepot".$suffix, $listwarehouses, '', 0, 0, 0, '', 0, 0, $disabled);
|
||||
print $form->selectarray("entrepot".$suffix, $listwarehouses, GETPOST("entrepot".$suffix), 0, 0, 0, '', 0, 0, $disabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -199,7 +199,14 @@ class pdf_parser
|
||||
|
||||
// Read xref-Data
|
||||
$this->_xref = array();
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
try {
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
print $e->getMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
// Check for Encryption
|
||||
$this->getEncryption();
|
||||
|
||||
@ -1,6 +1,68 @@
|
||||
6.2.6 (2015-01-28)
|
||||
- Bug #1008 "UTC offset sing breaks PDF/A-1b compliance" was fixed.
|
||||
|
||||
6.2.5 (2015-01-24)
|
||||
- Bug #1019 "$this in static context" was fixed.
|
||||
- Bug #1015 "Infinite loop in getIndirectObject method of parser" was fixed.
|
||||
|
||||
6.2.4 (2015-01-08)
|
||||
- fix warning related to empty K_PATH_URL.
|
||||
- fix error when a $table_colwidths key is not set.
|
||||
|
||||
6.2.3 (2014-12-18)
|
||||
- New comment.
|
||||
- Moved the K_PATH_IMAGES definition in tcpdf_autoconfig.
|
||||
|
||||
6.2.2 (2014-12-18)
|
||||
- Fixed mispelled words.
|
||||
- Fixed version number.
|
||||
|
||||
6.2.1 (2014-12-18)
|
||||
- The constant K_TCPDF_THROW_EXCEPTION_ERROR is now set to false in the default configuration file.
|
||||
- An issue with the _destroy() method was fixed.
|
||||
|
||||
6.2.0 (2014-12-10)
|
||||
- Bug #1005 "Security Report, LFI posting internal files externally abusing default parameter" was fixed.
|
||||
- Static methods serializeTCPDFtagParameters() and unserializeTCPDFtagParameters() were moved as non static to the main TCPDF class (see changes in example n. 49).
|
||||
- Deprecated methods were removed, please use the equivalents defined in other classes (i.e. TCPDF_STATIC and TCPDF_FONTS).
|
||||
- The constant K_TCPDF_CALLS_IN_HTML is now set by default to FALSE.
|
||||
- DLE, DLX and DLP page format was added.
|
||||
- Page format are now defined as a public property in TCPDF_STATIC.
|
||||
|
||||
6.1.1 (2014-12-09)
|
||||
- Fixed bug with the register_shutdown_function().
|
||||
|
||||
6.1.0 (2014-12-07)
|
||||
- The method TCPDF_STATIC::getRandomSeed() was improved.
|
||||
- The disk caching feature was removed.
|
||||
- Bug #1003 "Backslashes become duplicated in table, using WriteHTML" was fixed.
|
||||
- Bug #1002 "SVG radialGradient within non-square Rect" was fixed.
|
||||
|
||||
6.0.099 (2014-11-15)
|
||||
- Added basic support for nested SVG images (adapted PR from SamMousa).
|
||||
- A bug related to setGDImageTransparency() was fixed (thanks to Maarten Boerema).
|
||||
|
||||
6.0.098 (2014-11-08)
|
||||
- Bug item #996 "getCharBBox($char) returns incorrect results for TTF glyphs without outlines" was fixed.
|
||||
- Bug item #991 "Text problem with SVG" was fixed (only the font style part).
|
||||
|
||||
6.0.097 (2014-10-20)
|
||||
- Bug item #988 "hyphenateText - charmin parameter not work" was fixed.
|
||||
- New 1D barcode method to print pre-formatted IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200.
|
||||
|
||||
6.0.096 (2014-10-06)
|
||||
- Bug item #982 "Display style is not inherited in SVG" was fixed.
|
||||
- Bug item #984 "Double quote url in CSS" was fixed.
|
||||
|
||||
6.0.095 (2014-10-02)
|
||||
- Bug item #979 "New Timezone option overwriting current timezone" was fixed.
|
||||
|
||||
6.0.094 (2014-09-30)
|
||||
- Bug item #978 "Variable Undefined: $cborder" was fixed.
|
||||
|
||||
6.0.093 (2014-09-02)
|
||||
- Security fix: some serialize/unserialize methods were replaced with json_encode/json_decode to avoid a potential object injection with user supplied content. Thanks to ownCloud Inc. for reporting this issue.
|
||||
- K_TIMEZONE constant was added to the default configuration to supress date-time warnings.
|
||||
- K_TIMEZONE constant was added to the default configuration to suppress date-time warnings.
|
||||
|
||||
6.0.092 (2014-09-01)
|
||||
- Bug item #956 "Monospaced fonts are not alignd at the baseline" was fixed.
|
||||
@ -355,7 +417,7 @@
|
||||
- Image method was improved.
|
||||
|
||||
5.9.208 (2013-03-15)
|
||||
- objclone fuction was patched to support old imagick extensions.
|
||||
- objclone function was patched to support old imagick extensions.
|
||||
- tcpdf_parser was improved to support Cross-Reference Streams and large streams.
|
||||
|
||||
5.9.207 (2013-03-04)
|
||||
@ -432,7 +494,7 @@
|
||||
- barcodes.php file was resynced.
|
||||
- Methods SetAbsX, SetAbsY, SetAbsXY where added to set the absolute pointer coordinates.
|
||||
- Method getCharBBox were added to get single character bounding box.
|
||||
- Signature of addTTFfont method was changed ($addcbbox paramter was added).
|
||||
- Signature of addTTFfont method was changed ($addcbbox parameter was added).
|
||||
|
||||
5.9.185 (2012-09-12)
|
||||
- Method _putfontwidths() was fixed.
|
||||
@ -834,7 +896,7 @@
|
||||
|
||||
5.9.080 (2011-05-17)
|
||||
- A problem related to file path calculation for images was fixed.
|
||||
- A problem related to unsupressed getimagesize() error was fixed.
|
||||
- A problem related to unsuppressed getimagesize() error was fixed.
|
||||
|
||||
5.9.079 (2011-05-16)
|
||||
- Footer() method was changed to use C128 barcode as default (instead of the previous C128B).
|
||||
@ -1188,7 +1250,7 @@
|
||||
- Alignment problem on write2DBarcode was fixed.
|
||||
|
||||
5.8.015 (2010-08-24)
|
||||
- A problem arised with the latest bugfix was fixed.
|
||||
- A problem arose with the latest bugfix was fixed.
|
||||
|
||||
5.8.014 (2010-08-23)
|
||||
- Method _getxobjectdict() was added for better compatibility with external extensions.
|
||||
@ -1650,7 +1712,7 @@
|
||||
- Bug item #2938412 "Table related problems - thead, nobr, table width" was fixed.
|
||||
|
||||
4.8.026 (2010-01-19)
|
||||
- The misspelled word "lenght" was replaced with "length" in some variables and comments.
|
||||
- The misspelled word "length" was replaced with "length" in some variables and comments.
|
||||
|
||||
4.8.025 (2010-01-18)
|
||||
- addExtGState() method was improved to reuse existing ExtGState objects.
|
||||
@ -1732,7 +1794,7 @@
|
||||
4.8.006 (2009-09-23)
|
||||
- Bug item #2864522 "No images if DOCUMENT_ROOT=='/'" was fixed.
|
||||
- Support for text-indent CSS attribute was added.
|
||||
- Method rollbackTransaction() was changed to support self-reassigment of previous object (check source code documentation).
|
||||
- Method rollbackTransaction() was changed to support self-reassignment of previous object (check source code documentation).
|
||||
- Support for the HTML "nobr" attribute was added to avoid splitting a table or a table row on two pages (i.e.: <tr nobr="true">...</tr>).
|
||||
|
||||
4.8.005 (2009-09-17)
|
||||
@ -1903,7 +1965,7 @@
|
||||
- WARNING: THIS VERSION CHANGES THE BEHAVIOUR OF $x and $y parameters for several TCPDF methods:
|
||||
zero coordinates for $x and $y are now valid coordinates;
|
||||
set $x and $y as empty strings to get the current value.
|
||||
- Some error caused by 'empty' funtion were fixed.
|
||||
- Some error caused by 'empty' function were fixed.
|
||||
- Default color for convertHTMLColorToDec() method was changed to white and the return value for invalid color is false.
|
||||
- HTML on footer bug was fixed.
|
||||
- The following examples were fixed: 5,7,10,17,19,20,21,33,42,43.
|
||||
@ -1922,8 +1984,8 @@
|
||||
C128A : CODE 128 A
|
||||
C128B : CODE 128 B
|
||||
C128C : CODE 128 C
|
||||
EAN2 : 2-Digits UPC-Based Extention
|
||||
EAN5 : 5-Digits UPC-Based Extention
|
||||
EAN2 : 2-Digits UPC-Based Extension
|
||||
EAN5 : 5-Digits UPC-Based Extension
|
||||
EAN8 : EAN 8
|
||||
EAN13 : EAN 13
|
||||
UPCA : UPC-A
|
||||
|
||||
@ -8,11 +8,11 @@ http://sourceforge.net/donate/index.php?group_id=128076
|
||||
------------------------------------------------------------
|
||||
|
||||
Name: TCPDF
|
||||
Version: 6.0.093
|
||||
Release date: 2014-09-02
|
||||
Version: 6.2.6
|
||||
Release date: 2015-01-28
|
||||
Author: Nicola Asuni
|
||||
|
||||
Copyright (c) 2002-2014:
|
||||
Copyright (c) 2002-2015:
|
||||
Nicola Asuni
|
||||
Tecnick.com LTD
|
||||
www.tecnick.com
|
||||
@ -35,7 +35,7 @@ Main Features:
|
||||
* methods to publish some XHTML + CSS code, Javascript and Forms;
|
||||
* images, graphic (geometric figures) and transformation methods;
|
||||
* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http: www.imagemagick.org/www/formats.html)
|
||||
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
|
||||
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
|
||||
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||
* automatic page header and footer management;
|
||||
* document encryption up to 256 bit and digital signature certifications;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tecnick.com/tcpdf",
|
||||
"version": "6.0.093",
|
||||
"version": "6.2.6",
|
||||
"homepage": "http://www.tcpdf.org/",
|
||||
"type": "library",
|
||||
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
//============================================================+
|
||||
// File name : tcpdf_config.php
|
||||
// Begin : 2004-06-11
|
||||
// Last Update : 2014-09-02
|
||||
// Last Update : 2014-12-11
|
||||
//
|
||||
// Description : Configuration file for TCPDF.
|
||||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||
@ -210,7 +210,7 @@ define('K_THAI_TOPCHARS', true);
|
||||
* If true allows to call TCPDF methods using HTML syntax
|
||||
* IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
|
||||
*/
|
||||
define('K_TCPDF_CALLS_IN_HTML', true);
|
||||
define('K_TCPDF_CALLS_IN_HTML', false);
|
||||
|
||||
/**
|
||||
* If true and PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
|
||||
|
||||
343
htdocs/includes/tcpdf/fonts/ae_fonts_2.0/COPYING
Normal file
343
htdocs/includes/tcpdf/fonts/ae_fonts_2.0/COPYING
Normal file
@ -0,0 +1,343 @@
|
||||
-* www.gnu.org *-
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
||||
863
htdocs/includes/tcpdf/fonts/ae_fonts_2.0/ChangeLog
Normal file
863
htdocs/includes/tcpdf/fonts/ae_fonts_2.0/ChangeLog
Normal file
@ -0,0 +1,863 @@
|
||||
2007-08-20 00:48 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Diagonal marks
|
||||
|
||||
2007-08-20 00:25 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* README: Added Release notes, preparing for 2.0 release.
|
||||
|
||||
2007-08-19 23:19 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Stack diacritics definition
|
||||
|
||||
2007-08-19 22:56 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Tholoth.sfd:
|
||||
* Added 'rlg' lookup table and subtable and registered stacked
|
||||
diacritic ligatures.
|
||||
* kasrah and kasratan were too close to the base glyph, fixed.
|
||||
|
||||
2007-08-19 22:28 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlHor.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
|
||||
ae_AlYarmook.sfd, ae_Arab.sfd, ae_Cortoba.sfd, ae_Furat.sfd,
|
||||
ae_Graph.sfd, ae_Kayrawan.sfd, ae_Khalid.sfd, ae_Mashq-Bold.sfd,
|
||||
ae_Mashq.sfd, ae_Metal.sfd, ae_Nada.sfd, ae_Nagham.sfd,
|
||||
ae_Ostorah.sfd, ae_Ouhod-Bold.sfd, ae_Petra.sfd,
|
||||
ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd,
|
||||
ae_Sharjah.sfd, ae_Sindbad.sfd, ae_Tarablus.sfd: Scaled up
|
||||
diacritic glyphs, this makes them more readable.
|
||||
|
||||
2007-08-19 22:03 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: New sukun, removed wrong anchors from
|
||||
kasrah
|
||||
|
||||
2007-08-19 20:26 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd: Added 'rlg' lookup table and subtable
|
||||
and registered stacked diacritic ligatures.
|
||||
|
||||
2007-08-19 18:28 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd: Fixed shaddas
|
||||
|
||||
2007-08-19 18:01 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd: Stacked diacrititcs
|
||||
|
||||
2007-08-19 14:49 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Removed mark2mark anchors, now we use
|
||||
ligature substitution for stacked diacritics instead of anchors.
|
||||
Added 'rlg' lookup table and subtable and registered stacked
|
||||
diacritic ligatures.
|
||||
|
||||
2007-08-19 02:30 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Stacked diacritics added
|
||||
|
||||
2007-08-19 01:53 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ArabicReesha.sfd:
|
||||
* Added to new ligatures; <fathatan><alef isolated> and
|
||||
<fathatan><alef final>.
|
||||
* Small fixes to Jeem isolated width.
|
||||
|
||||
2007-08-18 21:30 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd: Diacritics fixed except allahisolated
|
||||
ligature
|
||||
|
||||
2007-08-18 20:13 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd: Removed old, buggy, anchors and auto
|
||||
added new ones, needs manual editing.
|
||||
|
||||
2007-08-18 19:11 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd: New shadda, modified sukun to meet the
|
||||
other marks
|
||||
|
||||
2007-08-18 17:20 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: New diacritics for ae_AlArabiya.sfd
|
||||
|
||||
2007-08-17 23:19 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Tholoth.sfd: ae_Tholoth.sfd: Added glyphs U+FC5E - U+FC62.
|
||||
|
||||
2007-08-16 14:56 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMohanad.sfd: AlMohanad: Fixed U+FEDA (kaf final) to take
|
||||
the shape of ordinary final kaf rather than the long variant.
|
||||
|
||||
2007-08-15 14:25 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ArabicReesha.sfd: ArabicReesha.sfd: Fixed a bug that caused
|
||||
some isolated glyphs to have more space to the right.
|
||||
|
||||
2007-08-15 12:02 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd, ae_AlYarmook.sfd,
|
||||
ae_Electron.sfd, ae_Hani.sfd, ae_Haramain.sfd, ae_Khalid.sfd,
|
||||
ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Sharjah.sfd,
|
||||
ae_Tarablus.sfd, ae_Tholoth.sfd: Add new 'liga' table without
|
||||
"Ignore Combining Marks" flag, allahisolated ligature belong to that
|
||||
table now, so when allahisolated has a tashkil on it, the ligature
|
||||
will be ignored and will use normal glyphs instead.
|
||||
|
||||
2007-08-15 11:05 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Granada.sfd, ae_Graph.sfd, ae_Haramain.sfd,
|
||||
ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd, ae_Sindbad.sfd,
|
||||
ae_Tarablus.sfd: Added "Ignore Combining Marks flag" to 'liga'
|
||||
table.
|
||||
|
||||
2007-08-15 10:35 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ArabicReesha.sfd: ArabicReesha: New font based on SIL's
|
||||
Scheherazade, first version.
|
||||
|
||||
2007-08-15 00:23 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Shadda was missing mark2mark below anchor.
|
||||
|
||||
2007-08-14 23:28 Mohammed Adnene Trojette <adn@diwi.org>
|
||||
|
||||
* Makefile: GPL has been removed
|
||||
|
||||
2007-08-14 23:21 Mohammed Adnene Trojette <adn@diwi.org>
|
||||
|
||||
* COPYING, README: Copyright informations
|
||||
|
||||
2007-08-14 23:05 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* COPYING: Updated to refer to FreeFonts project.
|
||||
|
||||
2007-08-14 22:56 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Salem.sfd: Updated the copyright statement, to mention GPL
|
||||
font exception and FreeFonts project, again
|
||||
|
||||
2007-08-14 22:43 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Salem.sfd: Revert to 1.7 and added Allah anchors(again).
|
||||
|
||||
2007-08-14 21:35 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Tholoth.sfd: Minor positioning fix
|
||||
|
||||
2007-08-14 21:12 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Tholoth.sfd: Added missed U+0647.
|
||||
|
||||
2007-08-14 18:37 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
|
||||
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
|
||||
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
|
||||
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Furat.sfd,
|
||||
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
|
||||
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
|
||||
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
|
||||
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
|
||||
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
|
||||
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: Updated the
|
||||
copyright statement, to mention GPL font exception and FreeFonts
|
||||
project.
|
||||
|
||||
2007-08-13 22:18 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlManzomah.sfd,
|
||||
ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd, ae_AlMothnna-Bold.sfd,
|
||||
ae_Arab.sfd, ae_Cortoba.sfd, ae_Electron.sfd, ae_Furat.sfd,
|
||||
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
|
||||
ae_Hor.sfd, ae_Jet.sfd, ae_Kayrawan.sfd, ae_Mashq-Bold.sfd,
|
||||
ae_Mashq.sfd, ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd,
|
||||
ae_Ostorah.sfd, ae_Ouhod-Bold.sfd, ae_Petra.sfd,
|
||||
ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd,
|
||||
ae_Sharjah.sfd, ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd:
|
||||
* Add missed mark2mark anchors in the affected files, though we
|
||||
aren't going to use this on the long run, but I'll leave that task
|
||||
for 2.1 .
|
||||
* Reencoded all files to unicode glyph map.
|
||||
|
||||
2007-08-13 14:47 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Petra.sfd, ae_Shado.sfd: ae_Petra.sfd, ae_Shado.sfd:
|
||||
Full support for diacritics positioning by Osama Khalid.
|
||||
|
||||
2007-08-13 10:38 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Hor.sfd, ae_Sharjah.sfd:
|
||||
* ae_Hor: Full support for diacritics positioning by Fahd.
|
||||
* ae_Sharjah: Full support for diacritics positioning by Fahd.
|
||||
|
||||
2007-08-13 05:34 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/: ae_Nice.sfd, ae_Tarablus.sfd: Full diacritics supports,
|
||||
needs a check
|
||||
|
||||
2007-08-13 05:24 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Nagham.sfd: Full diacritics supports, needs a check
|
||||
|
||||
2007-08-13 05:08 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Haramain.sfd: Full diacritics supports, needs a check
|
||||
|
||||
2007-08-13 04:42 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Graph.sfd: Full diacritics supports, needs a check
|
||||
|
||||
2007-08-13 04:38 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Granada.sfd: Full diacritics supports, needs a check
|
||||
|
||||
2007-08-13 03:28 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Ostorah.sfd: ae_Ostorah.sfd: Full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-08-13 02:13 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Haramain.sfd: Done: replaced ugly marks, repositioned
|
||||
below marks
|
||||
|
||||
2007-08-13 01:31 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Graph.sfd: Done, needs to be checked
|
||||
|
||||
2007-08-13 01:16 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Granada.sfd: Done, needs to be checked
|
||||
|
||||
2007-08-12 23:05 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/: ae_Tarablus.sfd: First steps
|
||||
|
||||
2007-08-12 18:24 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Electron.sfd: ae_Electron.sfd: Full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-08-12 16:06 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Hani.sfd: ae_Hani.sfd: Full support for diacritic
|
||||
positioning by Osama Khaled
|
||||
|
||||
2007-08-11 23:33 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Ouhod-Bold.sfd: ae_Ouhod-Bold.sfd: Full support for
|
||||
diacritic positioning.
|
||||
|
||||
2007-08-11 21:28 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Rasheeq-Bold.sfd: ae_Rasheeq-Bold.sfd: Full diacritic
|
||||
support.
|
||||
|
||||
2007-08-11 15:09 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Hor.sfd: some fixes
|
||||
|
||||
2007-08-11 14:55 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Electron.sfd, ae_Granada.sfd, ae_Graph.sfd,
|
||||
ae_Haramain.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd, ae_Rasheeq-Bold.sfd, ae_Shado.sfd,
|
||||
ae_Sharjah.sfd, ae_Tarablus.sfd: More tweaking, it is ready for
|
||||
manual editing now (I hope so).
|
||||
|
||||
2007-08-11 11:08 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Hor.sfd: Fahd: I updated the anchor points, please use
|
||||
this instead of the old version.
|
||||
|
||||
2007-08-11 10:45 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Electron.sfd, ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd,
|
||||
ae_Haramain.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
|
||||
ae_Shado.sfd, ae_Sharjah.sfd, ae_Tarablus.sfd: Replaced old
|
||||
anchor points with new ones and better automatic positioning using
|
||||
the improved addanchors.pe script. Please update your local copy
|
||||
before doing any further work, this will make our life easier.
|
||||
|
||||
2007-08-11 10:25 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/addanchors.pe: Now X and Y values are computed to produce a
|
||||
far better result, the needed manual tweaking is very little now.
|
||||
|
||||
2007-08-10 01:27 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Nada.sfd: ae_Nada.sfd: Full support for diacritic
|
||||
positioning by Fahd AlSaidi.
|
||||
|
||||
2007-08-07 23:47 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlYarmook.sfd:
|
||||
* ae_AlYarmook.sfd: Changed font name and other related feilds from
|
||||
AlYermook to AlYarmook
|
||||
* ae_AlYarmook.sfd: Full support for diacritic positioning.
|
||||
|
||||
2007-08-07 00:22 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Mashq-Bold.sfd: sfd/ae_Mashq-Bold.sfd: Full support for
|
||||
diacritic positioning.
|
||||
|
||||
2007-08-06 02:58 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Rehan.sfd: Mark to mark ligatures were too close, fixed.
|
||||
|
||||
2007-08-04 20:14 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Rehan.sfd: ae_Rehan.sfd: Full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-08-04 01:22 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Mashq.sfd: ae_Mashq.sfd: Full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-08-04 01:19 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Khalid.sfd: Reencoded the file to Unicode.
|
||||
|
||||
2007-08-04 01:16 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Kayrawan.sfd: Fixed ArabicMark2MarkBelow anchor point.
|
||||
Reencoded the file to Unicode.
|
||||
|
||||
2007-08-03 06:12 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Kayrawan.sfd: Fixed two letters ligatures diacritics
|
||||
|
||||
2007-08-03 05:55 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Kayrawan.sfd: Added لله ligature diacritics
|
||||
|
||||
2007-08-03 05:01 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Kayrawan.sfd: Ignore combining marks set
|
||||
|
||||
2007-08-03 04:51 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Kayrawan.sfd: Full diacritics support -
|
||||
ArabicMark2MarkBelow need to be checked
|
||||
|
||||
2007-08-03 02:40 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Salem.sfd: Added and positioned anchors for Allah glyph.
|
||||
|
||||
2007-08-03 02:32 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Dimnah.sfd: ae_Dimnah.sfd: Full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-08-03 01:26 Youssef Chahibi <chahibi@gmail.com>
|
||||
|
||||
* sfd/ae_Kayrawan.sfd: First steps in font editing
|
||||
|
||||
2007-08-03 00:10 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Salem.sfd: ae_Salem.sfd: Full diacritic support.
|
||||
|
||||
2007-08-02 04:50 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Arab.sfd: Fixed ligatures anchor points.
|
||||
|
||||
2007-08-02 02:15 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Arab.sfd: Support for diacritic positioning by Osama
|
||||
Khalid.
|
||||
|
||||
2007-08-01 23:09 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlManzomah.sfd: ae_AlManzomah.sfd: Full support for
|
||||
diacritic positioning.
|
||||
|
||||
2007-08-01 01:56 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Khalid.sfd: ae_Khalid.sfd: Full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-07-28 11:43 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMateen-Bold.sfd: ae_AlMateen-Bold.sfd: Full support for
|
||||
diacritic positioning.
|
||||
|
||||
2007-07-27 22:16 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* Makefile: New make targets as requested by KhaledHosney.
|
||||
|
||||
2007-07-27 21:04 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlHor.sfd: ae_AlHor.sfd: Full diacritic support
|
||||
|
||||
2007-07-26 10:14 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Jet.sfd: ./sfd/ae_Jet.sfd: Full diacritic support.
|
||||
|
||||
2007-07-26 01:38 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Japan.sfd: Aeif, you forgot the ligatures and letter beh
|
||||
isolated, fixed
|
||||
|
||||
2007-07-25 14:41 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Metal.sfd: Add anchor points for لله ligature
|
||||
|
||||
2007-07-25 12:52 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Metal.sfd: ae_Metal: Full diacritic support.
|
||||
|
||||
2007-07-25 01:36 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Japan.sfd: ae_Japan: Full diacritic support.
|
||||
|
||||
2007-07-25 01:28 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Cortoba.sfd: minor fix
|
||||
|
||||
2007-07-25 00:24 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Cortoba.sfd:
|
||||
|
||||
----------------------------------------------------------------------ae_Cortoba.sfd: Full support for diacritic positioning.
|
||||
|
||||
2007-07-24 18:34 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/generate.sh: not needed any more, use 'make' instead
|
||||
|
||||
2007-07-24 18:31 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Sindbad.sfd: Add anchor points for لله ligature
|
||||
|
||||
2007-07-24 18:04 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Fixed ligatures anchor points
|
||||
|
||||
2007-07-24 17:55 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Furat.sfd: Add anchor points for لله ligature
|
||||
|
||||
2007-07-23 23:16 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* README, README.cvs:
|
||||
- new readme file to explain how to build ttf onts from our cvs
|
||||
tree.
|
||||
|
||||
2007-07-23 23:01 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlBattar.sfd: few fixes in the diacritic positions
|
||||
|
||||
2007-07-23 13:56 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlBattar.sfd: ae_AlBattar.sfd, full support for diacritic
|
||||
positioning.
|
||||
|
||||
2007-07-23 05:28 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* Makefile: Now doesn't rebuild untouched fonts, should save some
|
||||
server cycles.
|
||||
|
||||
2007-07-23 04:00 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Sindbad.sfd: Unchecked 'compact' option
|
||||
|
||||
2007-07-23 00:16 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Sindbad.sfd:
|
||||
- Add the missed "Ignore Combining Marks" feature to Arabic liga
|
||||
lookuptable, Afief please remember this.
|
||||
- Few changes in ArabicBelow anchor points placement.
|
||||
|
||||
2007-07-22 14:42 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlBattar.sfd: Diacritic support, for isolated glyphs only.
|
||||
|
||||
2007-07-22 00:43 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Sindbad.sfd: Full support for diacritic positioning.
|
||||
|
||||
2007-07-21 21:38 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* Makefile: fixed "clean" to remove the bzipped archive.
|
||||
|
||||
2007-07-21 21:34 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* Makefile:
|
||||
- All files are under ae_fonts dir now.
|
||||
- The archive is bzipped.
|
||||
|
||||
2007-07-21 20:05 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* Makefile: Committed the Makefile. Hope you like it.
|
||||
|
||||
2007-07-21 19:11 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/generate.pe: Add a usage note.
|
||||
|
||||
2007-07-21 19:09 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/generate.pe: Now accepts a 2nd argument for the .ttf file
|
||||
name.
|
||||
|
||||
2007-07-21 18:52 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Tholoth.sfd: A few fixes in positioning.
|
||||
|
||||
2007-07-21 16:48 Afief Halumi <afief.h@gmail.com>
|
||||
|
||||
* sfd/ae_Tholoth.sfd: Finished work on ae_Tholoth.sfd; Added a few
|
||||
better glyphs and full support for diacritic positioning.
|
||||
|
||||
2007-07-21 00:04 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Tholoth.sfd:
|
||||
|
||||
Diacritics work by afief
|
||||
|
||||
2007-07-19 23:49 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/addanchors.pe: Add support for mark2glyph anchor points,
|
||||
thanks George Williams for fixing fontforge's bug.
|
||||
|
||||
2007-07-19 23:16 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlBattar.sfd, ae_AlHor.sfd, ae_AlManzomah.sfd,
|
||||
ae_AlMateen-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
|
||||
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Granada.sfd,
|
||||
ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd, ae_Hor.sfd,
|
||||
ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd, ae_Khalid.sfd,
|
||||
ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd, ae_Nada.sfd,
|
||||
ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd, ae_Ouhod-Bold.sfd,
|
||||
ae_Petra.sfd, ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd,
|
||||
ae_Shado.sfd, ae_Sharjah.sfd, ae_Sindbad.sfd, ae_Tarablus.sfd,
|
||||
ae_Tholoth.sfd:
|
||||
|
||||
- Removed Cyrillic and Greek glyphs, this makes the font more
|
||||
lighter.
|
||||
- Add all needed anchor points, still needs to be manually adjusted.
|
||||
|
||||
2007-07-19 23:15 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlMohanad.sfd, ae_AlMothnna-Bold.sfd, ae_Furat.sfd:
|
||||
Removed Cyrillic and Greek glyphs, this makes the font more lighter.
|
||||
|
||||
2007-07-19 23:12 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: full support for diacritic positioning
|
||||
|
||||
2007-07-18 14:57 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd:
|
||||
|
||||
Full mark2base and mark2mark anchor points
|
||||
|
||||
2007-07-16 20:53 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Nada.sfd:
|
||||
|
||||
Removed obsolete reference to Btstream copyright, we don't include
|
||||
any Bitstream copyrighted glyphs anymore.
|
||||
|
||||
2007-07-16 20:03 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/: addanchors.pe, addlookups.pe, cp.pe, generate.pe:
|
||||
|
||||
use "#!/usr/bin/env fontforge" instead of "#!/usr/bin/fontforge"
|
||||
|
||||
2007-07-16 13:47 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMohanad.sfd:
|
||||
|
||||
Full support for proper diacritics positioning
|
||||
|
||||
2007-07-16 00:16 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/: addanchors.pe, addlookups.pe, cp.pe, generate.pe: Now the
|
||||
scripts require Fotforge 20070501 or newer, older versions use older
|
||||
SFD formate which we don't suport.
|
||||
|
||||
2007-07-16 00:09 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: Add support for proper diacritic
|
||||
positioning by Afief Halumi, still in progress
|
||||
|
||||
2007-07-15 23:48 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Furat.sfd: full support for diacritic positioning
|
||||
|
||||
2007-07-15 20:08 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlBattar.sfd, ae_AlHor.sfd, ae_AlManzomah.sfd,
|
||||
ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd, ae_AlYarmook.sfd,
|
||||
ae_Arab.sfd, ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd,
|
||||
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
|
||||
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
|
||||
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
|
||||
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
|
||||
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
|
||||
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: removed traces
|
||||
of ae_ prefix
|
||||
|
||||
2007-07-15 19:44 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlArabiya.sfd: removed traces of ae_ prefix
|
||||
|
||||
2007-07-13 20:14 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd:
|
||||
- Removed traces of ae_ prefix.
|
||||
- Full support for proper Arabic diacritics positioning.
|
||||
|
||||
2007-07-13 19:38 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Furat.sfd:
|
||||
- Removed traces of ae_ prefix.
|
||||
- add anchor points for Arabic diacritics, needs manual tuning.
|
||||
|
||||
2007-07-13 19:09 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/: addanchors.pe, addlookups.pe: scripts to assist adding
|
||||
lookup tables and anchor points needed for proper diacritics
|
||||
(harakat) support.
|
||||
|
||||
2007-07-01 03:31 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
|
||||
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
|
||||
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
|
||||
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Furat.sfd,
|
||||
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
|
||||
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
|
||||
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
|
||||
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
|
||||
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
|
||||
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: Removed ae_
|
||||
prefix from all fonts, see
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361965
|
||||
|
||||
2007-06-30 22:02 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* README: Initial README file
|
||||
|
||||
2007-06-30 20:20 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/: generate.pe, generate.sh: Scripts to generate TTF files
|
||||
from SFD ones.
|
||||
|
||||
2007-06-30 19:58 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Tarablus.sfd: add the missed U+F6BE that caused bug in 'j'
|
||||
glyph, CVS_SILENT
|
||||
|
||||
2007-06-30 19:48 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Sindbad.sfd:
|
||||
add the missed U+F6BE that caused bug in 'j' glyph, CVS_SILENT
|
||||
|
||||
2007-06-23 22:29 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Shado.sfd, ae_Sharjah.sfd: add the missed U+F6BE that
|
||||
caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:26 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Rasheeq-Bold.sfd, ae_Rehan.sfd, ae_Salem.sfd: add the
|
||||
missed U+F6BE that caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:22 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Nice.sfd, ae_Ostorah.sfd, ae_Ouhod-Bold.sfd,
|
||||
ae_Petra.sfd: add the missed U+F6BE that caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:19 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Metal.sfd, ae_Nada.sfd, ae_Nagham.sfd: add the missed
|
||||
U+F6BE that caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:16 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Kayrawan.sfd, ae_Khalid.sfd, ae_Mashq-Bold.sfd,
|
||||
ae_Mashq.sfd: add the missed U+F6BE that caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:12 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Haramain.sfd, ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd: add
|
||||
the missed U+F6BE that caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:09 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd: add the missed
|
||||
U+F6BE that caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:05 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Electron.sfd, ae_Furat.sfd: add the missed U+F6BE that
|
||||
caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 22:02 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Cortoba.sfd, ae_Dimnah.sfd: add the missed U+F6BE that
|
||||
caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 21:59 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlYarmook.sfd, ae_Arab.sfd: add the missed U+F6BE that
|
||||
caused bug in 'j' glyph
|
||||
|
||||
2007-06-23 21:19 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
|
||||
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
|
||||
ae_AlMothnna-Bold.sfd: Added the missed U+U+F6BE glyphs which
|
||||
caused a bug in "j" glyph
|
||||
|
||||
2007-06-23 18:30 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* COPYING: -Moved GPL to a separate file. -Added GPL font
|
||||
exception to COPYING.
|
||||
|
||||
2007-06-23 18:12 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_Tholoth.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 18:07 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Shado.sfd, ae_Sharjah.sfd, ae_Sindbad.sfd,
|
||||
ae_Tarablus.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 18:04 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Petra.sfd, ae_Rasheeq-Bold.sfd, ae_Rehan.sfd,
|
||||
ae_Salem.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 18:01 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:57 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Metal.sfd, ae_Nada.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:54 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Kayrawan.sfd, ae_Khalid.sfd, ae_Mashq-Bold.sfd,
|
||||
ae_Mashq.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:51 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Haramain.sfd, ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:47 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Furat.sfd, ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:43 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_Arab.sfd, ae_Cortoba.sfd, ae_Dimnah.sfd,
|
||||
ae_Electron.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:40 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
|
||||
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-23 17:37 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
|
||||
ae_AlManzomah.sfd:
|
||||
- New glyphs (covering every thing outside Arabic block) based on
|
||||
the GPL'd FreeFont project [http://www.nongnu.org/freefont/].
|
||||
- Arabic diacritic marks (harakat) are set to have zero advance
|
||||
width and OT class as 'mark' nstead of 'base glyph'
|
||||
|
||||
2007-06-21 05:57 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* tools/cp.pe: Simple ff script to copy a specific range of glyphs
|
||||
from on font to another.
|
||||
|
||||
2007-06-16 01:54 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd:
|
||||
- Identical glyphs (or parts of glyphs) are referenced to one common
|
||||
glyph instead of copying the same shape each time.
|
||||
- Add few missed Arabic glyphs, DOTLESS QAF, DOTLESS BEH, HAMZA
|
||||
ABOVE, HAMZA BELOW and EXTENDED ARABIC-INDIC DIGIT ZERO, ONE, TWO,
|
||||
THREE, SEVEN, EIGHT, NINE.
|
||||
|
||||
2007-06-15 07:10 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/: ae_AlArabiya.sfd, ae_AlBattar.sfd, ae_AlHor.sfd,
|
||||
ae_AlManzomah.sfd, ae_AlMateen-Bold.sfd, ae_AlMohanad.sfd,
|
||||
ae_AlMothnna-Bold.sfd, ae_AlYarmook.sfd, ae_Arab.sfd,
|
||||
ae_Cortoba.sfd, ae_Dimnah.sfd, ae_Electron.sfd, ae_Furat.sfd,
|
||||
ae_Granada.sfd, ae_Graph.sfd, ae_Hani.sfd, ae_Haramain.sfd,
|
||||
ae_Hor.sfd, ae_Japan.sfd, ae_Jet.sfd, ae_Kayrawan.sfd,
|
||||
ae_Khalid.sfd, ae_Mashq-Bold.sfd, ae_Mashq.sfd, ae_Metal.sfd,
|
||||
ae_Nada.sfd, ae_Nagham.sfd, ae_Nice.sfd, ae_Ostorah.sfd,
|
||||
ae_Ouhod-Bold.sfd, ae_Petra.sfd, ae_Rasheeq-Bold.sfd,
|
||||
ae_Rehan.sfd, ae_Salem.sfd, ae_Shado.sfd, ae_Sharjah.sfd,
|
||||
ae_Sindbad.sfd, ae_Tarablus.sfd, ae_Tholoth.sfd: Preparing to
|
||||
work
|
||||
|
||||
2007-06-02 21:25 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
* sfd/ae_AlMothnna-Bold.sfd:
|
||||
- A modified version of "AlMothnna", partially fixes the vowel marks
|
||||
issues.
|
||||
- This is fontforg's sfd file.
|
||||
|
||||
2004-07-10 09:48 nadim
|
||||
|
||||
* COPYING: + Minor mods to the GPL license mention (their address
|
||||
changed) + Added disclaimer + Renamed file from license.txt for
|
||||
consistency
|
||||
|
||||
58
htdocs/includes/tcpdf/fonts/ae_fonts_2.0/README
Normal file
58
htdocs/includes/tcpdf/fonts/ae_fonts_2.0/README
Normal file
@ -0,0 +1,58 @@
|
||||
This project aims at increasing the number of available Arabic free and
|
||||
open source fonts. The goals of this project are,
|
||||
|
||||
* Create and/or salvage high quality free and open TTF Arabic fonts.
|
||||
|
||||
* Create a central repository of all free and open source Arabic fonts
|
||||
(TTF and otherwise) in order to get them included into the various
|
||||
distributions.
|
||||
|
||||
* To better couple and artistically match Arabic fonts to their latin
|
||||
counterparts.
|
||||
|
||||
You can visit our web page
|
||||
http://www.arabeyes.org/project.php?proj=Khotot
|
||||
|
||||
This software package/product and attached documentations are provided
|
||||
"as is", with no warranty.
|
||||
|
||||
-* www.arabeyes.org *-
|
||||
|
||||
If you'd like to help the Arabeyes Project, then consider:
|
||||
|
||||
http://www.arabeyes.org/donate.php
|
||||
|
||||
Typeface and data © 2003-2007, Arabeyes.org.
|
||||
|
||||
Latin glyphs (U+0021-U+007E, U+00A1-U+0237, U+1E00-U+1EF9 and
|
||||
U+FB00-U+FB06 Unicode ranges) are based on "Free UCS Outline Fonts",
|
||||
www.nongnu.org/freefont (Copyleft 2002, 2003, 2005 Free Software
|
||||
Foundation).
|
||||
|
||||
These fonts are subject to the GNU GENERAL PUBLIC (GPL) LICENSE (Version 2).
|
||||
See COPYING for details or http://www.gnu.org/copyleft/gpl.html
|
||||
|
||||
As a special exception, if you create a document which uses this
|
||||
font, and embed this font or unaltered portions of this font into the
|
||||
document, this font does not by itself cause the resulting document to
|
||||
be covered by the GNU General Public License. This exception does not
|
||||
however invalidate any other reasons why the document might be covered
|
||||
by the GNU General Public License. If you modify this font, you may
|
||||
extend this exception to your version of the font, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this exception
|
||||
statement from your version.
|
||||
|
||||
Release Notes
|
||||
-------------
|
||||
2.0
|
||||
This the second major release of Arabeyes fonts, this release features:
|
||||
* Completely new Latin Glyphs, based on font distributed by FreeFonts project
|
||||
(See the legal notes above)
|
||||
* Proper support for Arabic diacritics; all fonts now have anchor points
|
||||
adjusted manually to fit nicely with each glyph.
|
||||
* Diacritics for AlMothnna, AlArabiya and Tholoth fonts have been redisigned
|
||||
too look better and fit with the style of the font.
|
||||
* We dropped ae_ prefix from all fonts, so please fix your configuration
|
||||
files.
|
||||
* Various other small fixes, see ChangeLog file for details.
|
||||
|
||||
BIN
htdocs/includes/tcpdf/fonts/aealarabiya.ctg.z
Normal file
BIN
htdocs/includes/tcpdf/fonts/aealarabiya.ctg.z
Normal file
Binary file not shown.
16
htdocs/includes/tcpdf/fonts/aealarabiya.php
Normal file
16
htdocs/includes/tcpdf/fonts/aealarabiya.php
Normal file
File diff suppressed because one or more lines are too long
BIN
htdocs/includes/tcpdf/fonts/aealarabiya.z
Normal file
BIN
htdocs/includes/tcpdf/fonts/aealarabiya.z
Normal file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/aefurat.ctg.z
Normal file
BIN
htdocs/includes/tcpdf/fonts/aefurat.ctg.z
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user