document type

This commit is contained in:
Cüneyt Şentürk 2021-01-09 22:42:18 +03:00
parent 12e063eaff
commit 77264525a7
2 changed files with 15 additions and 14 deletions

View File

@ -310,7 +310,7 @@ abstract class DocumentForm extends Base
} }
$parameters = [ $parameters = [
config('type.' . $type. '.route.parameter') => $document->id config('type.' . $type. '.route.parameter') => $document->id,
]; ];
$route = $this->getRouteFromConfig($type, 'update', $parameters); $route = $this->getRouteFromConfig($type, 'update', $parameters);
@ -354,10 +354,10 @@ abstract class DocumentForm extends Base
return $contact; return $contact;
} }
protected function getContactType($type, $contact_type) protected function getContactType($type, $contactType)
{ {
if (!empty($contact_type)) { if (!empty($contactType)) {
return $contact_type; return $contactType;
} }
if ($contact_type = config('type.' . $type . '.contact_type')) { if ($contact_type = config('type.' . $type . '.contact_type')) {
@ -476,7 +476,7 @@ abstract class DocumentForm extends Base
return [ return [
'general.form.choose_different', 'general.form.choose_different',
'general.customers' 'general.customers',
]; ];
} }
@ -501,10 +501,10 @@ abstract class DocumentForm extends Base
return $issuedAt; return $issuedAt;
} }
protected function getDocumentNumber($type, $document, $document_number) protected function getDocumentNumber($type, $document, $documentNumber)
{ {
if (!empty($document_number)) { if (!empty($documentNumber)) {
return $document_number; return $documentNumber;
} }
if ($document) { if ($document) {
@ -520,10 +520,10 @@ abstract class DocumentForm extends Base
return $document_number; return $document_number;
} }
protected function getDueAt($type, $document, $due_at) protected function getDueAt($type, $document, $dueAt)
{ {
if (!empty($due_at)) { if (!empty($dueAt)) {
return $due_at; return $dueAt;
} }
if ($document) { if ($document) {
@ -546,10 +546,10 @@ abstract class DocumentForm extends Base
return $due_at; return $due_at;
} }
protected function getOrderNumber($type, $document, $order_number) protected function getOrderNumber($type, $document, $orderNumber)
{ {
if (!empty($order_number)) { if (!empty($orderNumber)) {
return $order_number; return $orderNumber;
} }
if ($document) { if ($document) {

View File

@ -25,6 +25,7 @@ return [
], ],
'contact_type' => 'customer', // use contact type 'contact_type' => 'customer', // use contact type
'hide' => [], // for document items 'hide' => [], // for document items
'class' => [],
], ],
Document::BILL_TYPE => [ Document::BILL_TYPE => [