Fix always fallback invoice item column settings for show and template.
This commit is contained in:
parent
8afee14fea
commit
f0415e31e3
@ -1252,9 +1252,11 @@ abstract class Show extends Component
|
|||||||
return $hideName;
|
return $hideName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hideName = setting($this->getDocumentSettingKey($type, 'item_name'), false);
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideName = setting($this->getDocumentSettingKey($type, 'item_name'), false) && $hideName == 'hide') {
|
if ($hideName === 'hide') {
|
||||||
return $hideName;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'name');
|
$hide = $this->getHideFromConfig($type, 'name');
|
||||||
@ -1263,8 +1265,7 @@ abstract class Show extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.item_name', $hideName) == 'hide' ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHideDescription($type, $hideDescription)
|
protected function getHideDescription($type, $hideDescription)
|
||||||
@ -1274,8 +1275,8 @@ abstract class Show extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideDescription = setting($this->getDocumentSettingKey($type, 'hide_item_description'), false)) {
|
if (setting($this->getDocumentSettingKey($type, 'hide_item_description'), false)) {
|
||||||
return $hideDescription;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'description');
|
$hide = $this->getHideFromConfig($type, 'description');
|
||||||
@ -1284,8 +1285,7 @@ abstract class Show extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.hide_item_description', $hideDescription);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHideQuantity($type, $hideQuantity)
|
protected function getHideQuantity($type, $hideQuantity)
|
||||||
@ -1294,9 +1294,11 @@ abstract class Show extends Component
|
|||||||
return $hideQuantity;
|
return $hideQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hideQuantity = setting($this->getDocumentSettingKey($type, 'quantity_name'), false);
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideQuantity = setting($this->getDocumentSettingKey($type, 'hide_quantity'), false) && $hideQuantity == 'hide') {
|
if ($hideQuantity === 'hide') {
|
||||||
return $hideQuantity;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'quantity');
|
$hide = $this->getHideFromConfig($type, 'quantity');
|
||||||
@ -1305,8 +1307,7 @@ abstract class Show extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.quantity_name', $hideQuantity) == 'hide' ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHidePrice($type, $hidePrice)
|
protected function getHidePrice($type, $hidePrice)
|
||||||
@ -1315,9 +1316,11 @@ abstract class Show extends Component
|
|||||||
return $hidePrice;
|
return $hidePrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hidePrice = setting($this->getDocumentSettingKey($type, 'price_name'), false);
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hidePrice = setting($this->getDocumentSettingKey($type, 'hide_price'), false) && $hidePrice == 'hide') {
|
if ($hidePrice === 'hide') {
|
||||||
return $hidePrice;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'price');
|
$hide = $this->getHideFromConfig($type, 'price');
|
||||||
@ -1326,8 +1329,7 @@ abstract class Show extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.price_name', $hidePrice) == 'hide' ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHideDiscount($type, $hideDiscount)
|
protected function getHideDiscount($type, $hideDiscount)
|
||||||
@ -1358,8 +1360,8 @@ abstract class Show extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideAmount = setting($this->getDocumentSettingKey($type, 'hide_amount'), false)) {
|
if (setting($this->getDocumentSettingKey($type, 'hide_amount'), false)) {
|
||||||
return $hideAmount;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'amount');
|
$hide = $this->getHideFromConfig($type, 'amount');
|
||||||
@ -1368,7 +1370,6 @@ abstract class Show extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.hide_amount', $hideAmount);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -589,9 +589,11 @@ abstract class Template extends Component
|
|||||||
return $hideName;
|
return $hideName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hideName = setting($this->getDocumentSettingKey($type, 'item_name'), false);
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideName = setting($this->getDocumentSettingKey($type, 'item_name'), false) && $hideName == 'hide') {
|
if ($hideName === 'hide') {
|
||||||
return $hideName;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'name');
|
$hide = $this->getHideFromConfig($type, 'name');
|
||||||
@ -600,8 +602,7 @@ abstract class Template extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.item_name', $hideName) == 'hide' ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHideDescription($type, $hideDescription)
|
protected function getHideDescription($type, $hideDescription)
|
||||||
@ -611,8 +612,8 @@ abstract class Template extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideDescription = setting($this->getDocumentSettingKey($type, 'hide_item_description'), false)) {
|
if (setting($this->getDocumentSettingKey($type, 'hide_item_description'), false)) {
|
||||||
return $hideDescription;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'description');
|
$hide = $this->getHideFromConfig($type, 'description');
|
||||||
@ -621,8 +622,7 @@ abstract class Template extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.hide_item_description', $hideDescription);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHideQuantity($type, $hideQuantity)
|
protected function getHideQuantity($type, $hideQuantity)
|
||||||
@ -631,9 +631,11 @@ abstract class Template extends Component
|
|||||||
return $hideQuantity;
|
return $hideQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hideQuantity = setting($this->getDocumentSettingKey($type, 'quantity_name'), false);
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideQuantity = setting($this->getDocumentSettingKey($type, 'hide_quantity'), false) && $hideQuantity == 'hide') {
|
if ($hideQuantity === 'hide') {
|
||||||
return $hideQuantity;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'quantity');
|
$hide = $this->getHideFromConfig($type, 'quantity');
|
||||||
@ -642,8 +644,7 @@ abstract class Template extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.quantity_name', $hideQuantity) == 'hide' ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHidePrice($type, $hidePrice)
|
protected function getHidePrice($type, $hidePrice)
|
||||||
@ -652,9 +653,11 @@ abstract class Template extends Component
|
|||||||
return $hidePrice;
|
return $hidePrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hidePrice = setting($this->getDocumentSettingKey($type, 'price_name'), false);
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hidePrice = setting($this->getDocumentSettingKey($type, 'hide_price'), false) && $hidePrice == 'hide') {
|
if ($hidePrice === 'hide') {
|
||||||
return $hidePrice;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'price');
|
$hide = $this->getHideFromConfig($type, 'price');
|
||||||
@ -663,8 +666,7 @@ abstract class Template extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.price_name', $hidePrice) == 'hide' ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getHideDiscount($type, $hideDiscount)
|
protected function getHideDiscount($type, $hideDiscount)
|
||||||
@ -695,8 +697,8 @@ abstract class Template extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if you use settting translation
|
// if you use settting translation
|
||||||
if ($hideAmount = setting($this->getDocumentSettingKey($type, 'hide_amount'), false)) {
|
if (setting($this->getDocumentSettingKey($type, 'hide_amount'), false)) {
|
||||||
return $hideAmount;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hide = $this->getHideFromConfig($type, 'amount');
|
$hide = $this->getHideFromConfig($type, 'amount');
|
||||||
@ -705,8 +707,7 @@ abstract class Template extends Component
|
|||||||
return $hide;
|
return $hide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo what return value invoice or always false??
|
return false;
|
||||||
return setting('invoice.hide_amount', $hideAmount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getPrint($print)
|
protected function getPrint($print)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user