Completed
Branch develop (7cbc1c)
by
unknown
18:30
created
htdocs/takepos/admin/setup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 print '<tr class="oddeven"><td>';
265 265
 print $langs->trans("NumberOfTerminals");
266 266
 print '<td>';
267
-print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="' . (!getDolGlobalString('TAKEPOS_NUM_TERMINALS') ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS)  . '">';
267
+print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="'.(!getDolGlobalString('TAKEPOS_NUM_TERMINALS') ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS).'">';
268 268
 print "</td></tr>\n";
269 269
 
270 270
 // Services
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	print '<tr class="oddeven"><td>';
405 405
 	print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"), 1, 'help', '', 0, 3, 'barcoderuleonsmartphone');
406 406
 	print '<td>';
407
-	print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="' . (getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')) . '">';
407
+	print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="'.(getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')).'">';
408 408
 	print "</td></tr>\n";
409 409
 }
410 410
 
@@ -483,12 +483,12 @@  discard block
 block discarded – undo
483 483
 	print '<tr class="oddeven"><td>';
484 484
 	print $langs->trans("SumupAffiliate");
485 485
 	print '<td colspan="2">';
486
-	print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="' . getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE').'"></input>';
486
+	print '<input type="text" name="TAKEPOS_SUMUP_AFFILIATE" value="'.getDolGlobalString('TAKEPOS_SUMUP_AFFILIATE').'"></input>';
487 487
 	print "</td></tr>\n";
488 488
 	print '<tr class="oddeven"><td>';
489 489
 	print $langs->trans("SumupAppId");
490 490
 	print '<td colspan="2">';
491
-	print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="' . getDolGlobalString('TAKEPOS_SUMUP_APPID').'"></input>';
491
+	print '<input type="text" name="TAKEPOS_SUMUP_APPID" value="'.getDolGlobalString('TAKEPOS_SUMUP_APPID').'"></input>';
492 492
 	print "</td></tr>\n";
493 493
 
494 494
 	print '</table>';
Please login to merge, or discard this patch.
htdocs/takepos/invoice.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 if ($invoiceid > 0) {
135 135
 	$ret = $invoice->fetch($invoiceid);
136 136
 } else {
137
-	$ret = $invoice->fetch('', '(PROV-POS'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '') .'-'.$place.')');
137
+	$ret = $invoice->fetch('', '(PROV-POS'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '').'-'.$place.')');
138 138
 }
139 139
 if ($ret > 0) {
140 140
 	$placeid = $invoice->id;
141 141
 }
142 142
 
143
-$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
143
+$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
144 144
 
145 145
 $soc = new Societe($db);
146 146
 if ($invoice->socid > 0) {
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
  * Actions
162 162
  */
163 163
 
164
-$parameters=array();
165
-$reshook=$hookmanager->executeHooks('doActions', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
164
+$parameters = array();
165
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
166 166
 if ($reshook < 0) {
167 167
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
168 168
 }
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 			$bankaccount = GETPOST('accountid', 'int');
178 178
 		} else {
179 179
 			if ($pay == 'LIQ') {
180
-				$bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]);            // For backward compatibility
180
+				$bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility
181 181
 			} elseif ($pay == "CHQ") {
182
-				$bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]);    // For backward compatibility
182
+				$bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility
183 183
 			} else {
184 184
 				$accountname = "CASHDESK_ID_BANKACCOUNT_".$pay.$_SESSION["takeposterminal"];
185 185
 				$bankaccount = getDolGlobalString($accountname);
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
 			$savconst = getDolGlobalString('STOCK_CALCULATE_ON_BILL');
240 240
 
241 241
 			if (isModEnabled('productbatch') && !getDolGlobalInt('CASHDESK_FORCE_DECREASE_STOCK')) {
242
-				$conf->global->STOCK_CALCULATE_ON_BILL = 0;	// To not change the stock (not yet compatible with batch management)
242
+				$conf->global->STOCK_CALCULATE_ON_BILL = 0; // To not change the stock (not yet compatible with batch management)
243 243
 			} else {
244
-				$conf->global->STOCK_CALCULATE_ON_BILL = 1;	// To force the change of stock
244
+				$conf->global->STOCK_CALCULATE_ON_BILL = 1; // To force the change of stock
245 245
 			}
246 246
 
247 247
 			$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 		}
316 316
 		// Update stock for batch products
