All files / services/totvs config.js

34% Statements 17/50
36.53% Branches 19/52
100% Functions 1/1
34% Lines 17/50

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109  18x                                                                     18x                                                                     18x   1x   1x   1x   1x   1x   1x   1x   1x   1x   1x   1x   1x   1x       5x              
function getTypePath(type, erp = 'totvs') {
  Iif (erp === 'debx' || erp === 'wtti') {
    switch (type) {
      case 'inboundProductStorage':
        return '/inboundCheck';
      case 'cancelInboundOrder':
        return '/cancelInboundOrder';
      case 'stockAdjustment':
        return '/stockAdjustment';
      case 'stockAdjustmentInv':
        return '/stockAdjustment';
      case 'confirmPicking':
        return '/confirmPicking';
      case 'confirmPickingProduction':
        return '/confirmPickingProduction';
      case 'confirmDevolutionPicking':
        return '/confirmPicking';
      case 'productsMeasures':
        return '/updateProduct';
      case 'waybills':
        return '/createRomaneio';
      case 'cancelOutboundOrder':
        return '/cancelOutboundOrder';
      case 'getStockBalance':
        return '/getBalances';
      case 'industryInvoice':
        return '/industryInvoice';
      case 'serialLabel':
        return '/serialLabel';
      case 'stockMirror':
        return '/stockMirror';
      default:
        return '';
    }
  }
 
  Iif (erp === 'transis') {
    switch (type) {
      case 'inboundProductStorage':
        return '/api/inboundCheck';
      case 'cancelInboundOrder':
        return '/api/cancelInboundOrder';
      case 'stockAdjustment':
        return '/api/stockAdjustment';
      case 'stockAdjustmentInv':
        return '/api/stockAdjustment';
      case 'confirmPicking':
        return '/api/confirmPicking';
      case 'confirmPickingProduction':
        return '/api/confirmPickingProduction';
      case 'confirmDevolutionPicking':
        return '/api/confirmPicking';
      case 'productsMeasures':
        return '/api/updateProduct';
      case 'waybills':
        return '/api/createRomaneio';
      case 'cancelOutboundOrder':
        return '/api/cancelOutboundOrder';
      case 'getStockBalance':
        return '/api/getBalances';
      case 'industryInvoice':
        return '/api/industryInvoice';
      case 'serialLabel':
        return '/api/serialLabel';
      case 'stockMirror':
        return '/api/stockMirror';
      default:
        return '';
    }
  }
 
  switch (type) {
    case 'inboundProductStorage':
      return '/api/esp/v1/beeStock/inboundCheck';
    case 'cancelInboundOrder':
      return '/api/esp/v1/beeStock/cancelInboundOrder';
    case 'stockAdjustment':
      return '/api/esp/v1/beeStock/stockAdjustment';
    case 'stockAdjustmentInv':
      return '/api/esp/v1/beeStock/stockAdjustment';
    case 'confirmPicking':
      return '/api/esp/v1/beeStock/confirmPicking';
    case 'confirmPickingProduction':
      return '/api/esp/v1/beeStock/confirmPickingProduction';
    case 'confirmDevolutionPicking':
      return '/api/esp/v1/beeStock/confirmPicking';
    case 'productsMeasures':
      return '/api/esp/v1/beeStock/updateProduct';
    case 'waybills':
      return '/api/esp/v1/beeStock/createRomaneio';
    case 'cancelOutboundOrder':
      return '/api/esp/v1/beeStock/cancelOutboundOrder';
    case 'getStockBalance':
      return '/api/esp/v1/beeStock/getBalances';
    case 'industryInvoice':
      return '/api/esp/v1/beeStock/industryInvoice';
    case 'serialLabel':
      return '/api/esp/v1/beeStock/serialLabel';
    case 'stockMirror':
      return '/api/esp/v1/beeStock/stockMirror';
    default:
      return '';
  }
}
 
export default {
  getTypePath,
};