|
@@ -374,11 +374,13 @@ $(document).ready(() => {
|
|
|
const isDeal = $(this).data('gcl') !== undefined ? true : false;
|
|
|
let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="4" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox"></td></tr>';
|
|
|
if (isDeal) {
|
|
|
- // const gcl = gclGatherData[$(this).data('gcl')];
|
|
|
const lid = $(this).data('lid');
|
|
|
- const gcl = _.find(gclGatherData, function (item) {
|
|
|
+ let gcl = _.find(gclGatherData, function (item) {
|
|
|
return item.leafXmjs && item.leafXmjs[0].gcl_id === lid;
|
|
|
});
|
|
|
+ if (!gcl) {
|
|
|
+ gcl = gclGatherData[$(this).data('gcl')];
|
|
|
+ }
|
|
|
codeHtml = '';
|
|
|
for (const leaf of gcl.leafXmjs) {
|
|
|
const quantity = leaf.quantity !== undefined && leaf.quantity !== null ? leaf.quantity : 0;
|