IO-1029 IO-1027
This commit is contained in:
@@ -51,15 +51,6 @@ export function BillsListTableComponent({
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<BillDeleteButton bill={record} />
|
<BillDeleteButton bill={record} />
|
||||||
{record.isinhouse && (
|
|
||||||
<PrintWrapperComponent
|
|
||||||
templateObject={{
|
|
||||||
name: Templates.inhouse_invoice.key,
|
|
||||||
variables: { id: record.id },
|
|
||||||
}}
|
|
||||||
messageObject={{ subject: Templates.inhouse_invoice.subject }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<Button
|
<Button
|
||||||
disabled={record.is_credit_memo}
|
disabled={record.is_credit_memo}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
@@ -87,6 +78,15 @@ export function BillsListTableComponent({
|
|||||||
>
|
>
|
||||||
{t("bills.actions.return")}
|
{t("bills.actions.return")}
|
||||||
</Button>
|
</Button>
|
||||||
|
{record.isinhouse && (
|
||||||
|
<PrintWrapperComponent
|
||||||
|
templateObject={{
|
||||||
|
name: Templates.inhouse_invoice.key,
|
||||||
|
variables: { id: record.id },
|
||||||
|
}}
|
||||||
|
messageObject={{ subject: Templates.inhouse_invoice.subject }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
const columns = [
|
const columns = [
|
||||||
@@ -167,7 +167,7 @@ export function BillsListTableComponent({
|
|||||||
<Button onClick={() => refetch()}>
|
<Button onClick={() => refetch()}>
|
||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
</Button>
|
</Button>
|
||||||
{job ? (
|
{job && job.converted ? (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -71,73 +71,74 @@ export default function PartsOrderModalComponent({
|
|||||||
<div>
|
<div>
|
||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item required={false} key={field.key}>
|
<Form.Item required={false} key={field.key}>
|
||||||
<div style={{ display: "flex", alignItems: "center" }}>
|
<LayoutFormRow grow noDivider>
|
||||||
<LayoutFormRow style={{ flex: 1 }} noDivider>
|
<Form.Item
|
||||||
|
label={t("parts_orders.fields.line_desc")}
|
||||||
|
key={`${index}line_desc`}
|
||||||
|
name={[field.name, "line_desc"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("parts_orders.fields.line_remarks")}
|
||||||
|
key={`${index}line_remarks`}
|
||||||
|
name={[field.name, "line_remarks"]}
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
{
|
||||||
|
// <Form.Item
|
||||||
|
// label={t("parts_orders.fields.db_price")}
|
||||||
|
// key={`${index}db_price`}
|
||||||
|
// name={[field.name, "db_price"]}
|
||||||
|
// >
|
||||||
|
// <CurrencyInput />
|
||||||
|
// </Form.Item>
|
||||||
|
}
|
||||||
|
<Form.Item
|
||||||
|
label={t("parts_orders.fields.quantity")}
|
||||||
|
key={`${index}quantity`}
|
||||||
|
name={[field.name, "quantity"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("parts_orders.fields.act_price")}
|
||||||
|
key={`${index}act_price`}
|
||||||
|
name={[field.name, "act_price"]}
|
||||||
|
>
|
||||||
|
<CurrencyInput />
|
||||||
|
</Form.Item>
|
||||||
|
{isReturn && (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("parts_orders.fields.line_desc")}
|
label={t("parts_orders.fields.cost")}
|
||||||
key={`${index}line_desc`}
|
key={`${index}cost`}
|
||||||
name={[field.name, "line_desc"]}
|
name={[field.name, "cost"]}
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("parts_orders.fields.line_remarks")}
|
|
||||||
key={`${index}line_remarks`}
|
|
||||||
name={[field.name, "line_remarks"]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
{
|
|
||||||
// <Form.Item
|
|
||||||
// label={t("parts_orders.fields.db_price")}
|
|
||||||
// key={`${index}db_price`}
|
|
||||||
// name={[field.name, "db_price"]}
|
|
||||||
// >
|
|
||||||
// <CurrencyInput />
|
|
||||||
// </Form.Item>
|
|
||||||
}
|
|
||||||
<Form.Item
|
|
||||||
label={t("parts_orders.fields.quantity")}
|
|
||||||
key={`${index}quantity`}
|
|
||||||
name={[field.name, "quantity"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("parts_orders.fields.act_price")}
|
|
||||||
key={`${index}act_price`}
|
|
||||||
name={[field.name, "act_price"]}
|
|
||||||
>
|
>
|
||||||
<CurrencyInput />
|
<CurrencyInput />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{isReturn && (
|
)}
|
||||||
<Form.Item
|
|
||||||
label={t("parts_orders.fields.cost")}
|
<div>
|
||||||
key={`${index}cost`}
|
<DeleteFilled
|
||||||
name={[field.name, "cost"]}
|
style={{ margin: "1rem" }}
|
||||||
>
|
onClick={() => {
|
||||||
<CurrencyInput />
|
remove(field.name);
|
||||||
</Form.Item>
|
}}
|
||||||
)}
|
/>
|
||||||
</LayoutFormRow>
|
<FormListMoveArrows
|
||||||
<DeleteFilled
|
move={move}
|
||||||
style={{ margin: "1rem" }}
|
index={index}
|
||||||
onClick={() => {
|
total={fields.length}
|
||||||
remove(field.name);
|
/>
|
||||||
}}
|
</div>
|
||||||
/>
|
</LayoutFormRow>
|
||||||
<FormListMoveArrows
|
|
||||||
move={move}
|
|
||||||
index={index}
|
|
||||||
total={fields.length}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -236,9 +236,9 @@ export function PartsOrderModalContainer({
|
|||||||
: t("parts_orders.labels.newpartsorder")
|
: t("parts_orders.labels.newpartsorder")
|
||||||
}
|
}
|
||||||
onCancel={() => toggleModalVisible()}
|
onCancel={() => toggleModalVisible()}
|
||||||
width="90%"
|
|
||||||
onOk={() => form.submit()}
|
onOk={() => form.submit()}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
|
width="50%"
|
||||||
forceRender
|
forceRender
|
||||||
>
|
>
|
||||||
{error ? <AlertComponent message={error.message} type="error" /> : null}
|
{error ? <AlertComponent message={error.message} type="error" /> : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user