mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2025-12-24 01:57:51 -05:00
Perform regex check in is_valid_receipt (#655)
This commit is contained in:
@@ -6,7 +6,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
php5-apcu
|
||||
|
||||
RUN a2enmod rewrite
|
||||
RUN docker-php-ext-install mysql mysqli
|
||||
RUN docker-php-ext-install mysql mysqli bcmath
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
@@ -251,9 +251,9 @@ class Receiving_lib
|
||||
function is_valid_receipt($receipt_receiving_id)
|
||||
{
|
||||
//RECV #
|
||||
$pieces = explode(' ',$receipt_receiving_id);
|
||||
$pieces = explode(' ', $receipt_receiving_id);
|
||||
|
||||
if(count($pieces)==2)
|
||||
if(count($pieces) == 2 && preg_match('/(RECV|KIT)/', $pieces[1]);
|
||||
{
|
||||
return $this->CI->Receiving->exists($pieces[1]);
|
||||
}
|
||||
@@ -262,7 +262,7 @@ class Receiving_lib
|
||||
return $this->CI->Receiving->get_receiving_by_invoice_number($receipt_receiving_id)->num_rows() > 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function is_valid_item_kit($item_kit_id)
|
||||
|
||||
Reference in New Issue
Block a user