Document field default name

This commit is contained in:
Cüneyt Şentürk
2020-12-28 22:10:43 +03:00
parent 50eaa40327
commit 918c5af23e
5 changed files with 197 additions and 338 deletions

View File

@ -545,16 +545,14 @@ abstract class DocumentIndex extends Component
}
switch ($type) {
case 'sale':
case 'income':
case 'invoice':
$textContactName = 'general.customers';
break;
case 'bill':
case 'expense':
case 'purchase':
$textContactName = 'general.vendors';
break;
default:
$textContactName = 'general.customers';
break;
}
return $textContactName;
@ -593,16 +591,14 @@ abstract class DocumentIndex extends Component
}
switch ($type) {
case 'sale':
case 'income':
case 'invoice':
$textIssueAt = 'invoices.invoice_date';
break;
case 'bill':
case 'expense':
case 'purchase':
$textIssueAt = 'bills.bill_date';
break;
default:
$textIssueAt = 'invoices.invoice_date';
break;
}
return $textIssueAt;
@ -628,16 +624,14 @@ abstract class DocumentIndex extends Component
}
switch ($type) {
case 'sale':
case 'income':
case 'invoice':
$textDueAt = 'invoices.due_date';
break;
case 'bill':
case 'expense':
case 'purchase':
$textDueAt = 'bills.due_date';
break;
default:
$textDueAt = 'invoices.due_date';
break;
}
return $textDueAt;
@ -663,16 +657,14 @@ abstract class DocumentIndex extends Component
}
switch ($type) {
case 'sale':
case 'income':
case 'invoice':
$textDocumentStatus = 'invoices.statuses.';
break;
case 'bill':
case 'expense':
case 'purchase':
$textDocumentStatus = 'bills.statuses.';
break;
default:
$textDocumentStatus = 'invoices.statuses.';
break;
}
return $textDocumentStatus;