Browse Source

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 năm trước cách đây
mục cha
commit
9e66c9c851
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
 				}