瀏覽代碼

FIX Direct payment in TakePOS and PHP 8

With the new version of PHP 8 the direct payment in TakePOS does not work according to these changes:
https://www.php.net/manual/en/migration80.incompatible.php
andreubisquerra 2 年之前
父節點
當前提交
9e66c9c851
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      htdocs/takepos/invoice.php

+ 1 - 1
htdocs/takepos/invoice.php

@@ -274,7 +274,7 @@ if (empty($reshook)) {
 
 				// If user has not used change control, add total invoice payment
 				// Or if user has used change control and the amount of payment is higher than remain to pay, add the remain to pay
-				if ($amountofpayment == 0 || $amountofpayment > $remaintopay) {
+				if ($amountofpayment <= 0 || $amountofpayment > $remaintopay) {
 					$payment->amounts[$invoice->id] = $remaintopay;
 				}