Fixed document notes field default value.

This commit is contained in:
Cüneyt Şentürk
2022-06-03 09:46:54 +03:00
parent 889640c1bd
commit 84fc25ee1a
2 changed files with 10 additions and 10 deletions

View File

@ -204,7 +204,7 @@ abstract class Form extends Component
/* -- Items End -- */ /* -- Items End -- */
/** @var string */ /** @var string */
public $note; public $notes;
/* -- Main End -- */ /* -- Main End -- */
/* -- Recurring Start -- */ /* -- Recurring Start -- */
@ -277,7 +277,7 @@ abstract class Form extends Component
bool $hideDocumentNumber = false, string $textDocumentNumber = '', string $documentNumber = '', bool $hideOrderNumber = false, string $textOrderNumber = '', string $orderNumber = '', bool $hideDocumentNumber = false, string $textDocumentNumber = '', string $documentNumber = '', bool $hideOrderNumber = false, string $textOrderNumber = '', string $orderNumber = '',
bool $hideEditItemColumns = false, bool $hideItems = false, bool $hideItemName = false, string $textItemName = '', bool $hideItemDescription = false, string $textItemDescription = '', bool $hideEditItemColumns = false, bool $hideItems = false, bool $hideItemName = false, string $textItemName = '', bool $hideItemDescription = false, string $textItemDescription = '',
bool $hideItemQuantity = false, string $textItemQuantity = '', bool $hideItemPrice = false, string $textItemPrice = '', bool $hideItemAmount = false, string $textItemAmount = '', bool $hideItemQuantity = false, string $textItemQuantity = '', bool $hideItemPrice = false, string $textItemPrice = '', bool $hideItemAmount = false, string $textItemAmount = '',
bool $hideDiscount = false, bool $isSalePrice = false, bool $isPurchasePrice = false, int $searchCharLimit = 0, string $note = '', bool $hideDiscount = false, bool $isSalePrice = false, bool $isPurchasePrice = false, int $searchCharLimit = 0, string $notes = '',
bool $showRecurring = false, bool $showRecurring = false,
bool $hideAdvanced = false, string $textSectionAdvancedTitle = '', string $textSectionAdvancedDescription = '', bool $hideAdvanced = false, string $textSectionAdvancedTitle = '', string $textSectionAdvancedDescription = '',
bool $hideFooter = false, string $classFooter = '', string $footer = '', bool $hideFooter = false, string $classFooter = '', string $footer = '',
@ -376,9 +376,9 @@ abstract class Form extends Component
$this->searchCharLimit = $this->getSearchCharLimit($type, $searchCharLimit); $this->searchCharLimit = $this->getSearchCharLimit($type, $searchCharLimit);
/** Items End */ /** Items End */
/** Note Start */ /** Notes Start */
$this->note = $this->getNoteValue($note); $this->notes = $this->getNotesValue($notes);
/** Note End */ /** Notes End */
/** Main End */ /** Main End */
/* -- Recurring Start -- */ /* -- Recurring Start -- */
@ -1136,17 +1136,17 @@ abstract class Form extends Component
return setting('invoice.item_search_char_limit', $searchCharLimit); return setting('invoice.item_search_char_limit', $searchCharLimit);
} }
protected function getNoteValue($note) protected function getNotesValue($notes)
{ {
if (! empty($note)) { if (! empty($notes)) {
return $note; return $notes;
} }
if (! empty($this->document)) { if (! empty($this->document)) {
return $this->document->notes; return $this->document->notes;
} }
return setting($this->getSettingKey($this->type, 'note')); return setting($this->getSettingKey($this->type, 'notes'));
} }
protected function getTextSectionAdvancedTitle($type, $textSectionAdvancedTitle) protected function getTextSectionAdvancedTitle($type, $textSectionAdvancedTitle)

View File

@ -2,7 +2,7 @@
<x-form.group.textarea <x-form.group.textarea
name="notes" name="notes"
label="{{ trans_choice('general.notes', 2) }}" label="{{ trans_choice('general.notes', 2) }}"
:value="$note" :value="$notes"
not-required not-required
class="form-element border-0 bg-transparent px-0 rounded-none resize-none" class="form-element border-0 bg-transparent px-0 rounded-none resize-none"
form-label-class="lg:text-lg" form-label-class="lg:text-lg"