mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Fix requisitions (#4147)
* Fix data types on null values * Fix receiving receipt image tag * Fix error on Receiving Model
This commit is contained in:
@@ -246,7 +246,7 @@ class Receiving_lib
|
||||
* @param string $stock_destination
|
||||
* @return void
|
||||
*/
|
||||
public function set_stock_destination(string $stock_destination): void
|
||||
public function set_stock_destination(?string $stock_destination): void
|
||||
{
|
||||
$this->session->set('recv_stock_destination', $stock_destination);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class Receiving extends Model
|
||||
/**
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function save_value(array $items, int $supplier_id, int $employee_id, string $comment, string $reference, string $payment_type, int $receiving_id = NEW_ENTRY): int //TODO: $receiving_id gets overwritten before it's evaluated. It doesn't make sense to pass this here.
|
||||
public function save_value(array $items, int $supplier_id, int $employee_id, string $comment, string $reference, ?string $payment_type, int $receiving_id = NEW_ENTRY): int //TODO: $receiving_id gets overwritten before it's evaluated. It doesn't make sense to pass this here.
|
||||
{
|
||||
$attribute = model(Attribute::class);
|
||||
$inventory = model('Inventory');
|
||||
@@ -187,7 +187,6 @@ class Receiving extends Model
|
||||
|
||||
$inventory->insert($inv_data, false);
|
||||
$attribute->copy_attribute_links($item_data['item_id'], 'receiving_id', $receiving_id);
|
||||
$supplier = $supplier->get_info($supplier_id); //TODO: supplier is never used after this.
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
if ($config['company_logo'] != '')
|
||||
{
|
||||
?>
|
||||
<div id="company_name"><img id="image" src="<?= esc(base_url('uploads/' . $config['company_logo']), 'url') ?>" alt="company_logo" /></div>
|
||||
<div id="company_name">
|
||||
<img id="image" src="<?= base_url('uploads/' . esc($config['company_logo'], 'url')) ?>" alt="company_logo" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -219,7 +219,7 @@ if (isset($success))
|
||||
{
|
||||
?>
|
||||
<td><?= $item['discount'] ?></td>
|
||||
<?= form_hidden('discount', $item['discount']) ?>
|
||||
<?= form_hidden('discount', (string)$item['discount']) ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user