mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Ratteb
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -153,6 +153,7 @@ function InvoiceFormHeaderFields({
|
||||
{({ form, field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'invoice_no'} />}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
inline={true}
|
||||
className={classNames('form-group--invoice-no', CLASSES.FILL)}
|
||||
intent={inputIntent({ error, touched })}
|
||||
|
||||
@@ -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'),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user