forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2011 Fabrice CHERRIER
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -452,7 +453,7 @@ class pdf_strato extends ModelePDFContract
|
||||
else
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||
$this->_tab_signature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$this->tabSignature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1;
|
||||
}
|
||||
|
||||
@@ -545,7 +546,16 @@ class pdf_strato extends ModelePDFContract
|
||||
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3); // Rect prend une longueur en 3eme param et 4eme param
|
||||
}
|
||||
|
||||
function _tab_signature(&$pdf, $tab_top, $tab_height, $outputlangs) {
|
||||
/**
|
||||
* Show footer signature of page
|
||||
* @param PDF $pdf Object PDF
|
||||
* @param int $tab_top tab height position
|
||||
* @param int $tab_height tab height
|
||||
* @param Translate $outputlangs Object language for output
|
||||
* @return void
|
||||
*/
|
||||
private function tabSignature(&$pdf, $tab_top, $tab_height, $outputlangs)
|
||||
{
|
||||
$pdf->SetDrawColor(128,128,128);
|
||||
$posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2);
|
||||
$posy = $tab_top + $tab_height + 3 + 3;
|
||||
|
||||
@@ -451,6 +451,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
}
|
||||
catch(OdfException $e)
|
||||
{
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class EmailCollector extends CommonObject
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
|
||||
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
|
||||
'user' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
|
||||
'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
|
||||
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>1, 'comment'=>"IMAP password"),
|
||||
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
|
||||
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
||||
@@ -161,7 +161,7 @@ class EmailCollector extends CommonObject
|
||||
|
||||
|
||||
public $host;
|
||||
public $user;
|
||||
public $login;
|
||||
public $password;
|
||||
public $source_directory;
|
||||
public $target_directory;
|
||||
@@ -829,7 +829,7 @@ class EmailCollector extends CommonObject
|
||||
$this->error=$langs->trans('ErrorFieldRequired', 'EMailHost');
|
||||
return -1;
|
||||
}
|
||||
if (empty($this->user))
|
||||
if (empty($this->login))
|
||||
{
|
||||
$this->error=$langs->trans('ErrorFieldRequired', 'Login');
|
||||
return -1;
|
||||
@@ -855,7 +855,7 @@ class EmailCollector extends CommonObject
|
||||
$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||
$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
||||
|
||||
$connection = imap_open($connectstringsource, $this->user, $this->password);
|
||||
$connection = imap_open($connectstringsource, $this->login, $this->password);
|
||||
if (! $connection)
|
||||
{
|
||||
$this->error = 'Failed to open IMAP connection '.$connectstringsource;
|
||||
|
||||
@@ -2022,7 +2022,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
* Statut validee ou abandonnee pour raison autre + non payee + aucun paiement + pas deja remplacee
|
||||
*
|
||||
* @param int $socid Id societe
|
||||
* @return array Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
* @return array|int Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
* <0 if error
|
||||
*/
|
||||
function list_replacable_supplier_invoices($socid=0)
|
||||
{
|
||||
@@ -2050,9 +2051,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$return[$obj->rowid]=array( 'id' => $obj->rowid,
|
||||
'ref' => $obj->ref,
|
||||
'status' => $obj->fk_statut);
|
||||
$return[$obj->rowid]=array(
|
||||
'id' => $obj->rowid,
|
||||
'ref' => $obj->ref,
|
||||
'status' => $obj->fk_statut
|
||||
);
|
||||
}
|
||||
//print_r($return);
|
||||
return $return;
|
||||
@@ -2071,7 +2074,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
* (validee + paiement en cours) ou classee (payee completement ou payee partiellement) + pas deja remplacee + pas deja avoir
|
||||
*
|
||||
* @param int $socid Id societe
|
||||
* @return array Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
* @return array|int Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
* <0 if error
|
||||
*/
|
||||
function list_qualified_avoir_supplier_invoices($socid=0)
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
user varchar(128),
|
||||
login varchar(128),
|
||||
password varchar(128),
|
||||
source_directory varchar(255) NOT NULL,
|
||||
target_directory varchar(255),
|
||||
|
||||
@@ -22,7 +22,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
user varchar(128),
|
||||
login varchar(128),
|
||||
password varchar(128),
|
||||
source_directory varchar(255) NOT NULL,
|
||||
target_directory varchar(255),
|
||||
|
||||
@@ -55,7 +55,7 @@ if (GETPOST('action','alpha') == 'set')
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",(GETPOST('CASHDESK_ID_WAREHOUSE','alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",GETPOST('CASHDESK_NO_DECREASE_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEBOX", GETPOST('TAKEBOX','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEPOSCONNECTOR", GETPOST('TAKEPOSCONNECTOR','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS','alpha'),'chaine',0,'',$conf->entity);
|
||||
@@ -172,10 +172,10 @@ if (! empty($conf->service->enabled))
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEBOX",$conf->global->TAKEBOX,1);
|
||||
print $form->selectyesno("TAKEPOSCONNECTOR",$conf->global->TAKEPOSCONNECTOR,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEBOX){
|
||||
if ($conf->global->TAKEPOSCONNECTOR){
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("IPAddress").' (<a href="http://en.takepos.com/connector">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
@@ -190,7 +190,7 @@ print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEPOS_BAR_RESTAURANT",$conf->global->TAKEPOS_BAR_RESTAURANT,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT and $conf->global->TAKEBOX){
|
||||
if ($conf->global->TAKEPOS_BAR_RESTAURANT and $conf->global->TAKEPOSCONNECTOR){
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("OrderPrinters").' (<a href="orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
|
||||
@@ -29,6 +29,8 @@ $_GET['theme']="md"; // Force theme. MD theme provides better look and feel to T
|
||||
|
||||
require '../main.inc.php'; // Load $user and permissions
|
||||
|
||||
$langs->loadLangs(array("bills","orders","commercial","cashdesk"));
|
||||
|
||||
$floor=GETPOST('floor','alpha');
|
||||
if ($floor=="") $floor=1;
|
||||
$id = GETPOST('id','int');
|
||||
|
||||
@@ -151,7 +151,7 @@ if ($action=="updatereduction"){
|
||||
$invoice->fetch($placeid);
|
||||
}
|
||||
|
||||
if ($action=="order"){
|
||||
if ($action=="order" and $placeid!=0){
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$headerorder='<html><br><b>'.$langs->trans('Place').' '.$place.'<br><table width="65%"><thead><tr><th align="left">'.$langs->trans("Label").'</th><th align="right">'.$langs->trans("Qty").'</th></tr></thead><tbody>';
|
||||
$footerorder='</tbody></table>'.dol_print_date(dol_now(), 'dayhour').'<br></html>';
|
||||
@@ -281,7 +281,7 @@ print ': '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'&nbs
|
||||
//}
|
||||
if ($action=="valid"){
|
||||
print '<p style="font-size:120%;" align="center"><b>'.$invoice->facnumber." ".$langs->trans('BillShortStatusValidated').'</b></p>';
|
||||
if ($conf->global->TAKEBOX) print '<center><button type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
||||
if ($conf->global->TAKEPOSCONNECTOR) print '<center><button type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
||||
else print '<center><button type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button><center>';
|
||||
}
|
||||
if ($action=="search"){
|
||||
|
||||
@@ -101,11 +101,11 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
|
||||
<button type="button" class="calcbutton" onclick="addreceived(10);">10</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(20);">20</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(50);">50</button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(1);">1</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(2);">2</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(5);">5</button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.10);">0.10</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.20);">0.20</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.50);">0.50</button>
|
||||
@@ -114,7 +114,7 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.02);">0.02</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.05);">0.05</button>
|
||||
<button type="button" class="calcbutton3" onclick="reset();"><span style='font-size: 150%;'>C</span></button>
|
||||
<button type="button" class="calcbutton3" onclick="printclick();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||
<button type="button" class="calcbutton3" onclick="parent.$.colorbox.close();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -355,7 +355,7 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){
|
||||
'action'=>'TakeposPrintingOrder();');
|
||||
}
|
||||
}
|
||||
if ($conf->global->TAKEBOX){
|
||||
if ($conf->global->TAKEPOSCONNECTOR){
|
||||
$menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"),
|
||||
'action'=>'OpenDrawer();');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user