mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix: auto-complete item entry with cost price.
This commit is contained in:
@@ -65,12 +65,12 @@ function ItemsEntriesTable({
|
|||||||
const { rowIndex } = rowItem;
|
const { rowIndex } = rowItem;
|
||||||
const price =
|
const price =
|
||||||
itemType === ITEM_TYPE.PURCHASABLE
|
itemType === ITEM_TYPE.PURCHASABLE
|
||||||
? item.purchase_price
|
? item.cost_price
|
||||||
: item.sell_price;
|
: item.sell_price;
|
||||||
|
|
||||||
const description =
|
const description =
|
||||||
itemType === ITEM_TYPE.PURCHASABLE
|
itemType === ITEM_TYPE.PURCHASABLE
|
||||||
? item.purchase_description
|
? item.cost_description
|
||||||
: item.sell_description;
|
: item.sell_description;
|
||||||
|
|
||||||
// Update the rate, description and quantity data of the row.
|
// Update the rate, description and quantity data of the row.
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { repeat } from 'lodash';
|
|
||||||
import { toSafeNumber } from 'utils';
|
import { toSafeNumber } from 'utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ import { FastField } from 'formik';
|
|||||||
import { CLASSES } from 'common/classes';
|
import { CLASSES } from 'common/classes';
|
||||||
import { useBillFormContext } from './BillFormProvider';
|
import { useBillFormContext } from './BillFormProvider';
|
||||||
import ItemsEntriesTable from 'containers/Entries/ItemsEntriesTable';
|
import ItemsEntriesTable from 'containers/Entries/ItemsEntriesTable';
|
||||||
import {
|
import { entriesFieldShouldUpdate } from './utils';
|
||||||
entriesFieldShouldUpdate
|
import { ITEM_TYPE } from 'containers/Entries/utils';
|
||||||
} from './utils';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bill form body.
|
* Bill form body.
|
||||||
@@ -35,6 +34,7 @@ export default function BillFormBody({ defaultBill }) {
|
|||||||
errors={error}
|
errors={error}
|
||||||
linesNumber={4}
|
linesNumber={4}
|
||||||
currencyCode={values.currency_code}
|
currencyCode={values.currency_code}
|
||||||
|
itemType={ITEM_TYPE.PURCHASABLE}
|
||||||
landedCost={true}
|
landedCost={true}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
color: $sidebar-menu-label-color;
|
color: $sidebar-menu-label-color;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
padding: 10px 20px;
|
padding: 8px 20px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -268,7 +268,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
min-width: 220px;
|
min-width: 190px;
|
||||||
|
|
||||||
.sidebar__head-logo {
|
.sidebar__head-logo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user