| @@ -38,7 +38,7 @@ const production: React.FC = async () => { | |||||
| {t("Create Process")} | {t("Create Process")} | ||||
| </Button> */} | </Button> */} | ||||
| </Stack> | </Stack> | ||||
| <I18nProvider namespaces={["common", "production","purchaseOrder"]}> | |||||
| <I18nProvider namespaces={["common", "production","purchaseOrder","jo"]}> | |||||
| <ProductionProcessPage printerCombo={printerCombo} /> {/* Use new component */} | <ProductionProcessPage printerCombo={printerCombo} /> {/* Use new component */} | ||||
| </I18nProvider> | </I18nProvider> | ||||
| </> | </> | ||||
| @@ -62,6 +62,7 @@ export interface JoDetailPickLine { | |||||
| id: number; | id: number; | ||||
| code: string; | code: string; | ||||
| name: string; | name: string; | ||||
| type: string; | |||||
| pickedLotNo?: JoDetailPickedLotNo[]; | pickedLotNo?: JoDetailPickedLotNo[]; | ||||
| reqQty: number; | reqQty: number; | ||||
| uom: string; | uom: string; | ||||
| @@ -68,8 +68,11 @@ const JoRelease: React.FC<Props> = ({ | |||||
| const stockCounts = useMemo(() => { | const stockCounts = useMemo(() => { | ||||
| const totalLines = pickLines.length; | const totalLines = pickLines.length; | ||||
| const sufficientLines = pickLines.filter(pickLine => isStockSufficient(pickLine)).length; | |||||
| const insufficientLines = totalLines - sufficientLines; | |||||
| const nonMatAndNonItemLines = pickLines.filter(pickLine => | |||||
| pickLine.type !== 'mat' && pickLine.type !== 'item' | |||||
| ); | |||||
| const sufficientLines = nonMatAndNonItemLines.filter(pickLine => isStockSufficient(pickLine)).length; | |||||
| const insufficientLines = nonMatAndNonItemLines.length - sufficientLines; | |||||
| return { | return { | ||||
| total: totalLines, | total: totalLines, | ||||