diff --git a/client/src/common/errors.js b/client/src/common/errors.js index 5b50b487a..e69a3f199 100644 --- a/client/src/common/errors.js +++ b/client/src/common/errors.js @@ -1,6 +1,7 @@ export const ERROR = { // Sales Estimates ESTIMATE_NUMBER_IS_NOT_UNQIUE: 'ESTIMATE.NUMBER.IS.NOT.UNQIUE', + SALE_ESTIMATE_NO_IS_REQUIRED: 'SALE_ESTIMATE_NO_IS_REQUIRED', // Sales Invoices SALE_INVOICE_NUMBER_IS_EXISTS: 'SALE.INVOICE.NUMBER.IS.EXISTS', @@ -13,5 +14,5 @@ export const ERROR = { // Bills BILL_NUMBER_EXISTS: 'BILL.NUMBER.EXISTS', - SALE_INVOICE_NO_IS_REQUIRED: 'SALE_INVOICE_NO_IS_REQUIRED' + SALE_INVOICE_NO_IS_REQUIRED: 'SALE_INVOICE_NO_IS_REQUIRED', }; diff --git a/client/src/containers/Accounting/JournalsLanding/utils.js b/client/src/containers/Accounting/JournalsLanding/utils.js index b02a05ead..1a6dc19cb 100644 --- a/client/src/containers/Accounting/JournalsLanding/utils.js +++ b/client/src/containers/Accounting/JournalsLanding/utils.js @@ -33,7 +33,7 @@ export const useManualJournalsColumns = () => { { id: 'journal_number', Header: intl.get('journal_no'), - accessor: (row) => `#${row.journal_number}`, + accessor: (row) => `${row.journal_number}`, className: 'journal_number', width: 100, clickable: true, diff --git a/client/src/containers/Purchases/Bills/BillsLanding/components.js b/client/src/containers/Purchases/Bills/BillsLanding/components.js index 4a8b3a8c2..9cd1ec6fa 100644 --- a/client/src/containers/Purchases/Bills/BillsLanding/components.js +++ b/client/src/containers/Purchases/Bills/BillsLanding/components.js @@ -165,7 +165,7 @@ export function useBillsTableColumns() { { id: 'bill_number', Header: intl.get('bill_number'), - accessor: (row) => (row.bill_number ? `#${row.bill_number}` : null), + accessor: (row) => (row.bill_number ? `${row.bill_number}` : null), width: 100, className: 'bill_number', clickable: true, diff --git a/client/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js b/client/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js index 78a7e5c84..887652c82 100644 --- a/client/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js +++ b/client/src/containers/Purchases/PaymentMades/PaymentForm/PaymentMadeForm.js @@ -84,7 +84,7 @@ function PaymentMadeForm({ if (totalPaymentAmount <= 0) { AppToaster.show({ message: intl.get('you_cannot_make_payment_with_zero_total_amount'), - intent: Intent.WARNING, + intent: Intent.DANGER, }); return; } diff --git a/client/src/containers/Purchases/PaymentMades/PaymentsLanding/components.js b/client/src/containers/Purchases/PaymentMades/PaymentsLanding/components.js index 9c27a10c5..875817ca7 100644 --- a/client/src/containers/Purchases/PaymentMades/PaymentsLanding/components.js +++ b/client/src/containers/Purchases/PaymentMades/PaymentsLanding/components.js @@ -88,7 +88,7 @@ export function usePaymentMadesTableColumns() { id: 'payment_number', Header: intl.get('payment_number'), accessor: (row) => - row.payment_number ? `#${row.payment_number}` : null, + row.payment_number ? `${row.payment_number}` : null, width: 140, className: 'payment_number', clickable: true, diff --git a/client/src/containers/Sales/Estimates/EstimateForm/EstimateForm.js b/client/src/containers/Sales/Estimates/EstimateForm/EstimateForm.js index 4bb8f542b..0ee6b7979 100644 --- a/client/src/containers/Sales/Estimates/EstimateForm/EstimateForm.js +++ b/client/src/containers/Sales/Estimates/EstimateForm/EstimateForm.js @@ -78,6 +78,13 @@ function EstimateForm({ estimate_number: intl.get('estimate_number_is_not_unqiue'), }); } + if ( + errors.some((error) => error.type === ERROR.SALE_ESTIMATE_NO_IS_REQUIRED) + ) { + setErrors({ + estimate_number: intl.get('estimate.field.error.estimate_number_required'), + }); + } }; // Handles form submit. diff --git a/client/src/containers/Sales/Estimates/EstimatesLanding/components.js b/client/src/containers/Sales/Estimates/EstimatesLanding/components.js index 6eae9fba8..22c95f3ae 100644 --- a/client/src/containers/Sales/Estimates/EstimatesLanding/components.js +++ b/client/src/containers/Sales/Estimates/EstimatesLanding/components.js @@ -169,7 +169,7 @@ export function useEstiamtesTableColumns() { id: 'estimate_number', Header: intl.get('estimate_number'), accessor: (row) => - row.estimate_number ? `#${row.estimate_number}` : null, + row.estimate_number ? `${row.estimate_number}` : null, width: 140, className: 'estimate_number', clickable: true, diff --git a/client/src/containers/Sales/Invoices/InvoiceForm/InvoiceFormHeaderFields.js b/client/src/containers/Sales/Invoices/InvoiceForm/InvoiceFormHeaderFields.js index 96594a06c..1775d8d78 100644 --- a/client/src/containers/Sales/Invoices/InvoiceForm/InvoiceFormHeaderFields.js +++ b/client/src/containers/Sales/Invoices/InvoiceForm/InvoiceFormHeaderFields.js @@ -153,6 +153,7 @@ function InvoiceFormHeaderFields({ {({ form, field, meta: { error, touched } }) => ( } + labelInfo={} inline={true} className={classNames('form-group--invoice-no', CLASSES.FILL)} intent={inputIntent({ error, touched })} diff --git a/client/src/containers/Sales/Invoices/InvoiceForm/utils.js b/client/src/containers/Sales/Invoices/InvoiceForm/utils.js index 96f658788..6874b6b0a 100644 --- a/client/src/containers/Sales/Invoices/InvoiceForm/utils.js +++ b/client/src/containers/Sales/Invoices/InvoiceForm/utils.js @@ -93,8 +93,7 @@ export const transformErrors = (errors, { setErrors }) => { errors.some((error) => error.type === ERROR.SALE_INVOICE_NO_IS_REQUIRED) ) { setErrors({ - invoice_no: - 'Invoice number is required, use auto-increment mode or enter manually.', + invoice_no: intl.get('invoice.field.error.invoice_no_required'), }); } }; diff --git a/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveForm.js b/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveForm.js index 3998bf8aa..2ef789189 100644 --- a/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveForm.js +++ b/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveForm.js @@ -106,7 +106,6 @@ function PaymentReceiveForm({ message: intl.get('you_cannot_make_payment_with_zero_total_amount'), intent: Intent.DANGER, }); - setSubmitting(false); return; } const form = { diff --git a/client/src/containers/Sales/PaymentReceives/PaymentsLanding/components.js b/client/src/containers/Sales/PaymentReceives/PaymentsLanding/components.js index 06053275f..3efda0329 100644 --- a/client/src/containers/Sales/PaymentReceives/PaymentsLanding/components.js +++ b/client/src/containers/Sales/PaymentReceives/PaymentsLanding/components.js @@ -110,7 +110,7 @@ export function usePaymentReceivesColumns() { id: 'payment_receive_no', Header: intl.get('payment_receive_no'), accessor: (row) => - row.payment_receive_no ? `#${row.payment_receive_no}` : null, + row.payment_receive_no ? `${row.payment_receive_no}` : null, width: 140, className: 'payment_receive_no', clickable: true, diff --git a/client/src/lang/en/index.json b/client/src/lang/en/index.json index 8d554b936..6225ef178 100644 --- a/client/src/lang/en/index.json +++ b/client/src/lang/en/index.json @@ -1324,7 +1324,9 @@ "auto_increment.field.manually": "I will enter them manually each time", "auto_increment.field.manual_this_transaction": "Manual entering for this transaction.", "auto_increment.field.auto": "Auto-incrementing number.", - "date_format": { + "date_formats": { "YYYY MMM DD": "YYYY MMM DD" - } + }, + "estimate.field.error.estimate_number_required": "Estimate number is required, use auto-increment mode or enter manually.", + "invoice.field.error.invoice_no_required": "Invoice number is required, use auto-increment mode or enter manually" } \ No newline at end of file