mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: BIG-352 Add terms and conditions/notes field to a warehouse transfer.
This commit is contained in:
@@ -3,24 +3,28 @@ import intl from 'react-intl-universal';
|
||||
import styled from 'styled-components';
|
||||
import { FFormGroup, FEditableText, FormattedMessage as T } from 'components';
|
||||
|
||||
/**
|
||||
* Payment made form footer left-side.
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
export function PaymentMadeFormFooterLeft() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{/* --------- Statement--------- */}
|
||||
<StatementFormGroup
|
||||
name={'statement'}
|
||||
label={<T id={'payment_made_form.label.statement'} />}
|
||||
hintText={'Will be displayed on the Payment'}
|
||||
{/* --------- Internal Note--------- */}
|
||||
<InternalNoteFormGroup
|
||||
name={'internal_note'}
|
||||
label={<T id={'payment_made.form.internal_note.label'} />}
|
||||
>
|
||||
<FEditableText
|
||||
name={'statement'}
|
||||
placeholder={intl.get('payment_made_form.statement.placeholder')}
|
||||
name={'internal_note'}
|
||||
placeholder={intl.get('payment_made.form.internal_note.placeholder')}
|
||||
/>
|
||||
</StatementFormGroup>
|
||||
</InternalNoteFormGroup>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
const StatementFormGroup = styled(FFormGroup)`
|
||||
|
||||
const InternalNoteFormGroup = styled(FFormGroup)`
|
||||
&.bp3-form-group {
|
||||
margin-bottom: 40px;
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ function PaymentMadeFormProvider({ query, paymentMadeId, ...props }) {
|
||||
<DashboardInsider
|
||||
loading={
|
||||
isVendorsLoading ||
|
||||
isItemsFetching ||
|
||||
isItemsLoading ||
|
||||
isAccountsLoading ||
|
||||
isPaymentLoading
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ export function CreditNoteFormFooterLeft() {
|
||||
<CreditNoteMsgFormGroup
|
||||
name={'note'}
|
||||
label={<T id={'credit_note.label_customer_note'} />}
|
||||
hintText={'Will be displayed on the invoice'}
|
||||
>
|
||||
<FEditableText
|
||||
name={'note'}
|
||||
@@ -24,9 +23,9 @@ export function CreditNoteFormFooterLeft() {
|
||||
>
|
||||
<FEditableText
|
||||
name={'terms_conditions'}
|
||||
placeholder={
|
||||
<T id={'credit_note.label_terms_and_conditions.placeholder'} />
|
||||
}
|
||||
placeholder={intl.get(
|
||||
'credit_note.label_terms_and_conditions.placeholder',
|
||||
)}
|
||||
/>
|
||||
</TermsConditsFormGroup>
|
||||
</React.Fragment>
|
||||
|
||||
@@ -10,7 +10,6 @@ export function InvoiceFormFooterLeft() {
|
||||
<InvoiceMsgFormGroup
|
||||
name={'invoice_message'}
|
||||
label={<T id={'invoice_message'} />}
|
||||
hintText={'Will be displayed on the invoice'}
|
||||
>
|
||||
<FEditableText
|
||||
name={'invoice_message'}
|
||||
@@ -20,7 +19,7 @@ export function InvoiceFormFooterLeft() {
|
||||
|
||||
{/* --------- Terms and conditions --------- */}
|
||||
<TermsConditsFormGroup
|
||||
label={<T id={'invoice_form.label.invoice_message'} />}
|
||||
label={<T id={'invoice_form.label.terms_conditions'} />}
|
||||
name={'terms_conditions'}
|
||||
>
|
||||
<FEditableText
|
||||
|
||||
@@ -7,14 +7,24 @@ export function PaymentReceiveFormFootetLeft() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{/* --------- Statement--------- */}
|
||||
<TermsConditsFormGroup
|
||||
name={'statement'}
|
||||
label={<T id={'payment_receive_form.label.statement'} />}
|
||||
hintText={'Will be displayed on the Payment'}
|
||||
<PaymentMsgFormGroup
|
||||
name={'message'}
|
||||
label={<T id={'payment_receive_form.message.label'} />}
|
||||
>
|
||||
<FEditableText
|
||||
name={'statement'}
|
||||
placeholder={intl.get('payment_receive_form.statement.placeholder')}
|
||||
name={'message'}
|
||||
placeholder={intl.get('payment_receive_form.message.placeholder')}
|
||||
/>
|
||||
</PaymentMsgFormGroup>
|
||||
|
||||
{/* --------- Internal Note--------- */}
|
||||
<TermsConditsFormGroup
|
||||
name={'internal_note'}
|
||||
label={<T id={'payment_receive_form.label.internal_note'} />}
|
||||
>
|
||||
<FEditableText
|
||||
name={'internal_note'}
|
||||
placeholder={intl.get('payment_receive_form.internal_note.placeholder')}
|
||||
/>
|
||||
</TermsConditsFormGroup>
|
||||
</React.Fragment>
|
||||
@@ -32,3 +42,17 @@ const TermsConditsFormGroup = styled(FFormGroup)`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const PaymentMsgFormGroup = styled(FFormGroup)`
|
||||
&.bp3-form-group {
|
||||
margin-bottom: 40px;
|
||||
|
||||
.bp3-label {
|
||||
font-size: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.bp3-form-content {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import intl from 'react-intl-universal';
|
||||
import { FFormGroup, FEditableText, FormattedMessage as T } from 'components';
|
||||
|
||||
export function WarehouseTransferFormFooterLeft() {
|
||||
@@ -7,14 +8,12 @@ export function WarehouseTransferFormFooterLeft() {
|
||||
<React.Fragment>
|
||||
{/* --------- Terms and conditions --------- */}
|
||||
<TermsConditsFormGroup
|
||||
label={<T id={'terms_conditions'} />}
|
||||
label={<T id={'warehouse_transfer.form.reason.label'} />}
|
||||
name={'reason'}
|
||||
>
|
||||
<FEditableText
|
||||
name={'reason'}
|
||||
placeholder={
|
||||
'Enter the terms and conditions of your business to be displayed in your transaction'
|
||||
}
|
||||
placeholder={intl.get('warehouse_transfer.form.reason.placeholder')}
|
||||
/>
|
||||
</TermsConditsFormGroup>
|
||||
</React.Fragment>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { useFormikContext } from 'formik';
|
||||
import intl from 'react-intl-universal';
|
||||
import { CLASSES } from 'common/classes';
|
||||
|
||||
import WarehouseTransferFormHeaderFields from './WarehouseTransferFormHeaderFields';
|
||||
|
||||
@@ -183,20 +183,6 @@ function WarehouseTransferFormHeaderFields({
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
{/*------------ reason -----------*/}
|
||||
<FastField name={'reason'}>
|
||||
{({ field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'reason'} />}
|
||||
className={'form-group--reason'}
|
||||
intent={inputIntent({ error, touched })}
|
||||
inline={true}
|
||||
helperText={<ErrorMessage name={'reason'} />}
|
||||
>
|
||||
<InputGroup minimal={true} {...field} />
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2003,7 +2003,7 @@
|
||||
"estimate.warehouse_button.label": "المخزن: {label}",
|
||||
"receipt.branch_button.label": "الفرع: {label}",
|
||||
"receipt.warehouse_button.label": "المخزن: {label}",
|
||||
"warehouse_transfer.empty_status.title": "",
|
||||
"warehouse_transfer.empty_status.description": "",
|
||||
"warehouse_transfer.empty_status.title": "إدارة عمليات النقل بين المستودعات",
|
||||
"warehouse_transfer.empty_status.description": "غالبًا ماتحتاج الاعمال ذات مستودعات متعددة لطلبات نقل البضائع من مستودع إلى آخر عندما تكون في حاجة ماسة إلى البائعين.",
|
||||
"item.error.you_could_not_delete_item_has_associated": "لا يمكنك حذف العنصر لديه معاملات مرتبطة به "
|
||||
}
|
||||
@@ -1525,9 +1525,9 @@
|
||||
"credit_note.label_credit_note": "Credit Note #",
|
||||
"credit_note.label_amount_to_credit": "Amount to credit",
|
||||
"credit_note.label_credit_note_details": "Credit Note details",
|
||||
"credit_note.label_customer_note": "Customer note",
|
||||
"credit_note.label_terms_conditions": "Terms conditions",
|
||||
"credit_note.label_customer_note.placeholder": "Thanks for your business and have a great day!",
|
||||
"credit_note.label_customer_note": "Customer Note",
|
||||
"credit_note.label_terms_conditions": "Terms & Conditions",
|
||||
"credit_note.label_customer_note.placeholder": "The customer note will be displayed on the credit note.",
|
||||
"credit_note.label_terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"credit_note.label_total": "TOTAL",
|
||||
"credit_note.label_subtotal": "Subtotal",
|
||||
@@ -1948,42 +1948,51 @@
|
||||
"estimate_form.label.total": "TOTAL",
|
||||
"estimate_form.label.subtotal": "Subtotal",
|
||||
"estimate_form.label.customer_note": "Customer Note",
|
||||
"estimate_form.label.terms_conditions": "Terms conditions",
|
||||
"estimate_form.customer_note.placeholder": "Thanks for your business and have a great day!",
|
||||
"estimate_form.label.terms_conditions": "Terms & Conditions",
|
||||
"estimate_form.customer_note.placeholder": "This message will be displayed on the estimate.",
|
||||
"estimate_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"invoice_form.label.total": "TOTAL",
|
||||
"invoice_form.label.subtotal": "Subtotal",
|
||||
"invoice_form.label.due_amount": "Due amount",
|
||||
"invoice_form.label.payment_amount": "Payment amount",
|
||||
"invoice_form.label.invoice_message": "Invoice Message",
|
||||
"invoice_form.invoice_message.placeholder": "Thanks for your business and have a great day!",
|
||||
"invoice_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"invoice_form.label.terms_conditions": "Terms & Conditions",
|
||||
"invoice_form.invoice_message.placeholder": "This message will be displayed on the invoice.",
|
||||
"invoice_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction.",
|
||||
"receipt_form.label.total": "TOTAL",
|
||||
"receipt_form.label.subtotal": "Subtotal",
|
||||
"receipt_form.label.due_amount": "Due amount",
|
||||
"receipt_form.label.payment_amount": "Payment amount",
|
||||
"receipt_form.label.receipt_message": "Receipt Message",
|
||||
"receipt_form.receipt_message.placeholder": "Thanks for your business and have a great day!",
|
||||
"receipt_form.receipt_message.placeholder": "This message will be displayed on the receipt.",
|
||||
"receipt_form.label.statement": "Statement",
|
||||
"receipt_form.statement.placeholder": "Thanks for your business and have a great day!",
|
||||
"payment_receive_form.label.statement": "Statement",
|
||||
"payment_receive_form.statement.placeholder": "Thanks for your business and have a great day!",
|
||||
|
||||
"payment_receive_form.label.internal_note": "Internal Note",
|
||||
"payment_receive_form.internal_note.placeholder": "Internal notes, Not visible to the customer.",
|
||||
|
||||
"payment_receive_form.message.label": "Payment Message",
|
||||
"payment_receive_form.message.placeholder": "This message will be displayed on the payment receipt.",
|
||||
|
||||
"payment_receive_form.label.subtotal": "Subtotal",
|
||||
"payment_receive_form.label.total": "TOTAL",
|
||||
|
||||
"bill_form.label.note": "Note",
|
||||
"bill_form.label.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"bill_form.label.note.placeholder": "Internal note. Not visible to the vendor.",
|
||||
"bill_form.label.subtotal": "Subtotal",
|
||||
"bill_form.label.total": "TOTAL",
|
||||
"bill_form.label.due_amount": "Due amount",
|
||||
"bill_form.label.payment_amount": "Payment amount",
|
||||
"vendor_credit_form.label.note": "Note",
|
||||
"vendor_credit_form.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"vendor_credit_form.note.placeholder": "Internal note. Not visible to the vendor.",
|
||||
"vendor_credit_form.label.subtotal": "Subtotal",
|
||||
"vendor_credit_form.label.total": "TOTAL",
|
||||
"payment_made_form.label.statement": "Statement",
|
||||
"payment_made_form.statement.placeholder": "Thanks for your business and have a great day!",
|
||||
"payment_made_form.label.subtotal": "Subtotal",
|
||||
"payment_made_form.label.total": "TOTAL",
|
||||
"payment_made.form.internal_note.label": "Note",
|
||||
"payment_made.form.internal_note.placeholder": "Internal note. Not visible to the vendor.",
|
||||
"make_journal.label.subtotal": "Subtotal",
|
||||
"make_journal.label.total": "TOTAL",
|
||||
"expense.label.subtotal": "Subtotal",
|
||||
@@ -2002,6 +2011,10 @@
|
||||
"estimate.warehouse_button.label": "Warehouse: {label}",
|
||||
"receipt.branch_button.label": "Branch: {label}",
|
||||
"receipt.warehouse_button.label": "Warehouse: {label}",
|
||||
"warehouse_transfer.empty_status.title": "",
|
||||
"warehouse_transfer.empty_status.description": ""
|
||||
|
||||
"warehouse_transfer.empty_status.title": "Manage transfer orders between warehouses.",
|
||||
"warehouse_transfer.empty_status.description": "Business with multiply warehouses often transfers items from on warehouse to another when they are in immediate need of vendors.",
|
||||
|
||||
"warehouse_transfer.form.reason.label": "Reason",
|
||||
"warehouse_transfer.form.reason.placeholder": "Enter the reason behind the transfer order."
|
||||
}
|
||||
Reference in New Issue
Block a user