mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -3300,7 +3300,7 @@ class Adherent extends CommonObject
|
||||
$return .= '<div class="info-box info-box-sm">';
|
||||
$return .= '<span class="info-box-icon bg-infobox-action">';
|
||||
if (property_exists($this, 'photo') || !empty($this->photo)) {
|
||||
$return .= Form::showphoto('memberphoto', $this, 0, 60, 0, 'photokanban photoref photowithmargin photologintooltip', 'small', 0, 1);
|
||||
$return .= Form::showphoto('memberphoto', $this, 0, 60, 0, 'photokanban photowithmargin photologintooltip', 'small', 0, 1);
|
||||
} else {
|
||||
$return .= img_picto('', 'user');
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ print load_fiche_titre($title, '', $memberstatic->picto);
|
||||
//dol_mkdir($dir);
|
||||
$data = array();
|
||||
$tab = null;
|
||||
$label = '';
|
||||
|
||||
if ($mode) {
|
||||
// Define sql
|
||||
@@ -263,6 +264,7 @@ if ($mode && !count($data)) {
|
||||
|
||||
// Show graphics
|
||||
if (count($arrayjs) && $mode == 'memberbycountry') {
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
if (is_readable($color_file)) {
|
||||
include $color_file;
|
||||
|
||||
@@ -1311,7 +1311,7 @@ class FactureRec extends CommonInvoice
|
||||
if (empty($this->date_when)) {
|
||||
return false;
|
||||
}
|
||||
return dol_time_plus_duree($this->date_when, $this->frequency, $this->unit_frequency);
|
||||
return dol_time_plus_duree($this->date_when, $this->frequency, $this->unit_frequency, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1531,7 +1531,7 @@ class Contact extends CommonObject
|
||||
* @param string $morecss Add more css on link
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0, $morecss = '')
|
||||
public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0, $morecss = 'valignmiddle')
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
|
||||
@@ -166,26 +166,22 @@ if ($type == "p") {
|
||||
$contextpage = 'contactprospectlist';
|
||||
}
|
||||
$title .= ' ('.$langs->trans("ThirdPartyProspects").')';
|
||||
$urlfiche = "card.php";
|
||||
}
|
||||
if ($type == "c") {
|
||||
if (empty($contextpage) || $contextpage == 'contactlist') {
|
||||
$contextpage = 'contactcustomerlist';
|
||||
}
|
||||
$title .= ' ('.$langs->trans("ThirdPartyCustomers").')';
|
||||
$urlfiche = "card.php";
|
||||
} elseif ($type == "f") {
|
||||
if (empty($contextpage) || $contextpage == 'contactlist') {
|
||||
$contextpage = 'contactsupplierlist';
|
||||
}
|
||||
$title .= ' ('.$langs->trans("ThirdPartySuppliers").')';
|
||||
$urlfiche = "card.php";
|
||||
} elseif ($type == "o") {
|
||||
if (empty($contextpage) || $contextpage == 'contactlist') {
|
||||
$contextpage = 'contactotherlist';
|
||||
}
|
||||
$title .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')';
|
||||
$urlfiche = "";
|
||||
}
|
||||
|
||||
// Initialize a technical object
|
||||
@@ -1453,7 +1449,6 @@ while ($i < $imaxinloop) {
|
||||
}
|
||||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven"';
|
||||
if ($contextpage == 'poslist') {
|
||||
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->socid.'&idcontact='.$obj->rowid.'&place='.urlencode($place).'\'"';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -152,9 +152,9 @@ trait CommonPeople
|
||||
/**
|
||||
* Return full address for banner
|
||||
*
|
||||
* @param string $htmlkey HTML id to make banner content unique
|
||||
* @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member)
|
||||
* @return string Full address string
|
||||
* @param string $htmlkey HTML id to make banner content unique
|
||||
* @param CommonObject $object Object (thirdparty, thirdparty of contact for contact, null for a member)
|
||||
* @return string Full address string
|
||||
*/
|
||||
public function getBannerAddress($htmlkey, $object)
|
||||
{
|
||||
@@ -165,20 +165,24 @@ trait CommonPeople
|
||||
$contactid = 0;
|
||||
$thirdpartyid = 0;
|
||||
$elementforaltlanguage = $this->element;
|
||||
if ($this instanceOf Societe && $this->element === 'societe') {
|
||||
/** @var Societe $this */
|
||||
if ($this->element === 'societe' && $this instanceof Societe) {
|
||||
$thirdpartyid = $this->id;
|
||||
}
|
||||
if ($this instanceOf Contact && $this->element === 'contact') {
|
||||
/** @var Contact $this */
|
||||
if ($this->element === 'contact' && $this instanceof Contact) {
|
||||
$contactid = $this->id;
|
||||
$thirdpartyid = empty($this->fk_soc) ? 0 : $this->fk_soc;
|
||||
}
|
||||
if ($this instanceOf User && $this->element === 'user') {
|
||||
/** @var User $this */
|
||||
if ($this->element == 'member' && $this instanceof Adherent) {
|
||||
$contactid = $this->id;
|
||||
$thirdpartyid = empty($this->socid) ? 0 : $this->socid;
|
||||
}
|
||||
if ($this->element === 'user' && $this instanceof User) {
|
||||
$contactid = $this->contact_id;
|
||||
$thirdpartyid = empty($object->fk_soc) ? 0 : $object->fk_soc;
|
||||
}
|
||||
if ($this->element == 'recruitmentcandidature' && $this instanceof RecruitmentCandidature) {
|
||||
$thirdpartyid = 0;
|
||||
}
|
||||
|
||||
$out = '';
|
||||
|
||||
@@ -210,7 +214,7 @@ trait CommonPeople
|
||||
$arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
|
||||
}
|
||||
|
||||
if (is_array($arrayoflangcode) && count($arrayoflangcode)) {
|
||||
if (/* is_array($arrayoflangcode) && */count($arrayoflangcode)) {
|
||||
if (!is_object($extralanguages)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/extralanguages.class.php';
|
||||
$extralanguages = new ExtraLanguages($this->db);
|
||||
@@ -258,7 +262,7 @@ trait CommonPeople
|
||||
// Phones
|
||||
$outphonedone = 0;
|
||||
if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
// $out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
@@ -387,7 +391,7 @@ trait CommonPeople
|
||||
$this->address = dol_strtoupper($this->address);
|
||||
$this->town = dol_strtoupper($this->town);
|
||||
}
|
||||
if (isset($this->email)) {
|
||||
if (!empty($this->email)) {
|
||||
$this->email = dol_strtolower($this->email);
|
||||
}
|
||||
if (isset($this->personal_email)) {
|
||||
|
||||
@@ -2767,9 +2767,9 @@ class Form
|
||||
}
|
||||
|
||||
if (empty($hidelabel)) {
|
||||
$out .= $langs->trans("RefOrLabel") . ' : ';
|
||||
$placeholder = ' placeholder="' . dolPrintHTMLForAttribute($langs->trans("RefOrLabel")) . '"';
|
||||
} elseif ($hidelabel > 1) {
|
||||
$placeholder = ' placeholder="' . $langs->trans("RefOrLabel") . '"';
|
||||
$placeholder = ' placeholder="' . dolPrintHTMLForAttribute($langs->trans("RefOrLabel")) . '"';
|
||||
if ($hidelabel == 2) {
|
||||
$out .= img_picto($langs->trans("Search"), 'search');
|
||||
}
|
||||
|
||||
@@ -669,7 +669,7 @@ $companystatic = new Societe($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$shipment = new Expedition($db);
|
||||
|
||||
$title = $langs->trans('ListOfSendings');
|
||||
$title = $langs->trans('Shipments');
|
||||
$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones';
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-expedition page-list');
|
||||
@@ -934,8 +934,6 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
||||
exit;
|
||||
}
|
||||
|
||||
$expedition = new Expedition($db);
|
||||
|
||||
if ($socid > 0) {
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($socid);
|
||||
@@ -1074,7 +1072,7 @@ print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
|
||||
print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dolly', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($langs->trans('Shipments'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dolly', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendShippingRef";
|
||||
$modelmail = "shipping_send";
|
||||
@@ -1085,7 +1083,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
if ($massaction == 'createbills') {
|
||||
print '<input type="hidden" name="massaction" value="confirm_createbills">';
|
||||
|
||||
print '<table class="noborder" width="100%" >';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">';
|
||||
print $langs->trans('DateInvoice');
|
||||
|
||||
@@ -1307,7 +1307,7 @@ class FactureFournisseurRec extends CommonInvoice
|
||||
if (empty($this->date_when)) {
|
||||
return false;
|
||||
}
|
||||
return dol_time_plus_duree((int) $this->date_when, $this->frequency, $this->unit_frequency);
|
||||
return dol_time_plus_duree((int) $this->date_when, $this->frequency, $this->unit_frequency, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,7 +60,7 @@ Numberspad=Numbers Pad
|
||||
BillsCoinsPad=Coins and banknotes Pad
|
||||
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||
TakeposNeedsCategories=TakePOS needs at least one product category to work
|
||||
TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category <b>%s</b> to work
|
||||
TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 sub-category under the product category <b>%s</b> to work
|
||||
OrderNotes=Can add some notes to each ordered items
|
||||
CashDeskBankAccountFor=Default account to use for payments in
|
||||
NoPaimementModesDefined=No paiment mode defined in TakePOS configuration
|
||||
|
||||
@@ -72,6 +72,7 @@ Language_fr_FR=French
|
||||
Language_fr_GA=French (Gabon)
|
||||
Language_fr_NC=French (New Caledonia)
|
||||
Language_fr_SN=French (Senegal)
|
||||
Language_fr_TN=French (Tunisia)
|
||||
Language_fy_NL=Frisian
|
||||
Language_gl_ES=Galician
|
||||
Language_he_IL=Hebrew
|
||||
|
||||
@@ -97,7 +97,6 @@ ShowService=Show service
|
||||
ProductsAndServicesArea=Product and Services area
|
||||
ProductsArea=Product area
|
||||
ServicesArea=Services area
|
||||
ListOfStockMovements=List of stock movements
|
||||
BuyingPrice=Buying price
|
||||
PriceForEachProduct=Products with specific prices
|
||||
SupplierCard=Vendor card
|
||||
|
||||
@@ -7,7 +7,6 @@ Receptions=Receptions
|
||||
AllReceptions=All Receptions
|
||||
ShowReception=Show Receptions
|
||||
ReceptionsArea=Receptions area
|
||||
ListOfReceptions=List of receptions
|
||||
ReceptionMethod=Reception method
|
||||
LastReceptions=Latest %s receptions
|
||||
StatisticsOfReceptions=Statistics for receptions
|
||||
|
||||
@@ -8,13 +8,12 @@ Shipments=Shipments
|
||||
ShowSending=Show Shipments
|
||||
Receivings=Delivery Receipts
|
||||
SendingsArea=Shipments area
|
||||
ListOfSendings=List of shipments
|
||||
SendingMethod=Shipping method
|
||||
LastSendings=Latest %s shipments
|
||||
StatisticsOfSendings=Statistics for shipments
|
||||
NbOfSendings=Number of shipments
|
||||
NumberOfShipmentsByMonth=Number of shipments by month
|
||||
SendingCard=Shipment card
|
||||
SendingCard=Shipment
|
||||
NewSending=New shipment
|
||||
CreateShipment=Create shipment
|
||||
QtyShipped=Qty shipped
|
||||
|
||||
@@ -27,9 +27,6 @@ LotSerialList=List of lot/serials
|
||||
SubjectToLotSerialOnly=Products subject to lot/serial only
|
||||
Movements=Movements
|
||||
ErrorWarehouseRefRequired=Warehouse reference name is required
|
||||
ListOfWarehouses=List of warehouses
|
||||
ListOfStockMovements=List of stock movements
|
||||
ListOfInventories=List of inventories
|
||||
MovementId=Movement ID
|
||||
StockMovementForId=Movement ID %d
|
||||
ListMouvementStockProject=List of stock movements associated to project
|
||||
|
||||
@@ -60,7 +60,7 @@ Numberspad=Pavé numérique
|
||||
BillsCoinsPad=Pavé avec montant des Pièces et Billets
|
||||
DolistorePosCategory=Modules TakePOS et autres solutions de PDV pour Dolibarr
|
||||
TakeposNeedsCategories=TakePOS a besoin d'au moins une catégorie de produits pour fonctionner
|
||||
TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS a besoin d'au moins 1 catégorie de produits dans la catégorie <b> %s </b> pour fonctionner
|
||||
TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS a besoin d'au moins 1 sous-catégorie dans la catégorie de produit <b> %s </b> pour fonctionner
|
||||
OrderNotes=Il est possible d'ajouter des notes sur chacun des produits commandés
|
||||
CashDeskBankAccountFor=Compte par défaut à utiliser pour les paiements en
|
||||
NoPaimementModesDefined=Aucun mode de paiement défini dans la configuration de TakePOS
|
||||
|
||||
31
htdocs/langs/fr_TN/main.lang
Normal file
31
htdocs/langs/fr_TN/main.lang
Normal file
@@ -0,0 +1,31 @@
|
||||
# Dolibarr language file - Source file is en_US - main
|
||||
DIRECTION=ltr
|
||||
# Default for FONTFORPDF=helvetica
|
||||
# Note for Chinese:
|
||||
# msungstdlight or cid0ct are for traditional Chinese zh_TW (traditional does not render with Ubuntu pdf reader)
|
||||
# stsongstdlight or cid0cs are for simplified Chinese zh_CN
|
||||
# To read Chinese pdf with Linux: sudo apt-get install poppler-data
|
||||
# cid0jp is for Japanish
|
||||
# cid0kr is for Korean
|
||||
# DejaVuSans is for some Eastern languages, some Asian languages and some Arabic languages
|
||||
# freemono is for ru_RU or uk_UA, uz_UZ
|
||||
# freeserif is for Tamil or Ethiopian
|
||||
FONTFORPDF=helvetica
|
||||
FONTSIZEFORPDF=10
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=Space
|
||||
FormatDateShort=%d/%m/%Y
|
||||
FormatDateShortInput=%d/%m/%Y
|
||||
FormatDateShortJava=dd/MM/yyyy
|
||||
FormatDateShortJavaInput=dd/MM/yyyy
|
||||
FormatDateShortJQuery=dd/mm/yy
|
||||
FormatDateShortJQueryInput=dd/mm/yy
|
||||
FormatHourShortJQuery=HH:MI
|
||||
FormatHourShort=%H:%M
|
||||
FormatHourShortDuration=%H:%M
|
||||
FormatDateTextShort=%d %b %Y
|
||||
FormatDateText=%d %B %Y
|
||||
FormatDateHourShort=%d/%m/%Y %H:%M
|
||||
FormatDateHourSecShort=%d/%m/%Y %H:%M:%S
|
||||
FormatDateHourTextShort=%d %b %Y %H:%M
|
||||
FormatDateHourText=%d %B %Y %H:%M
|
||||
2
htdocs/langs/fr_TN/sendings.lang
Normal file
2
htdocs/langs/fr_TN/sendings.lang
Normal file
@@ -0,0 +1,2 @@
|
||||
# Dolibarr language file - Source file is en_US - sendings
|
||||
SendingCard=Bon livraison
|
||||
@@ -650,6 +650,9 @@ print '<input type="submit" class="button reposition" value="'.$langs->trans("Mo
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("UserInterface"), '', '');
|
||||
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ if ($result || !($id > 0)) {
|
||||
// Product
|
||||
print '<tr class="nooddeven"><td class="titlefield">'.$langs->trans("ProductOrService").'</td><td>';
|
||||
print img_picto('', 'product', 'class="pictofixedwidth"');
|
||||
print $form->select_produits($id, 'id', '', 0, 0, 1, 2, '', ($conf->dol_optimize_smallscreen ? 1 : 0), array(), 0, '1', 0, 'widthcentpercentminusx maxwidth400');
|
||||
print $form->select_produits($id, 'id', '', 0, 0, 1, 2, '', 0, array(), 0, $langs->trans("RefOrLabel"), 0, 'widthcentpercentminusx maxwidth400');
|
||||
print '</td></tr>';
|
||||
|
||||
// Tag
|
||||
|
||||
@@ -560,7 +560,7 @@ if ($resql) {
|
||||
if ($msid) {
|
||||
$texte = $langs->trans('StockMovementForId', $msid);
|
||||
} else {
|
||||
$texte = $langs->trans("ListOfStockMovements");
|
||||
$texte = $langs->trans("StockMovements");
|
||||
if ($id) {
|
||||
$texte .= ' ('.$langs->trans("ForThisWarehouse").')';
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
|
||||
if ($msid) {
|
||||
$title = $langs->trans('StockMovementForId', $msid);
|
||||
} else {
|
||||
$title = $langs->trans("ListOfStockMovements");
|
||||
$title = $langs->trans("StockMovements");
|
||||
if ($id) {
|
||||
if (!empty($warehouse->ref)) {
|
||||
$title .= ' ('.$warehouse->ref.')';
|
||||
@@ -1236,7 +1236,7 @@ if (!empty($arrayfields['pl.sellby']['checked'])) {
|
||||
if (!empty($arrayfields['e.ref']['checked'])) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone left">';
|
||||
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
|
||||
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'maxwidth200');
|
||||
print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'maxwidth150');
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['m.fk_user_author']['checked'])) {
|
||||
@@ -1564,7 +1564,7 @@ while ($i < $imaxinloop) {
|
||||
}
|
||||
// Warehouse
|
||||
if (!empty($arrayfields['e.ref']['checked'])) {
|
||||
print '<td class="tdoverflowmax100">';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
print $warehousestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
}
|
||||
@@ -1591,7 +1591,7 @@ while ($i < $imaxinloop) {
|
||||
if (!empty($arrayfields['origin']['checked'])) {
|
||||
print '<td class="nowraponall">'.$origin.'</td>';
|
||||
}
|
||||
// fk_project
|
||||
// Project
|
||||
if (!empty($arrayfields['m.fk_projet']['checked'])) {
|
||||
print '<td>';
|
||||
if ($obj->fk_project != 0) {
|
||||
|
||||
@@ -608,9 +608,9 @@ $reception = new Reception($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
|
||||
$title = $langs->trans('Receptions');
|
||||
$helpurl = 'EN:Module_Receptions|FR:Module_Receptions|ES:Módulo_Receptiones';
|
||||
llxHeader('', $langs->trans('ListOfReceptions'), $helpurl, '', 0, 0, '', '', '', 'bodyforlist mod-reception page-list');
|
||||
llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'bodyforlist mod-reception page-list');
|
||||
|
||||
$sql = "SELECT e.rowid, e.ref, e.ref_supplier, e.date_reception as date_reception, e.date_delivery as delivery_date, l.date_delivery as date_reception2, e.fk_statut as status, e.billed,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,";
|
||||
@@ -906,13 +906,13 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
|
||||
print_barre_liste($langs->trans('ListOfReceptions'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dollyrevert', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dollyrevert', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
if ($massaction == 'createbills') {
|
||||
//var_dump($_REQUEST);
|
||||
print '<input type="hidden" name="massaction" value="confirm_createbills">';
|
||||
|
||||
print '<table class="noborder" width="100%" >';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldmiddle">';
|
||||
print $langs->trans('DateInvoice');
|
||||
|
||||
@@ -137,10 +137,13 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) {
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
||||
print $langs->trans("OrderPrinters");
|
||||
print '</td>';
|
||||
print '<td class="">';
|
||||
print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0);
|
||||
if (getDolGlobalString('TAKEPOS_ORDER_PRINTERS')) {
|
||||
print' <a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
if (getDolGlobalString('TAKEPOS_ORDER_PRINTERS')) {
|
||||
@@ -179,9 +182,9 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("SupplementCategory");
|
||||
print '</td>';
|
||||
print '<td class="">';
|
||||
print '<td class="nowrap">';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalString('TAKEPOS_SUPPLEMENTS_CATEGORY'), 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0);
|
||||
print $form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalString('TAKEPOS_SUPPLEMENTS_CATEGORY'), 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0, 0, 'minwidth 200 maxwidth500 widthcentpercentminusx');
|
||||
print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY');
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ print "</tr>\n";
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("NumberOfTerminals");
|
||||
print '<td>';
|
||||
print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="' . (!getDolGlobalString('TAKEPOS_NUM_TERMINALS') ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS) . '">';
|
||||
print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" class="width50" value="' . getDolGlobalString('TAKEPOS_NUM_TERMINALS', '1') . '">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Services
|
||||
|
||||
@@ -59,7 +59,7 @@ $action = GETPOST('action', 'aZ09');
|
||||
$left = GETPOST('left', 'alpha');
|
||||
$top = GETPOST('top', 'alpha');
|
||||
|
||||
$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant
|
||||
$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant
|
||||
|
||||
$newname = GETPOST('newname', 'alpha');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
@@ -74,15 +74,22 @@ if (!$user->hasRight('takepos', 'run')) {
|
||||
*/
|
||||
|
||||
if ($action == "getTables" && $user->hasRight('takepos', 'run')) {
|
||||
$sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables WHERE floor = ".((int) $floor)." AND entity IN (".getEntity('takepos').")";
|
||||
$resql = $db->query($sql);
|
||||
$rows = array();
|
||||
|
||||
$sql = "SELECT rowid, entity, label, leftpos, toppos, floor";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."takepos_floor_tables";
|
||||
$sql .= " WHERE floor = ".((int) $floor)." AND entity IN (".getEntity('takepos').")";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
while ($row = $db->fetch_array($resql)) {
|
||||
$tmpplace = (int) $row['rowid'];
|
||||
|
||||
$invoice = new Facture($db);
|
||||
$result = $invoice->fetch('', '(PROV-POS'.$_SESSION['takeposterminal'].'-'.$row['rowid'].')');
|
||||
$result = $invoice->fetch('', '(PROV-POS'.$_SESSION['takeposterminal'].'-'.$tmpplace.')');
|
||||
if ($result > 0) {
|
||||
$row['occupied'] = "red";
|
||||
}
|
||||
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ if (empty($reshook)) {
|
||||
|
||||
$conf->global->STOCK_CALCULATE_ON_BILL = 1; // To force the change of stock during invoice validation
|
||||
|
||||
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
|
||||
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
|
||||
dol_syslog("Validate invoice with stock change. Warehouse defined into constant ".$constantforkey." = ".getDolGlobalString($constantforkey));
|
||||
|
||||
// Validate invoice with stock change into warehouse getDolGlobalInt($constantforkey)
|
||||
@@ -624,7 +624,9 @@ if (empty($reshook)) {
|
||||
if ($placeid < 0) {
|
||||
dol_htmloutput_errors($invoice->error, $invoice->errors, 1);
|
||||
}
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid = ".((int) $placeid);
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " SET ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
||||
$sql .= " WHERE rowid = ".((int) $placeid);
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
@@ -797,7 +799,7 @@ if (empty($reshook)) {
|
||||
$line = array('description' => $prod->description, 'price' => $price, 'tva_tx' => $tva_tx, 'localtax1_tx' => $localtax1_tx, 'localtax2_tx' => $localtax2_tx, 'remise_percent' => $customer->remise_percent, 'price_ttc' => $price_ttc, 'array_options' => $array_options);
|
||||
|
||||
/* setup of margin calculation */
|
||||
if (isset($conf->global->MARGIN_TYPE)) {
|
||||
if (getDolGlobalString('MARGIN_TYPE')) {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'pmp' && !empty($prod->pmp)) {
|
||||
$line['fk_fournprice'] = null;
|
||||
$line['pa_ht'] = $prod->pmp;
|
||||
@@ -898,7 +900,7 @@ if (empty($reshook)) {
|
||||
if ($invoice->status == $invoice::STATUS_DRAFT && $invoice->pos_source && $invoice->module_source == 'takepos') {
|
||||
$permissiontoupdateline = true;
|
||||
// TODO Add also a test on $_SESSION('publicobjectid'] defined at creation of object
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the invoice ID
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the table ID
|
||||
}
|
||||
}*/
|
||||
|
||||
@@ -928,11 +930,12 @@ if (empty($reshook)) {
|
||||
|
||||
// Action to delete or discard an invoice
|
||||
if ($action == "delete" && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) {
|
||||
// $placeid is the invoice id (it differs from place) and is defined if the place is set and the ref of invoice is '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')', so the fetch at beginning of page works.
|
||||
// $placeid is the invoice id (it differs from place) and is defined if the place is set and
|
||||
// the ref of invoice is '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')', so the fetch at beginning of page works.
|
||||
if ($placeid > 0) {
|
||||
$result = $invoice->fetch($placeid);
|
||||
|
||||
if ($result > 0 && $invoice->statut == Facture::STATUS_DRAFT) {
|
||||
if ($result > 0 && $invoice->status == Facture::STATUS_DRAFT) {
|
||||
$db->begin();
|
||||
|
||||
// We delete the lines
|
||||
@@ -973,7 +976,7 @@ if (empty($reshook)) {
|
||||
if ($invoice->status == $invoice::STATUS_DRAFT && $invoice->pos_source && $invoice->module_source == 'takepos') {
|
||||
$permissiontoupdateline = true;
|
||||
// TODO Add also a test on $_SESSION('publicobjectid'] defined at creation of object
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the invoice ID
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the table ID
|
||||
}
|
||||
}
|
||||
if (!$permissiontoupdateline) {
|
||||
@@ -1023,7 +1026,7 @@ if (empty($reshook)) {
|
||||
if ($invoice->status == $invoice::STATUS_DRAFT && $invoice->pos_source && $invoice->module_source == 'takepos') {
|
||||
$permissiontoupdateline = true;
|
||||
// TODO Add also a test on $_SESSION('publicobjectid'] defined at creation of object
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the invoice ID
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the table ID
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1074,7 +1077,7 @@ if (empty($reshook)) {
|
||||
if ($invoice->status == $invoice::STATUS_DRAFT && $invoice->pos_source && $invoice->module_source == 'takepos') {
|
||||
$permissiontoupdateline = true;
|
||||
// TODO Add also a test on $_SESSION('publicobjectid'] defined at creation of object
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the invoice ID
|
||||
// TODO Check also that invoice->ref is (PROV-POS1-2) with 1 = terminal and 2, the table ID
|
||||
}
|
||||
}
|
||||
if (!$permissiontoupdateline) {
|
||||
@@ -1256,7 +1259,7 @@ if (empty($reshook)) {
|
||||
if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) {
|
||||
$sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>';
|
||||
} elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) {
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
|
||||
} else {
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
|
||||
@@ -1354,11 +1357,11 @@ $(document).ready(function() {
|
||||
<?php
|
||||
|
||||
if ($action == "order" && !empty($order_receipt_printer1)) {
|
||||
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
|
||||
if (filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) {
|
||||
?>
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/printer/index.php',
|
||||
url: '<?php print getDolGlobalString('TAKEPOS_PRINT_SERVER'); ?>/printer/index.php',
|
||||
data: 'invoice='+orderprinter1esc
|
||||
});
|
||||
<?php
|
||||
@@ -1366,7 +1369,7 @@ if ($action == "order" && !empty($order_receipt_printer1)) {
|
||||
?>
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print',
|
||||
url: 'http://<?php print getDolGlobalString('TAKEPOS_PRINT_SERVER'); ?>:8111/print',
|
||||
data: '<?php
|
||||
print $headerorder.$order_receipt_printer1.$footerorder; ?>'
|
||||
});
|
||||
@@ -1375,11 +1378,11 @@ if ($action == "order" && !empty($order_receipt_printer1)) {
|
||||
}
|
||||
|
||||
if ($action == "order" && !empty($order_receipt_printer2)) {
|
||||
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
|
||||
if (filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) {
|
||||
?>
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/printer/index.php?printer=2',
|
||||
url: '<?php print getDolGlobalString('TAKEPOS_PRINT_SERVER'); ?>/printer/index.php?printer=2',
|
||||
data: 'invoice='+orderprinter2esc
|
||||
});
|
||||
<?php
|
||||
@@ -1387,7 +1390,7 @@ if ($action == "order" && !empty($order_receipt_printer2)) {
|
||||
?>
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print2',
|
||||
url: 'http://<?php print getDolGlobalString('TAKEPOS_PRINT_SERVER'); ?>:8111/print2',
|
||||
data: '<?php
|
||||
print $headerorder.$order_receipt_printer2.$footerorder; ?>'
|
||||
});
|
||||
@@ -1396,11 +1399,11 @@ if ($action == "order" && !empty($order_receipt_printer2)) {
|
||||
}
|
||||
|
||||
if ($action == "order" && !empty($order_receipt_printer3)) {
|
||||
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
|
||||
if (filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) {
|
||||
?>
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/printer/index.php?printer=3',
|
||||
url: '<?php print getDolGlobalString('TAKEPOS_PRINT_SERVER'); ?>/printer/index.php?printer=3',
|
||||
data: 'invoice='+orderprinter3esc
|
||||
});
|
||||
<?php
|
||||
@@ -1419,7 +1422,7 @@ if ($action == "temp" && !empty($ticket_printer1)) {
|
||||
?>
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print',
|
||||
url: 'http://<?php print getDolGlobalString('TAKEPOS_PRINT_SERVER'); ?>:8111/print',
|
||||
data: '<?php
|
||||
print $header_soc.$header_ticket.$body_ticket.$ticket_printer1.$ticket_total.$footer_ticket; ?>'
|
||||
});
|
||||
@@ -1981,7 +1984,7 @@ if ($placeid > 0) {
|
||||
if ($line->product_label && $line->desc) {
|
||||
$htmlforlines .= '<br>';
|
||||
}
|
||||
$firstline = dolGetFirstLineOfText($line->desc, $conf->global->TAKEPOS_SHOW_N_FIRST_LINES);
|
||||
$firstline = dolGetFirstLineOfText($line->desc, getDolGlobalInt('TAKEPOS_SHOW_N_FIRST_LINES'));
|
||||
if ($firstline != $line->desc) {
|
||||
$htmlforlines .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc);
|
||||
} else {
|
||||
|
||||
@@ -187,7 +187,7 @@ if ($usestripeterminals && $invoice->type != $invoice::TYPE_CREDIT_NOTE) {
|
||||
if (!getDolGlobalString($keyforstripeterminalbank)) { ?>
|
||||
const config = {
|
||||
simulated: <?php if (empty($servicestatus) && getDolGlobalString('STRIPE_TERMINAL_SIMULATED')) { ?> true <?php } else { ?> false <?php } ?>
|
||||
<?php if (getDolGlobalString('STRIPE_LOCATION')) { ?>, location: '<?php echo $conf->global->STRIPE_LOCATION; ?>'<?php } ?>
|
||||
<?php if (getDolGlobalString('STRIPE_LOCATION')) { ?>, location: '<?php echo dol_escape_js(getDolGlobalString('STRIPE_LOCATION')); ?>'<?php } ?>
|
||||
}
|
||||
terminal.discoverReaders(config).then(function(discoverResult) {
|
||||
if (discoverResult.error) {
|
||||
@@ -233,8 +233,8 @@ if ($usestripeterminals && $invoice->type != $invoice::TYPE_CREDIT_NOTE) {
|
||||
</script>
|
||||
<?php
|
||||
|
||||
// Define list of possible payments
|
||||
$arrayOfValidPaymentModes = array();
|
||||
// Define list of possible payments
|
||||
$arrayOfValidPaymentModes = array();
|
||||
$arrayOfValidBankAccount = array();
|
||||
|
||||
$sql = "SELECT code, libelle as label FROM ".MAIN_DB_PREFIX."c_paiement";
|
||||
@@ -301,10 +301,10 @@ if (!getDolGlobalInt("TAKEPOS_NUMPAD")) {
|
||||
$('.change1').val(parseFloat(received));
|
||||
alreadypaydplusreceived=price2numjs(alreadypayed + parseFloat(received));
|
||||
//console.log("already+received = "+alreadypaydplusreceived);
|
||||
//console.log("total_ttc = "+<?php echo $invoice->total_ttc; ?>);
|
||||
if (alreadypaydplusreceived > <?php echo $invoice->total_ttc; ?>)
|
||||
//console.log("total_ttc = "+<?php echo (float) $invoice->total_ttc; ?>);
|
||||
if (alreadypaydplusreceived > <?php echo (float) $invoice->total_ttc; ?>)
|
||||
{
|
||||
var change=parseFloat(alreadypayed + parseFloat(received) - <?php echo $invoice->total_ttc; ?>);
|
||||
var change=parseFloat(alreadypayed + parseFloat(received) - <?php echo (float) $invoice->total_ttc; ?>);
|
||||
$('.change2').html(pricejs(change, 'MT'));
|
||||
$('.change2').val(change);
|
||||
$('.change1').removeClass('colorred');
|
||||
@@ -439,7 +439,7 @@ if (!getDolGlobalInt("TAKEPOS_NUMPAD")) {
|
||||
|
||||
fetchPaymentIntentClientSecret(amountpayed, invoiceid).then(function(client_secret) {
|
||||
<?php if (empty($servicestatus) && getDolGlobalString('STRIPE_TERMINAL_SIMULATED')) { ?>
|
||||
terminal.setSimulatorConfiguration({testCardNumber: '<?php echo $conf->global->STRIPE_TERMINAL_SIMULATED; ?>'});
|
||||
terminal.setSimulatorConfiguration({testCardNumber: '<?php echo dol_escape_js(getDolGlobalString('STRIPE_TERMINAL_SIMULATED')); ?>'});
|
||||
<?php } ?>
|
||||
document.getElementById("card-present-alert").innerHTML = '<div class="warning clearboth"><?php echo $langs->trans('PaymentSendToStripeTerminal'); ?></div>';
|
||||
terminal.collectPaymentMethod(client_secret).then(function(result) {
|
||||
|
||||
@@ -78,8 +78,11 @@ if (!$user->hasRight('takepos', 'run')) {
|
||||
|
||||
top_htmlhead('', '', 1);
|
||||
|
||||
if ($place > 0) {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$db->escape($_SESSION["takeposterminal"]."-".$place).")'";
|
||||
if ((string) $place != '') {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " WHERE ref = '(PROV-POS".$db->escape($_SESSION["takeposterminal"]."-".$place).")'";
|
||||
$sql .= " AND entity IN (".getEntity('invoice').")";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) {
|
||||
|
||||
@@ -69,7 +69,10 @@ $invoice = new Facture($db);
|
||||
if ($invoiceid > 0) {
|
||||
$invoice->fetch($invoiceid);
|
||||
} else {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " WHERE ref = '(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
||||
$sql .= " AND entity IN (".getEntity('invoice').")";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) {
|
||||
|
||||
@@ -62,7 +62,7 @@ if (!$user->hasRight('takepos', 'run')) {
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action=="split" && $user->hasRight('takepos', 'run')) {
|
||||
if ($action == "split" && $user->hasRight('takepos', 'run')) {
|
||||
$line = GETPOSTINT('line');
|
||||
$split = GETPOSTINT('split');
|
||||
if ($split==1) { // Split line
|
||||
@@ -85,16 +85,17 @@ if ($action=="split" && $user->hasRight('takepos', 'run')) {
|
||||
if ($placeid < 0) {
|
||||
dol_htmloutput_errors($invoice->error, $invoice->errors, 1);
|
||||
}
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-SPLIT)' where rowid=".$placeid;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET ref='(PROV-POS".$_SESSION["takeposterminal"]."-SPLIT)'";
|
||||
$sql .= " WHERE rowid = ".((int) $placeid);
|
||||
$db->query($sql);
|
||||
}
|
||||
}
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set fk_facture=".$placeid." where rowid=".$line;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET fk_facture = ".((int) $placeid)." WHERE rowid = ".((int) $line);
|
||||
$db->query($sql);
|
||||
} elseif ($split==0) { // Unsplit line
|
||||
$invoice = new Facture($db);
|
||||
if ($place=="SPLIT") {
|
||||
$place="0";
|
||||
if ($place == "SPLIT") {
|
||||
$place = "0";
|
||||
} // Avoid move line to the same place (from SPLIT to SPLIT place)
|
||||
$ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')');
|
||||
if ($ret > 0) {
|
||||
@@ -114,7 +115,9 @@ if ($action=="split" && $user->hasRight('takepos', 'run')) {
|
||||
if ($placeid < 0) {
|
||||
dol_htmloutput_errors($invoice->error, $invoice->errors, 1);
|
||||
}
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid=".$placeid;
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
||||
$sql .= " WHERE rowid = ".((int) $placeid);
|
||||
$db->query($sql);
|
||||
}
|
||||
}
|
||||
@@ -123,6 +126,7 @@ if ($action=="split" && $user->hasRight('takepos', 'run')) {
|
||||
}
|
||||
$invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-SPLIT)');
|
||||
$invoice->update_price();
|
||||
|
||||
$invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')');
|
||||
$invoice->update_price();
|
||||
}
|
||||
|
||||
@@ -5363,7 +5363,7 @@ img.boxhandle, img.boxclose {
|
||||
.add-filter-btn {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.search-component-assistance .operand, .operator, .value {
|
||||
.search-component-assistance .operand, .search-component-assistance .operator, .search-component-assistance .value {
|
||||
display: contents;
|
||||
}
|
||||
.search-component-assistance .btn-div{
|
||||
|
||||
@@ -5352,7 +5352,7 @@ img.boxhandle, img.boxclose {
|
||||
.add-filter-btn {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.search-component-assistance .operand, .operator, .value {
|
||||
.search-component-assistance .operand, .search-component-assistance .operator, .search-component-assistance .value {
|
||||
display: contents;
|
||||
}
|
||||
.search-component-assistance .btn-div{
|
||||
|
||||
Reference in New Issue
Block a user