317 317
 		if (isModEnabled('productbatch')) {
318
-			require_once DOL_DOCUMENT_ROOT . "/product/stock/class/mouvementstock.class.php";
318
+			require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
319 319
 			$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
320 320
 			foreach ($invoice->lines as $line) {
321 321
 				if ($line->batch && $line->fk_warehouse > 0) {
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 		$creditnote->socid = $invoice->socid;
338 338
 		$creditnote->date = dol_now();
339 339
 		$creditnote->module_source = 'takepos';
340
-		$creditnote->pos_source =  isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
340
+		$creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '';
341 341
 		$creditnote->type = Facture::TYPE_CREDIT_NOTE;
342 342
 		$creditnote->fk_facture_source = $placeid;
343 343
 		//$creditnote->remise_absolue = $invoice->remise_absolue;
@@ -488,9 +488,9 @@  discard block
 block discarded – undo
488 488
 	// If we add a line and no invoice yet, we create the invoice
489 489
 	if (($action == "addline" || $action == "freezone") && $placeid == 0) {
490 490
 		$invoice->socid = getDolGlobalString($constforcompanyid);
491
-		$invoice->date = dol_now('tzuserrel');		// We use the local date, only the day will be saved.
491
+		$invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved.
492 492
 		$invoice->module_source = 'takepos';
493
-		$invoice->pos_source =  isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
493
+		$invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '';
494 494
 		$invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity;
495 495
 
496 496
 		if ($invoice->socid <= 0) {
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 			$batch = GETPOST('batch', 'alpha');
533 533
 
534 534
 			if (!empty($batch)) {
535
-				$action="setbatch";
535
+				$action = "setbatch";
536 536
 			} else {
537 537
 				$nbofsuggested = 0;
538 538
 				$prod->load_stock('warehouseopen');
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 				echo "}";
553 553
 				echo "</script>";
554 554
 
555
-				if ($nbofsuggested>0) {
555
+				if ($nbofsuggested > 0) {
556 556
 					echo "<center>".$langs->trans("SearchIntoBatch").": <b> $nbofsuggested </b></center><br><table>";
557 557
 					foreach ($prod->stock_warehouse[getDolGlobalString($constantforkey)]->detail_batch as $dbatch) {	// $dbatch is instance of Productbatch
558 558
 						$batchStock = + $dbatch->qty; // To get a numeric
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 		if (getDolGlobalString('TAKEPOS_GROUP_SAME_PRODUCT')) {
614 614
 			foreach ($invoice->lines as $line) {
615 615
 				if ($line->product_ref == $prod->ref) {
616
-					if ($line->special_code==4) {
616
+					if ($line->special_code == 4) {
617 617
 						continue;
618 618
 					} // If this line is sended to printer create new line
619 619
 					// check if qty in stock
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 
664 664
 			// complete line by hook
665 665
 			$parameters = array('prod' => $prod, 'line' => $line);
666
-			$reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action);    // Note that $action and $line may have been modified by some hooks
666
+			$reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks
667 667
 			if ($reshook < 0) {
668 668
 				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
669 669
 			}
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 
719 719
 	if ($action == "addnote") {
720 720
 		$desc = GETPOST('addnote', 'alpha');
721
-		if ($idline==0) {
721
+		if ($idline == 0) {
722 722
 			$invoice->update_note($desc, '_public');
723 723
 		} else {
724 724
 			foreach ($invoice->lines as $line) {
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 				} else {
821 821
 					if (!$user->hasRight('takepos', 'editlines') || (!$user->hasRight('takepos', 'editorderedlines') && $line->special_code == "4")) {
822 822
 						dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
823
-					} elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT')  == 1) {
823
+					} elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) {
824 824
 						$result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
825 825
 					} else {
826 826
 						$result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
 		$invoice->fetch($placeid);
875 875
 	}
876 876
 
877
-	if ($action=="setbatch") {
877
+	if ($action == "setbatch") {
878 878
 		$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
879 879
 		$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set batch=".$db->escape($batch).", fk_warehouse=".getDolGlobalString($constantforkey)." where rowid=".((int) $idoflineadded);
880 880
 		$db->query($sql);
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
 		}
1022 1022
 		$sectionwithinvoicelink .= '</span><br>';
1023 1023
 		if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) {
1024
-			$sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>';
1024
+			$sectionwithinvoicelink .= ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>';
1025 1025
 		} elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
1026 1026
 			if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
1027 1027
 				$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
 if ((getDolGlobalString('TAKEPOS_PHONE_BASIC_LAYOUT') == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
1061 1061
 	$title = 'TakePOS - Dolibarr '.DOL_VERSION;
1062 1062
 	if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
1063
-		$title = 'TakePOS - ' . getDolGlobalString('MAIN_APPLICATION_TITLE');
1063
+		$title = 'TakePOS - '.getDolGlobalString('MAIN_APPLICATION_TITLE');
1064 1064
 	}
1065 1065
 	$head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/>
1066 1066
 	<meta name="apple-mobile-web-app-capable" content="yes">
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
 <script type="text/javascript">
1085 1085
 var selectedline=0;
1086 1086
 var selectedtext="";
1087
-<?php if ($action=="valid") {
1087
+<?php if ($action == "valid") {
1088 1088
 	echo "var place=0;";
1089 1089
 }?> // Set to default place after close sale
1090 1090
 var placeid=<?php echo($placeid > 0 ? $placeid : 0); ?>;
@@ -1276,7 +1276,7 @@  discard block
 block discarded – undo
1276 1276
 			if ($contactid > 0) {
1277 1277
 				$contact = new Contact($db);
1278 1278
 				$contact->fetch($contactid);
1279
-				$s .= " - " . $contact->getFullName($langs);
1279
+				$s .= " - ".$contact->getFullName($langs);
1280 1280
 			}
1281 1281
 		}
1282 1282
 	}
@@ -1337,10 +1337,10 @@  discard block
 block discarded – undo
1337 1337
 	$s = '';
1338 1338
 
1339 1339
 	$idwarehouse = 0;
1340
-	$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
1340
+	$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
1341 1341
 	if (isModEnabled('stock')) {
1342 1342
 		if (getDolGlobalString($constantforkey) != "1") {
1343
-			$constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
1343
+			$constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '');
1344 1344
 			$idwarehouse = getDolGlobalString($constantforkey);
1345 1345
 			if ($idwarehouse > 0) {
1346 1346
 				$s = '<span class="small">';
@@ -1483,8 +1483,8 @@  discard block
 block discarded – undo
1483 1483
 print '</td>';
1484 1484
 
1485 1485
 // complete header by hook
1486
-$parameters=array();
1487
-$reshook=$hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
1486
+$parameters = array();
1487
+$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
1488 1488
 if ($reshook < 0) {
1489 1489
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1490 1490
 }
@@ -1495,16 +1495,16 @@  discard block
 block discarded – undo
1495 1495
 	print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
1496 1496
 	if (getDolGlobalString('TAKEPOS_SHOW_HT')) {
1497 1497
 		print '<td class="linecolht right nowraponall">';
1498
-		print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>';
1498
+		print '<span class="opacitymedium small">'.$langs->trans('TotalHTShort').'</span><br>';
1499 1499
 		// In phone version only show when it is invoice page
1500 1500
 		if (empty($mobilepage) || $mobilepage == "invoice") {
1501
-			print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>';
1501
+			print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">'.price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency).'</span>';
1502 1502
 			if (isModEnabled('multicurrency') && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) {
1503 1503
 				//Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency
1504
-				include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php';
1504
+				include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
1505 1505
 				$multicurrency = new MultiCurrency($db);
1506 1506
 				$multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]);
1507
-				print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>';
1507
+				print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>';
1508 1508
 			}
1509 1509
 		}
1510 1510
 		print '</td>';
@@ -1649,8 +1649,8 @@  discard block
 block discarded – undo
1649 1649
 				$htmlsupplements[$line->fk_parent_line] .= '</td>';
1650 1650
 
1651 1651
 				// complete line by hook
1652
-				$parameters=array('line' => $line);
1653
-				$reshook=$hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
1652
+				$parameters = array('line' => $line);
1653
+				$reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
1654 1654
 				if ($reshook < 0) {
1655 1655
 					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1656 1656
 				}
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
 					}
1700 1700
 				}
1701 1701
 				if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) {
1702
-					$htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext);
1702
+					$htmlforlines .= $form->textwithpicto($line->product_label ? '<b>'.$line->product_ref.'</b> - '.$line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext);
1703 1703
 				} elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) {
1704 1704
 					$htmlforlines .= $form->textwithpicto($line->product_ref ? '<b>'.$line->product_ref.'<b>' : dolGetFirstLineOfText($line->desc, 1), $tooltiptext);
1705 1705
 				} else {
@@ -1745,8 +1745,8 @@  discard block
 block discarded – undo
1745 1745
 				$htmlforlines .= '</td>';
1746 1746
 
1747 1747
 				// complete line by hook
1748
-				$parameters=array('line' => $line);
1749
-				$reshook=$hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action);    // Note that $action and $object may have been modified by some hooks
1748
+				$parameters = array('line' => $line);
1749
+				$reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
1750 1750
 				if ($reshook < 0) {
1751 1751
 					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1752 1752
 				}
@@ -1842,7 +1842,7 @@  discard block
 block discarded – undo
1842 1842
 if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE && !getDolGlobalString('TAKEPOS_NO_CREDITNOTE')) {
1843 1843
 	print '<button id="buttonprint" type="button" onclick="ModalBox(\'ModalCreditNote\')">'.$langs->trans('CreateCreditNote').'</button>';
1844 1844
 	if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) {
1845
-		print ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>';
1845
+		print ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>';
1846 1846
 	}
1847 1847
 }
1848 1848
 
Please login to merge, or discard this patch.