mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Disable product price updating if currencies do not match
This commit is contained in:
parent
d293c28a55
commit
d9047b413a
@ -55,6 +55,9 @@ class UpdateOrCreateProduct implements ShouldQueue
|
||||
{
|
||||
MultiDB::setDB($this->company->db);
|
||||
|
||||
if(strval($this->invoice->client->getSetting('currency_id')) != strval($this->company->settings->currency_id))
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the invoice was generated from a Task or Expense then
|
||||
* we do NOT update the product details this short block we
|
||||
|
@ -55,4 +55,36 @@ class CompanySettingsTest extends TestCase
|
||||
|
||||
$this->assertEquals(1, count($diff));
|
||||
}
|
||||
|
||||
public function testStringEquivalence()
|
||||
{
|
||||
|
||||
$value = (strval(4) != strval(3));
|
||||
|
||||
$this->assertTrue($value);
|
||||
|
||||
$value = (strval(4) != strval(4));
|
||||
|
||||
$this->assertFalse($value);
|
||||
|
||||
$value = (strval('4') != strval(4));
|
||||
$this->assertFalse($value);
|
||||
|
||||
$value = (strval('4') != strval('4'));
|
||||
|
||||
$this->assertFalse($value);
|
||||
|
||||
$value = (strval('4') != strval(3));
|
||||
|
||||
$this->assertTrue($value);
|
||||
|
||||
$value = (strval(4) != strval('3'));
|
||||
|
||||
$this->assertTrue($value);
|
||||
|
||||
$value = (strval('4') != strval('3'));
|
||||
|
||||
$this->assertTrue($value);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user