From f647120cd12f10a23410cdd1cff5cbd9b7a46035 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 6 Apr 2021 18:17:09 +0200 Subject: [PATCH 01/68] initial showcase implementation --- .../InvenTree/static/script/chart.min.js | 13 ++++ InvenTree/order/models.py | 5 +- InvenTree/order/views.py | 1 + .../part/templates/part/part_pricing.html | 71 +++++++++++++++++++ InvenTree/part/views.py | 24 +++++++ InvenTree/templates/base.html | 1 + 6 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 InvenTree/InvenTree/static/script/chart.min.js diff --git a/InvenTree/InvenTree/static/script/chart.min.js b/InvenTree/InvenTree/static/script/chart.min.js new file mode 100644 index 0000000000..fb766197fc --- /dev/null +++ b/InvenTree/InvenTree/static/script/chart.min.js @@ -0,0 +1,13 @@ +/*! + * Chart.js v3.0.2 + * https://www.chartjs.org + * (c) 2021 Chart.js Contributors + * Released under the MIT License + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete")),i+=s.length})),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}; +/*! + * @kurkle/color v0.1.9 + * https://github.com/kurkle/color#readme + * (c) 2020 Jukka Kurkela + * Released under the MIT License + */const r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function M(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function w(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i>16&255,s>>8&255,255&s]}return t}(),T.transparent=[0,0,0,0]);const e=T[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function R(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function F(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class z{constructor(t){if(t instanceof z)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=I(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||L(t)||F(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new z(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function V(t){return new z(t)}const B=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return B(t)?t:V(t)}function H(t){return B(t)?t:V(t).saturate(.5).darken(.1).hexString()}function N(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;oi;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=Object.create(null),ft=Object.create(null);function gt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>H(e.backgroundColor),this.hoverBorderColor=(t,e)=>H(e.borderColor),this.hoverColor=(t,e)=>H(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return pt(this,t,e)}get(t){return gt(this,t)}describe(t,e){return pt(ft,t,e)}override(t,e){return pt(ut,t,e)}route(t,e,i,n){const o=gt(this,t),s=gt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const xt=Math.PI,bt=2*xt,_t=bt+xt,yt=Number.POSITIVE_INFINITY,vt=xt/180,Mt=xt/2,wt=xt/4,kt=2*xt/3,St=Math.log10,Pt=Math.sign;function Dt(t){const e=Math.pow(10,Math.floor(St(t))),i=t/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Ct(t){const e=[],i=Math.sqrt(t);let n;for(n=1;nt-e)).pop(),e}function At(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ot(t,e,i){return Math.abs(t-e)=t}function Lt(t,e,i){let n,o,s;for(n=0,o=t.length;nr&&ln&&(n=s),n}function Yt(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Kt(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==s.strokeColor;let l,c;for(t.save(),s.translation&&t.translate(s.translation[0],s.translation[1]),$(s.rotation)||t.rotate(s.rotation),t.font=o.string,s.color&&(t.fillStyle=s.color),s.textAlign&&(t.textAlign=s.textAlign),s.textBaseline&&(t.textBaseline=s.textBaseline),l=0;lt[i]1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const ie=(t,e,i)=>ee(t,i,(n=>t[n][e]ee(t,i,(n=>t[n][e]>=i));function oe(t,e,i){let n=0,o=t.length;for(;nn&&t[o-1]>i;)o--;return n>0||o{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function re(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(se.forEach((e=>{delete t[e]})),delete t._chartjs)}function le(t){const e=new Set;let i,n;for(i=0,n=t.length;i{o.push(t)})),o}function ce(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function he(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const de=t=>window.getComputedStyle(t,null);function ue(t,e){return de(t).getPropertyValue(e)}const fe=["top","right","bottom","left"];function ge(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=fe[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function pe(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=de(i),s="border-box"===o.boxSizing,a=ge(o,"padding"),r=ge(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const me=t=>Math.round(10*t)/10;function xe(t,e,i,n){const o=de(t),s=ge(o,"margin"),a=he(o.maxWidth,t,"clientWidth")||yt,r=he(o.maxHeight,t,"clientHeight")||yt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=ce(t);if(s){const t=s.getBoundingClientRect(),a=de(s),r=ge(a,"border","width"),l=ge(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=he(a.maxWidth,s,"clientWidth"),o=he(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||yt,maxHeight:o||yt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=ge(o,"border","width"),e=ge(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=me(Math.min(c,a,l.maxWidth)),h=me(Math.min(h,r,l.maxHeight)),c&&!h&&(h=me(c/2)),{width:c,height:h}}function be(t,e,i){const n=t.currentDevicePixelRatio=e||1,{canvas:o,width:s,height:a}=t;o.height=a*n,o.width=s*n,t.ctx.setTransform(n,0,0,n,0,0),o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=a+"px",o.style.width=s+"px")}const _e=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ye(t,e){const i=ue(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ve(t,e){return"native"in t?{x:t.x,y:t.y}:pe(t,e)}function Me(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ne:ie;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function we(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var De={modes:{index(t,e,i,n){const o=ve(e,t),s=i.axis||"x",a=i.intersect?ke(t,o,s,n):Se(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=ve(e,t),s=i.axis||"xy";let a=i.intersect?ke(t,o,s,n):Se(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;tke(t,ve(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Se(t,ve(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",Pe(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",Pe(t,e,i,n))}};const Ce=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);function Ae(t,e){const i=(""+t).match(Ce);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Oe(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function Te(t){return Oe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Le(t){return Oe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Re(t){const e=Te(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ee(t,e){t=t||{},e=e||mt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));const n={family:K(t.family,e.family),lineHeight:Ae(K(t.lineHeight,e.lineHeight),i),size:i,style:K(t.style,e.style),weight:K(t.weight,e.weight),string:""};return n.string=jt(n),n}function Ie(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;ot.pos===e))}function Be(t,e){return t.filter((t=>-1===ze.indexOf(t.pos)&&t.box.axis===e))}function We(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function He(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Ne(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function je(t,e,i){const n=i.box,o=t.maxPadding;if(U(i.pos))return{same:!1,other:!1};i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?n.height:n.width,t[i.pos]+=i.size,n.getPadding&&Ne(o,n.getPadding());const s=Math.max(0,e.outerWidth-He(o,t,"left","right")),a=Math.max(0,e.outerHeight-He(o,t,"top","bottom")),r=s!==t.w,l=a!==t.h;return t.w=s,t.h=a,i.horizontal?{same:r,other:l}:{same:l,other:r}}function $e(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Ye(t,e,i){const n=[];let o,s,a,r,l,c;for(o=0,s=t.length,l=0;ot.box.fullSize)),!0),n=We(Ve(e,"left"),!0),o=We(Ve(e,"right")),s=We(Ve(e,"top"),!0),a=We(Ve(e,"bottom")),r=Be(e,"x"),l=Be(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:Ve(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);Ne(u,Re(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o);!function(t,e){let i,n,o;for(i=0,n=t.length;i{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class qe{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class Ke extends qe{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const Ge={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ze=t=>null===t||""===t;const Qe=!!_e&&{passive:!0};function Je(t,e,i){t.canvas.removeEventListener(e,i,Qe)}function ti(t,e,i){const n=t.canvas,o=n&&ce(n)||n,s=new MutationObserver((t=>{const e=ce(o);t.forEach((t=>{for(let n=0;n{t.forEach((t=>{for(let e=0;e{i.currentDevicePixelRatio!==t&&e()})))}function si(t,i,n){const o=t.canvas,s=o&&ce(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){ii.size||window.addEventListener("resize",oi),ii.set(t,e)}(t,a),r}function ai(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){ii.delete(t),ii.size||window.removeEventListener("resize",oi)}(t)}function ri(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=Ge[t.type]||t.type,{x:n,y:o}=pe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Qe)}(o,i,s),s}class li extends qe{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ze(o)){const e=ye(t,"width");void 0!==e&&(t.width=e)}if(Ze(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ye(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];$(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:ti,detach:ei,resize:si}[e]||ri;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:ai,detach:ai,resize:ai}[e]||Je)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return xe(t,e,i,n)}isAttached(t){const e=ce(t);return!(!e||!ce(e))}}var ci=Object.freeze({__proto__:null,BasePlatform:qe,BasicPlatform:Ke,DomPlatform:li});const hi=t=>0===t||1===t,di=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*bt/i),ui=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*bt/i)+1,fi={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Mt),easeOutSine:t=>Math.sin(t*Mt),easeInOutSine:t=>-.5*(Math.cos(xt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>hi(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>hi(t)?t:di(t,.075,.3),easeOutElastic:t=>hi(t)?t:ui(t,.075,.3),easeInOutElastic(t){const e=.1125;return hi(t)?t:t<.5?.5*di(2*t,e,.45):.5+.5*ui(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-fi.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*fi.easeInBounce(2*t):.5*fi.easeOutBounce(2*t-1)+.5},gi="transparent",pi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||gi),o=n.valid&&W(e||gi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class mi{constructor(t,e,i,n){const o=e[i];n=Ie([t.to,n,o,t.from]);const s=Ie([t.from,o,n]);this._active=!0,this._fn=t.fn||pi[t.type||typeof s],this._easing=fi[t.easing]||fi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=Ie([t.to,e,o,t.from]),n._from=Ie([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),mt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),mt.describe("animations",{_fallback:"animation"}),mt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class bi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!U(n))return;const o={};for(const t of xi)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new mi(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function _i(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function yi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;oi[t].axis===e)).shift()}function Pi(t,e){e=e||t._parsed;for(const i of e){const e=i._stacks;if(!e||void 0===e[t.vScale.id]||void 0===e[t.vScale.id][t.index])return;delete e[t.vScale.id][t.index]}}const Di=t=>"reset"===t||"none"===t,Ci=(t,e)=>e?t:Object.assign({},t);class Ai{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=Mi(e.vScale,e),t.addElements()}updateIndex(t){this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,Si(e,"x")),a=i.yAxisID=K(n.yAxisID,Si(e,"y")),r=i.rAxisID=K(n.rAxisID,Si(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&re(this._data,this),t._stacked&&Pi(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]);U(i)?t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]p||d=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n=0&&tn.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(Ci(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a="animation-"+e,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new bi(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Di(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Di(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Di(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._cachedMeta.data.length,n=e._data.length;n>i?e._insertElements(i,n-i,t):n{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}Oi.defaults={},Oi.defaultRoutes=void 0;const Ti=new Map;function Li(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ti.get(i);return n||(n=new Intl.NumberFormat(t,e),Ti.set(i,n)),n}(e,i).format(t)}const Ri={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=St(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Li(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(St(t)));return 1===n||2===n||5===n?Ri.numeric.call(this,t,e,i):""}};var Ei={formatters:Ri};function Ii(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;oo)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Fi(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderColor:(t,e)=>e.color,borderWidth:(t,e)=>e.lineWidth},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ei.formatters.values,minor:{},major:{},align:"center",crossAlign:"near"}}),mt.route("scale.ticks","color","","color"),mt.route("scale.grid","color","","borderColor"),mt.route("scale.title","color","","color"),mt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),mt.describe("scales",{_fallback:"scale"});const zi=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Vi(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;sa+r)))return c}function Wi(t){return t.drawTicks?t.tickLength:0}function Hi(t,e){if(!t.display)return 0;const i=Ee(t.font,e),n=Re(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function Ni(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class ji extends Oi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const e=this;e.options=t,e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Ht(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-Wi(e.grid)-i.padding-Hi(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=Et(Math.min(Math.asin(Math.min((h.highest.height+6)/a,1)),Math.asin(Math.min(r/l,1))-Math.asin(u/l))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Hi(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=Wi(s)+a):(e.height=t.maxHeight,e.width=Wi(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Rt(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const e=this;e.beforeTickToLabelConversion(),e.generateTickLabels(t),e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y)}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return Nt(e._alignToPixels?Ut(e.chart,i,0):i)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this,i=e.ticks||[];if(t>=0&&tr*o?r/n:l/o:l*o0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=Wi(s),d=[],u=s.setContext(e.getContext(0)),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Ut(n,t,f)};let m,x,b,_,y,v,M,w,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,w=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,w=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,M=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,M=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,w=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,M=y-h,k=t.left,P=t.right}for(x=0;xe.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e.chart,s=i.setContext(e.getContext(0)),a=i.drawBorder?s.borderWidth:0,r=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let l,c;const h=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(l=0,c=r.length;l$i([o,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ki(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=en(Xi(s,t),i),ht(o))return qi(t,o)?Ji(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>nn(t).includes(e),ownKeys:t=>nn(t),set:(e,i,n)=>(t[0][i]=n,delete e[i],delete e._keys,!0)})}function Yi(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ui(t,n),setContext:e=>Yi(t,e,i,n),override:o=>Yi(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ki(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=Ji(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ji(n,o,t,l);e.push(Yi(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));qi(e,r)&&(r=Yi(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Ui(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const Xi=(t,e)=>t?t+ct(e):e,qi=(t,e)=>U(e)&&"adapters"!==t;function Ki(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function Gi(t,e,i){return dt(t)?t(e,i):t}const Zi=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function Qi(t,e,i,n){for(const o of e){const e=Zi(i,o);if(e){t.add(e);const o=Gi(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function Ji(t,e,i,n){const o=e._rootScopes,s=Gi(e._fallback,i,n),a=[...t,...o],r=new Set,l=t[0];U(l)&&!(i in l)&&r.add(l[i]={}),r.add(n);let c=tn(r,a,i,s||i);return null!==c&&((!ht(s)||s===i||(c=tn(r,a,s,c),null!==c))&&$i([...r],[""],o,s))}function tn(t,e,i,n){for(;i;)i=Qi(t,e,i,n);return i}function en(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function nn(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return[...e]}(t._scopes)),e}const on=Number.EPSILON||1e-14,sn=(t,e)=>e!t.skip))),"monotone"===e.cubicInterpolationMode)rn(t);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;o0?e.y:t.y}}function un(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=hn(t,o,i),r=hn(o,s,i),l=hn(s,e,i),c=hn(a,r,i),h=hn(r,l,i);return hn(c,h,i)}function fn(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function gn(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function pn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mn(t){return"angle"===t?{between:Wt,compare:Vt,normalize:Bt}:{between:(t,e,i)=>t>=e&&t<=i,compare:(t,e)=>t-e,normalize:t=>t}}function xn(t,e,i,n){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0}}function bn(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=mn(n),{start:h,end:d,loop:u}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=mn(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;cx||l(o,m,g)&&0!==r(o,m),y=()=>!x||0===r(s,g)||l(s,m,g);for(let t=h,i=h;t<=d;++t)p=e[t%a],p.skip||(g=c(p[n]),x=l(g,o,s),null===b&&_()&&(b=0===r(g,o)?t:i),null!==b&&y()&&(f.push(xn(b,t,u,a)),b=null),i=t,m=g);return null!==b&&f.push(xn(b,d,u,a)),f}function _n(t,e){const i=[],n=t.segments;for(let o=0;oo&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(e,n,o,i);if(!0===i)return[{start:s,end:a,loop:o}];return function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(e,s,a{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");mt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&mt.describe(e,t.descriptors)}(t,a,n),e.override&&mt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in mt[n]&&(delete mt[n][i],this.override&&delete ut[i])}}var wn=new class{constructor(){this.controllers=new Mn(Ai,"datasets",!0),this.elements=new Mn(Oi,"elements"),this.plugins=new Mn(Object,"plugins"),this.scales=new Mn(ji,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Sn(t,e){return e||!1!==t?!0===t?{}:t:null}function Pn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Dn(t,e){const i=mt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Cn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function An(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ut[t.type]||{scales:{}},n=e.scales||{},o=Dn(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t],r=Cn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||Dn(o,e),l=(ut[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[mt.scales[e.type],mt.scale])})),a}(t,e)}const On=new Map,Tn=new Set;function Ln(t,e){let i=On.get(t);return i||(i=e(),On.set(t,i),Tn.add(i)),i}const Rn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class En{constructor(t){this._config=function(t){const e=(t=t||{}).data=t.data||{datasets:[],labels:[]};return e.datasets=e.datasets||[],e.labels=e.labels||[],An(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=t}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),An(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ln(t,(()=>[["datasets."+t,""]]))}datasetAnimationScopeKeys(t,e){return Ln(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]]))}datasetElementScopeKeys(t,e){return Ln(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]]))}pluginScopeKeys(t){const e=t.id;return Ln(`${this.type}-plugin-${e}`,(()=>[["plugins."+e,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Rn(r,t,e)))),e.forEach((t=>Rn(r,n,t))),e.forEach((t=>Rn(r,ut[o]||{},t))),e.forEach((t=>Rn(r,mt,t))),e.forEach((t=>Rn(r,ft,t)))}));const l=[...r];return Tn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ut[e]||{},mt.datasets[e]||{},{type:e},mt,ft]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=In(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=Ui(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=Yi(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=In(this._resolverCache,t,i);return U(e)?Yi(o,e,void 0,n):o}}function In(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:$i(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Fn=["top","bottom","left","right","chartArea"];function zn(t,e){return"top"===t||"bottom"===t||-1===Fn.indexOf(t)&&"x"===e}function Vn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Bn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function Wn(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function Hn(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Nn(t){return Hn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const jn={},$n=t=>{const e=Nn(t);return Object.values(jn).filter((t=>t.canvas===e)).pop()};class Yn{constructor(t,e){const n=this;this.config=e=new En(e);const o=Nn(t),s=$n(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=e.createResolver(e.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(o,e);const l=n.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;this.id=j(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new kn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((()=>this.update("resize")),r.resizeDelay||0),jn[n.id]=n,l&&c?(a.listen(n,"complete",Bn),a.listen(n,"progress",Wn),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return $(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():be(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return e.platform?new e.platform:!Hn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new Ke:new li}clear(){return Xt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=i.currentDevicePixelRatio,l=n.devicePixelRatio||i.platform.getDevicePixelRatio();i.width===a.width&&i.height===a.height&&r===l||(i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,be(i,l,!0),i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=Cn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=Cn(a,s),l=K(s.type,i.dtype);void 0!==s.position&&zn(s.position,r)===zn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(wn.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{Xe.configure(t,e,e.options),Xe.addBox(t,e)}))}_updateMetasetIndex(t,e){const i=this._metasets,n=t.index;n!==e&&(i[n]=i[e],i[e]=t,t.index=e)}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(n>i){for(let e=i;ei.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{Xe.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;if(e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,i=e.data.datasets.length;t{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Vn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;Xe.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=e.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",s)&&(Gt(i,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?e.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?e.height:o.bottom+n.bottom}),t.controller.draw(),Zt(i),s.cancelable=!1,e.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const o=De.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n=i[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1}),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateDatasetVisibility(t,e){const i=this,n=e?"show":"hide",o=i.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);i.setDatasetVisibility(t,e),s.update(o,{visible:e}),i.update((e=>e.datasetIndex===t?n:void 0))}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:i}=t;let n,o;for(t.stop(),a.remove(t),n=0,o=t.data.datasets.length;n{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])};let s=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};if(J(t.options.events,(t=>n(t,s))),t.options.responsive){let e;s=(e,i)=>{t.canvas&&t.resize(e,i)};const a=()=>{o("attach",a),t.attached=!0,t.resize(),n("resize",s),n("detach",e)};e=()=>{t.attached=!1,o("resize",s),n("attach",a)},i.isAttached(t.canvas)?a():e()}else t.attached=!0}unbindEvents(){const t=this,e=t._listeners;e&&(delete t._listeners,J(e,((e,i)=>{t.platform.removeEventListener(t,i,e)})))}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e){return this._plugins.notify(this,t,e)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0};if(!1===i.notifyPlugins("beforeEvent",n))return;const o=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n),(o||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Kt(t,i.chartArea,i._minPadding)&&Q(o.onClick,[t,r,i],i),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const Un=()=>J(Yn.instances,(t=>t._plugins.invalidate())),Xn=!0;function qn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}Object.defineProperties(Yn,{defaults:{enumerable:Xn,value:mt},instances:{enumerable:Xn,value:jn},overrides:{enumerable:Xn,value:ut},registry:{enumerable:Xn,value:wn},version:{enumerable:Xn,value:"3.0.2"},getChart:{enumerable:Xn,value:$n},register:{enumerable:Xn,value:(...t)=>{wn.add(...t),Un()}},unregister:{enumerable:Xn,value:(...t)=>{wn.remove(...t),Un()}}});class Kn{constructor(t){this.options=t||{}}formats(){return qn()}parse(t,e){return qn()}format(t,e){return qn()}add(t,e,i){return qn()}diff(t,e,i){return qn()}startOf(t,e,i){return qn()}endOf(t,e){return qn()}}Kn.override=function(t){Object.assign(Kn.prototype,t)};var Gn={_date:Kn};function Zn(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;nt-e)))}return t._cache.$bar}(t);let i,n,o,s,a=t._length;const r=()=>{a=Math.min(a,i&&Math.abs(o-s)||a),s=o};for(i=0,n=e.length;iMath.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Jn(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c0?(p+=t,h-=t):h<0&&(p-=t,h+=t)}return{size:h,base:p,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=K(o.maxBarThickness,1/0);let a,r;if(e.grouped){const n=o.skipNull?i._getStackCount(t):e.stackCount,l="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{xScale:a,yScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c);for(let l=e;l""}}}};class no extends Ai{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;let o,s;for(o=t,s=t+e;oWt(t,r,l)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Wt(t,r,l)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(Mt,h,u),x=g(xt,c,d),b=g(xt+Mt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]?0:i.calculateCircumference(o._parsed[t]*s/bt)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x0&&!isNaN(t)?bt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Li(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class oo extends Ai{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Ht(Math.min(ie(r,a.axis,c).lo,i?n:ie(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Ht(Math.max(ie(r,a.axis,h).hi+1,i?0:ie(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);if(e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._decimated=!!s._decimated,n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0),e.updateElement(n,void 0,{animated:!a,options:i},t)}e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{xScale:a,yScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=o.options.spanGaps,f=At(u)?u:Number.POSITIVE_INFINITY,g=o.chart._animationsDisabled||s||"none"===n;let p=e>0&&o.getParsed(e-1);for(let c=e;c0&&i.x-p.x>f,d&&(u.options=h||o.resolveDataElementOptions(c,n)),g||o.updateElement(e,c,u,n),p=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){this._cachedMeta.dataset.updateControlPoints(this.chart.chartArea),super.draw()}}oo.id="line",oo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},oo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class so extends Ai{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*xt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Rt(this.resolveDataElementOptions(t,e).angle||i):0}}so.id="polarArea",so.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},so.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class ao extends no{}ao.id="pie",ao.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class ro extends Ai{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var co=Object.freeze({__proto__:null,BarController:eo,BubbleController:io,DoughnutController:no,LineController:oo,PolarAreaController:so,PieController:ao,RadarController:ro,ScatterController:lo});function ho(t,e){const{startAngle:i,endAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,i-c,n+c),l>o?(c=o/l,t.arc(s,a,l,n+c,i-c,!0)):t.arc(s,a,o,n+Mt,i-Mt),t.closePath(),t.clip()}function uo(t,e){const{x:i,y:n,startAngle:o,endAngle:s,pixelMargin:a}=e,r=Math.max(e.outerRadius-a,0),l=e.innerRadius+a;t.beginPath(),t.arc(i,n,r,o,s),t.arc(i,n,l,s,o,!0),t.closePath()}function fo(t,e){const{x:i,y:n,startAngle:o,endAngle:s,pixelMargin:a,options:r}=e,l=e.outerRadius,c=e.innerRadius+a,h="inner"===r.borderAlign;r.borderWidth&&(h?(t.lineWidth=2*r.borderWidth,t.lineJoin="round"):(t.lineWidth=r.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,endAngle:a,pixelMargin:r}=e,l=Math.max(e.outerRadius-r,0),c=e.innerRadius+r;let h;for(i&&(e.endAngle=e.startAngle+bt,ho(t,e),e.endAngle=a,e.endAngle===e.startAngle&&(e.endAngle+=bt,e.fullCircles--)),t.beginPath(),t.arc(n,o,c,s+bt,s,!0),h=0;h=bt||Wt(o,a,r))&&(s>=l&&s<=c)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),r=(n+o)/2,l=(s+a)/2;return{x:e+Math.cos(r)*l,y:i+Math.sin(r)*l}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,i=e.options,n=i.offset||0;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=Math.floor(e.circumference/bt),!(0===e.circumference||e.innerRadius<0||e.outerRadius<0)){if(t.save(),n&&e.circumference(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(ig&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function _o(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||e.stepped||i)?bo:xo}go.id="arc",go.defaults={borderAlign:"center",borderColor:"#fff",borderWidth:2,offset:0,angle:void 0},go.defaultRoutes={backgroundColor:"backgroundColor"};const yo="function"==typeof Path2D?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),t.stroke(o)}:function(t,e,i,n){t.beginPath(),e.path(t,i,n)&&t.closePath(),t.stroke()};class vo extends Oi{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,t&&Object.assign(this,t)}updateControlPoints(t){const e=this,i=e.options;if(i.tension&&!i.stepped&&!e._pointsUpdated){const n=i.spanGaps?e._loop:e._fullLoop;cn(e._points,i,t,n),e._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yn(this))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=_n(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?dn:t.tension?un:hn}(n);let c,h;for(c=0,h=a.length;c"borderDash"!==t&&"fill"!==t};class wo extends Oi{constructor(t){super(),this.options=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)t.x):Po(e,"bottom","top",t.base=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function To(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-Mt,xt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,xt,Mt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Mt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Mt,!0),t.lineTo(i+a.topLeft,n)}function Lo(t,e){t.rect(e.x,e.y,e.w,e.h)}wo.id="point",wo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},wo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Ro extends Oi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=Ao(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?To:Lo;var s;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,n),t.clip(),o(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return Oo(this,t,e,i)}inXRange(t,e){return Oo(this,t,null,e)}inYRange(t,e){return Oo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Ro.id="bar",Ro.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,pointStyle:void 0},Ro.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Eo=Object.freeze({__proto__:null,ArcElement:go,LineElement:vo,PointElement:wo,BarElement:Ro});function Io(t){t.data.datasets.forEach((t=>{if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}))}var Fo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Io(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===Ie([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;if(l.length<=4*n)return;let h;switch($(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":h=function(t,e,i){const n=i.samples||e,o=[],s=(t.length-2)/(n-2);let a,r,l,c,h,d=0,u=0;for(o[d++]=t[u],a=0;al&&(l=c,r=t[e],h=e);o[d++]=r,u=h}return o[d++]=t[t.length-1],o}(l,n,i);break;case"min-max":h=function(t,e){let i,n,o,s,a,r,l,c,h,d,u=0,f=0;const g=[],p=t[0].x,m=t[t.length-1].x-p;for(i=0;id&&(d=s,l=i),u=(f*u+n.x)/++f;else{const e=i-1;if(!$(r)&&!$(l)){const i=Math.min(r,l),n=Math.max(r,l);i!==c&&i!==e&&g.push({...t[i],x:u}),n!==c&&n!==e&&g.push({...t[n],x:u})}i>0&&e!==c&&g.push(t[e]),g.push(n),a=x,f=0,h=d=s,r=l=c=i}}return g}(l,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=h}))},destroy(t){Io(t)}};function zo(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(U(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack"].indexOf(n)>=0&&n}class Vo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:bt},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function Bo(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new Vo({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l"line"===t.type&&!t.hidden;function No(t,e,i){const n=[];for(let o=0;o=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function $o(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((t=>{const e=o[t.start],a=o[t.end];null!==n?(s.push({x:e.x,y:n}),s.push({x:a.x,y:n})):null!==i&&(s.push({x:i,y:e.y}),s.push({x:i,y:a.y}))})),s}(t,e),i.length?new vo({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Yo(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function Uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Xo(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Bt(o),s=Bt(s)),{property:t,start:o,end:s}}function qo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ko(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function Go(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function Zo(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(let t=0;t=0;--n)o=e[n].$filler,o&&o.line.updateControlPoints(i)},beforeDatasetDraw(t,e){const i=t.chartArea,n=t.ctx,o=e.meta.$filler;if(!o||!1===o.fill)return;const s=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return Wo(t);const o=Bo(t);return o instanceof Vo?o:$o(o,n)}(o),{line:a,scale:r}=o,l=a.options,c=l.fill,h=l.backgroundColor,{above:d=h,below:u=h}=c||{};s&&a.points.length&&(Gt(n,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":"x";t.save(),"x"===l&&s!==o&&(Uo(t,n,a.top),Zo(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),Uo(t,n,a.bottom)),Zo(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(n,{line:a,target:s,above:d,below:u,area:i,scale:r}),Zt(n))},defaults:{propagate:!0}};const Jo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ts extends Oi{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Ee(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Jo(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0,m=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+e+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,m++,p=0,u=f=0),u=Math.max(u,a),f+=e+r,l[o]={left:g,top:p,col:m,width:a,height:n},p+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s}}}=t;if(this.isHorizontal()){let a=0,r=o(n,t.left+s,t.right-t.lineWidths[a]);for(const l of i)a!==l.row&&(a=l.row,r=o(n,t.left+s,t.right-t.lineWidths[a])),l.top+=t.top+e+s,l.left=r,r+=l.width+s}else{let a=0,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const l of i)l.col!==a&&(a=l.col,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),l.top=r,l.left+=t.left+s,r+=l.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Gt(e,t),t._draw(),Zt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=mt.color,h=fn(e.rtl,t.left,t.width),d=Ee(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.strokeStyle=u,a.fillStyle=u,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=Jo(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},gn(t.ctx,e.textDirection);const M=_+f;t.legendItems.forEach(((e,u)=>{const w=a.measureText(e.text).width,k=h.textAlign(e.textAlign||(e.textAlign=l.textAlign)),S=x+g/2+w;let P=m.x,D=m.y;h.setWidth(t.width),y?u>0&&P+S+f>t.right&&(D=m.y+=M,m.line++,P=m.x=o(r,t.left+f,t.right-n[m.line])):u>0&&D+M>t.bottom&&(P=m.x=P+i[m.line].width+f,m.line++,D=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);qt(a,o,s,e+p)}else{const i=e+Math.max((g-b)/2,0);a.fillRect(h.leftForLtr(t,x),i,x,b),0!==n&&a.strokeRect(h.leftForLtr(t,x),i,x,b)}a.restore()}(h.x(P),D,e),P=s(k,P+x+p,t.right),function(t,e,i){te(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:i.textAlign})}(h.x(P),D,e),y?m.x+=S+f:m.y+=M})),pn(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Ee(i.font),a=Re(i.padding);if(!i.display)return;const r=fn(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,te(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Ee(t.font),i=Re(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var es={id:"legend",_element:ts,start(t,e,i){const n=t.legend=new ts({ctx:t.ctx,options:i,chart:t});Xe.configure(t,n,i),Xe.addBox(t,n)},stop(t){Xe.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Xe.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=Re(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:o||s.textAlign,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class is extends Oi{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=Re(n.padding);const s=o*Ee(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*xt):(c=s-t,h=o(r,e,n),d=.5*xt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Ee(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);te(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var ns={id:"title",_element:is,start(t,e,i){!function(t,e){const i=new is({ctx:t.ctx,options:e,chart:t});Xe.configure(t,i,e),Xe.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Xe.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Xe.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{style:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const os={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function rs(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function ls(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Ee(e.bodyFont),c=Ee(e.titleFont),h=Ee(e.footerFont),d=s.length,u=o.length,f=n.length,g=Re(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function cs(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function hs(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||cs(t,e,i,n),yAlign:n}}function ds(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,h=a+s;let d=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const u=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=h:"right"===r&&(d+=h),{x:Ht(d,0,n.width-e.width),y:Ht(u,0,n.height-e.height)}}function us(t,e,i){const n=Re(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function fs(t){return ss([],as(t))}function gs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ps extends Oi{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new bi(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=ss(r,as(o)),r=ss(r,as(s)),r=ss(r,as(a)),r}getBeforeBody(t,e){return fs(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=gs(n,t);ss(e.before,as(s.beforeLabel.call(i,t))),ss(e.lines,s.label.call(i,t)),ss(e.after,as(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return fs(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=ss(r,as(o)),r=ss(r,as(s)),r=ss(r,as(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;rt.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=gs(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=os[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=ls(i,n),r=Object.assign({},t,e),l=hs(i._chart,n,r),c=ds(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{cornerRadius:s,caretSize:a}=i,{x:r,y:l}=t,{width:c,height:h}=e;let d,u,f,g,p,m;return"center"===o?(p=l+h/2,"left"===n?(d=r,u=d-a,g=p+a,m=p-a):(d=r+c,u=d+a,g=p-a,m=p+a),f=d):(u="left"===n?r+s+a:"right"===n?r+c-s-a:this.caretX,"top"===o?(g=l,p=g-a,d=u-a,f=u+a):(g=l+h,p=g+a,d=u+a,f=u-a),m=g),{x1:d,x2:u,x3:f,y1:g,y2:p,y3:m}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=fn(i.rtl,n.x,n.width);for(t.x=us(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Ee(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=os[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=ls(e,t),r=Object.assign({},n,e._size),l=hs(i,t,r),c=ds(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Re(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),gn(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),pn(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const i=this,n=os[i.options.position].call(i,t,e);return i.caretX!==n.x||i.caretY!==n.y}}ps.positioners=os;var ms={id:"tooltip",_element:ps,positioners:os,afterInit(t,e,i){i&&(t.tooltip=new ps({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{style:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{style:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:N,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},xs=Object.freeze({__proto__:null,Decimation:Fo,Filler:Qo,Legend:es,Title:ns,Tooltip:ms});function bs(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class _s extends ji{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:bs(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}_s.id="category",_s.defaults={ticks:{callback:_s.prototype.getLabelForValue}};class ys extends ji{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e,stacked:i}=t.options,{minDefined:n,maxDefined:o}=t.getUserBounds();let{min:s,max:a}=t;const r=t=>s=n?s:t,l=t=>a=o?a:t;if(e||i){const t=Pt(s),e=Pt(a);t<0&&e<0?l(0):t>0&&e>0&&r(0)}s===a&&(l(a+1),e||r(s-1)),t.min=s,t.max=a}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{step:n,min:o,max:s,precision:a,count:r,maxTicks:l}=t,c=n||1,h=l-1,{min:d,max:u}=e,f=!$(o),g=!$(s),p=!$(r);let m,x,b,_,y=Dt((u-d)/h/c)*c;if(y<1e-14&&!f&&!g)return[{value:d},{value:u}];_=Math.ceil(u/y)-Math.floor(d/y),_>h&&(y=Dt(_*y/h/c)*c),$(a)||(m=Math.pow(10,a),y=Math.ceil(y*m)/m),x=Math.floor(d/y)*y,b=Math.ceil(u/y)*y,f&&g&&n&&Tt((s-o)/n,y/1e3)?(_=Math.min((s-o)/y,l),y=(s-o)/_,x=o,b=s):p?(x=f?o:x,b=g?s:b,_=r-1,y=(b-x)/_):(_=(b-x)/y,_=Ot(_,Math.round(_),y/1e3)?Math.round(_):Math.ceil(_)),m=Math.pow(10,$(a)?It(y):a),x=Math.round(x*m)/m,b=Math.round(b*m)/m;let v=0;for(f&&(i.push({value:o}),x<=o&&v++,Ot(Math.round((x+v*y)*m)/m,o,y/10)&&v++);v<_;++v)i.push({value:Math.round((x+v*y)*m)/m});return g?Ot(i[i.length-1].value,s,y/10)?i[i.length-1].value=s:i.push({value:s}):i.push({value:b}),i}({maxTicks:n,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count},Fe(t,e.grace));return"ticks"===e.bounds&&Lt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Li(t,this.chart.options.locale)}}class vs extends ys{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this;if(t.isHorizontal())return Math.ceil(t.width/40);const e=t._resolveTickFontOptions(0);return Math.ceil(t.height/e.lineHeight)}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ms(t){return 1===t/Math.pow(10,Math.floor(St(t)))}vs.id="linear",vs.defaults={ticks:{callback:Ei.formatters.numeric}};class ws extends ji{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ys.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(St(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(St(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(St(e.min)))),a=Math.floor(St(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ms(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(ao?{start:e-i,end:e}:{start:e,end:e+i}}function Ps(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ds(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function Cs(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,bt);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};let n,o,s;const a=[],r=[],l=t.getLabels().length;for(n=0;ne.r&&(e.r=p.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var c,h,d;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=[];const u=t.options,f=ks(u),g=t.getDistanceFromCenterForValue(u.ticks.reverse?t.min:t.max);for(n=0;n=0;o--){const e=n.setContext(t.getContext(o)),s=Ee(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=Re(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}te(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Cs(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Ee(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Re(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}te(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}Os.id="radialLinear",Os.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPadding:2,callback:Ei.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},Os.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Os.descriptors={angleLines:{_fallback:"grid"}};const Ts={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ls=Object.keys(Ts);function Rs(t,e){return t-e}function Es(t,e){if($(e))return null;const i=t._adapter,n=t.options.time,{parser:o,round:s,isoWeekday:a}=n;let r=e;return"function"==typeof o&&(r=o(r)),X(r)||(r="string"==typeof o?i.parse(r,o):i.parse(r)),null===r?null:(s&&(r="week"!==s||!At(a)&&!0!==a?i.startOf(r,s):i.startOf(r,"isoWeek",a)),+r)}function Is(t,e,i,n){const o=Ls.length;for(let s=Ls.indexOf(t);s=e?i[n]:i[o]]=!0}}else t[e]=!0}function zs(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a=0&&(e[l].major=!0);return e}(t,n,o,i):n}class Vs extends ji{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new Gn._date(t.adapters.date);st(i.displayFormats,n.formats()),super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Es(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=oe(o,s,t.max);return t._unit=i.unit||(n.autoSkip?Is(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=Ls.length-1;s>=Ls.indexOf(i);s--){const i=Ls[s];if(Ts[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Ls[i?Ls.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=Ls.indexOf(t)+1,i=Ls.length;e1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;dt-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?g(f,e,i):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;ee&&a0&&!$(e)?e/i._maxIndex:i.getDecimalForValue(t);return i.getPixelForDecimal((n.start+o)*n.factor)}getDecimalForValue(t){return Bs(this._table,t)/this._maxIndex}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return Bs(e._table,n*this._maxIndex,!0)}}Ws.id="timeseries",Ws.defaults=Vs.defaults;var Hs=Object.freeze({__proto__:null,CategoryScale:_s,LinearScale:vs,LogarithmicScale:ws,RadialLinearScale:Os,TimeScale:Vs,TimeSeriesScale:Ws});return Yn.register(co,Hs,Eo,xs),Yn.helpers={...vn},Yn._adapters=Gn,Yn.Animation=mi,Yn.Animations=bi,Yn.animator=a,Yn.controllers=wn.controllers.items,Yn.DatasetController=Ai,Yn.Element=Oi,Yn.elements=Eo,Yn.Interaction=De,Yn.layouts=Xe,Yn.platforms=ci,Yn.Scale=ji,Yn.Ticks=Ei,Object.assign(Yn,co,Hs,Eo,xs,ci),Yn.Chart=Yn,"undefined"!=typeof window&&(window.Chart=Yn),Yn})); diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index cb78eabc6a..af7d6b7dc6 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -326,7 +326,7 @@ class PurchaseOrder(Order): return self.pending_line_items().count() == 0 @transaction.atomic - def receive_line_item(self, line, location, quantity, user, status=StockStatus.OK): + def receive_line_item(self, line, location, quantity, user, status=StockStatus.OK, purchase_price=None): """ Receive a line item (or partial line item) against this PO """ @@ -348,7 +348,8 @@ class PurchaseOrder(Order): location=location, quantity=quantity, purchase_order=self, - status=status + status=status, + purchase_price=purchase_price, ) stock.save() diff --git a/InvenTree/order/views.py b/InvenTree/order/views.py index bdf0407603..e6f82373c7 100644 --- a/InvenTree/order/views.py +++ b/InvenTree/order/views.py @@ -776,6 +776,7 @@ class PurchaseOrderReceive(AjaxUpdateView): line.receive_quantity, self.request.user, status=line.status_code, + purchase_price=line.purchase_price, ) diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index c0b23ffbd7..04c046db5f 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -1,5 +1,6 @@ {% extends "modal_form.html" %} +{% load i18n %} {% block pre_form_content %}
@@ -77,6 +78,76 @@ Pricing information for:
{% endif %} + {% if price_history %} +

{% trans 'Stock Pricing' %}

+ {% if price_history|length > 1 %} + + + {% else %} +
+ {% trans 'No stock pricing history is available for this part.' %} +
+ {% endif %} + {% endif %} + {% if min_unit_buy_price or min_unit_bom_price %} {% else %}
diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 0208636a48..e6426efd7e 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -2027,6 +2027,30 @@ class PartPricing(AjaxView): ctx['max_total_bom_price'] = max_bom_price ctx['max_unit_bom_price'] = max_bom_price / quantity + # Stock history + if part.total_stock > 1: + ret = [] + stock = part.stock_entries(include_variants=False, in_stock=True) + + for stock_item in stock: + if None in [stock_item.purchase_price, stock_item.quantity]: + continue + line = { + 'price': stock_item.purchase_price.amount, + 'qty': stock_item.quantity + } + if stock_item.supplier_part: + line['name'] = stock_item.supplier_part.pretty_name + + if stock_item.supplier_part.unit_pricing and stock_item.purchase_price: + line['price_diff'] = stock_item.supplier_part.unit_pricing - stock_item.purchase_price.amount + if stock_item.purchase_order: + + line['date'] = stock_item.purchase_order.issue_date.strftime('%d.%m.%Y') + ret.append(line) + + ctx['price_history'] = ret + return ctx def get(self, request, *args, **kwargs): diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 2120d0ccfb..b90f025cc2 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -136,6 +136,7 @@ InvenTree + From a0154067d24b74a967cb612b3d734c86b7418692 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 12:05:48 +0200 Subject: [PATCH 02/68] added setting -> default false --- InvenTree/common/models.py | 7 +++++++ InvenTree/part/settings.py | 8 ++++++++ InvenTree/part/templates/part/part_pricing.html | 5 ++++- InvenTree/part/test_part.py | 1 + InvenTree/part/views.py | 3 ++- InvenTree/templates/InvenTree/settings/part.html | 1 + 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index bc2ca4214b..7a2a91dea3 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -209,6 +209,13 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, + 'PART_SHOW_GRAPH': { + 'name': _('Show Price History Graph'), + 'description': _('Display the price history graph in the part pricing view'), + 'default': False, + 'validator': bool, + }, + 'REPORT_DEBUG_MODE': { 'name': _('Debug Mode'), 'description': _('Generate reports in debug mode (HTML output)'), diff --git a/InvenTree/part/settings.py b/InvenTree/part/settings.py index 801b4dd2ec..a3913caa95 100644 --- a/InvenTree/part/settings.py +++ b/InvenTree/part/settings.py @@ -62,3 +62,11 @@ def part_trackable_default(): """ return InvenTreeSetting.get_setting('PART_TRACKABLE') + + +def part_show_graph(): + """ + Returns if the part pricing graph should be shown + """ + + return InvenTreeSetting.get_setting('PART_SHOW_GRAPH') diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index d0dc7f58c9..b07be7bdba 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -1,8 +1,11 @@ {% extends "modal_form.html" %} {% load i18n %} +{% load inventree_extras %} {% block pre_form_content %} +{% settings_value "PART_SHOW_GRAPH" as show_graph %} +
{% blocktrans %}Pricing information for:
{{part}}.{% endblocktrans %}
@@ -77,7 +80,7 @@ {% endif %} - {% if price_history %} + {% if show_graph and price_history %}

{% trans 'Stock Pricing' %}

{% if price_history|length > 1 %} diff --git a/InvenTree/part/test_part.py b/InvenTree/part/test_part.py index 030d7faf4e..67fca7fc29 100644 --- a/InvenTree/part/test_part.py +++ b/InvenTree/part/test_part.py @@ -212,6 +212,7 @@ class PartSettingsTest(TestCase): self.assertFalse(part.settings.part_purchaseable_default()) self.assertFalse(part.settings.part_salable_default()) self.assertFalse(part.settings.part_trackable_default()) + self.assertFalse(part.settings.part_show_graph()) def test_initial(self): """ diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 8787a14b35..8113a52993 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -41,6 +41,7 @@ from common.models import InvenTreeSetting from company.models import SupplierPart import common.settings as inventree_settings +import part.settings as part_settings from . import forms as part_forms from .bom import MakeBomTemplate, BomUploadManager, ExportBom, IsValidBOMFormat @@ -2034,7 +2035,7 @@ class PartPricing(AjaxView): ctx['max_unit_bom_price'] = max_bom_price / quantity # Stock history - if part.total_stock > 1: + if part_settings.part_show_graph and part.total_stock > 1: ret = [] stock = part.stock_entries(include_variants=False, in_stock=True) diff --git a/InvenTree/templates/InvenTree/settings/part.html b/InvenTree/templates/InvenTree/settings/part.html index 092d9c576c..a25fdbbcf6 100644 --- a/InvenTree/templates/InvenTree/settings/part.html +++ b/InvenTree/templates/InvenTree/settings/part.html @@ -21,6 +21,7 @@ {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_EDIT_IPN" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_QUANTITY_IN_FORMS" icon="fa-hashtag" %} {% include "InvenTree/settings/setting.html" with key="PART_RECENT_COUNT" icon="fa-clock" %} + {% include "InvenTree/settings/setting.html" with key="PART_SHOW_GRAPH" icon="fa-chart-bar" %} {% include "InvenTree/settings/setting.html" with key="PART_TEMPLATE" icon="fa-clone" %} {% include "InvenTree/settings/setting.html" with key="PART_ASSEMBLY" icon="fa-tools" %} From 80d46fb3abc416bfc442faa2cbee6962fc2a5587 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 12:30:38 +0200 Subject: [PATCH 03/68] cleanup; using one currency --- .../part/templates/part/part_pricing.html | 165 +++++++++++------- InvenTree/part/views.py | 17 +- 2 files changed, 115 insertions(+), 67 deletions(-) diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index b07be7bdba..9e29074e39 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -4,6 +4,7 @@ {% load inventree_extras %} {% block pre_form_content %} +{% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} {% settings_value "PART_SHOW_GRAPH" as show_graph %}
@@ -81,73 +82,111 @@ {% endif %} {% if show_graph and price_history %} -

{% trans 'Stock Pricing' %}

- {% if price_history|length > 1 %} - - - {% else %} -
- {% trans 'No stock pricing history is available for this part.' %} -
- {% endif %} + }); + + {% else %} +
+ {% trans 'No stock pricing history is available for this part.' %} +
+ {% endif %} {% endif %} {% if min_unit_buy_price or min_unit_bom_price %} diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 8113a52993..32bb8361b5 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -19,6 +19,7 @@ from django.forms import HiddenInput, CheckboxInput from django.conf import settings from moneyed import CURRENCIES +from djmoney.contrib.exchange.models import convert_money from PIL import Image @@ -2042,18 +2043,26 @@ class PartPricing(AjaxView): for stock_item in stock: if None in [stock_item.purchase_price, stock_item.quantity]: continue + + # convert purchase price to current currency - only one currency in the graph + price = convert_money(stock_item.purchase_price, inventree_settings.currency_code_default()) line = { - 'price': stock_item.purchase_price.amount, + 'price': price.amount, 'qty': stock_item.quantity } + # Supplier Part Name # TODO use in graph if stock_item.supplier_part: line['name'] = stock_item.supplier_part.pretty_name - if stock_item.supplier_part.unit_pricing and stock_item.purchase_price: - line['price_diff'] = stock_item.supplier_part.unit_pricing - stock_item.purchase_price.amount - if stock_item.purchase_order: + if stock_item.supplier_part.unit_pricing and price: + line['price_diff'] = price.amount - stock_item.supplier_part.unit_pricing + line['price_part'] = stock_item.supplier_part.unit_pricing + # set date for graph labels + if stock_item.purchase_order: line['date'] = stock_item.purchase_order.issue_date.strftime('%d.%m.%Y') + else: + line['date'] = stock_item.tracking_info.first().date.strftime('%d.%m.%Y') ret.append(line) ctx['price_history'] = ret From f7635fb1c01c7e29eafa029a4e24eb8dd1a55067 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 12:39:48 +0200 Subject: [PATCH 04/68] reording form --- .../part/templates/part/part_pricing.html | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index 9e29074e39..e046b5264c 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -2,11 +2,8 @@ {% load i18n %} {% load inventree_extras %} + {% block pre_form_content %} - -{% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} -{% settings_value "PART_SHOW_GRAPH" as show_graph %} -
{% blocktrans %}Pricing information for:
{{part}}.{% endblocktrans %}
@@ -81,6 +78,19 @@ {% endif %} + {% if min_unit_buy_price or min_unit_bom_price %} + {% else %} +
+ {% trans 'No pricing information is available for this part.' %} +
+ {% endif %} +
+{% endblock %} + +{% block post_form_content %} + {% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} + {% settings_value "PART_SHOW_GRAPH" as show_graph %} + {% if show_graph and price_history %}

{% trans 'Stock Pricing' %}

{% if price_history|length > 1 %} @@ -188,14 +198,4 @@
{% endif %} {% endif %} - -{% if min_unit_buy_price or min_unit_bom_price %} -{% else %} -
- {% trans 'No pricing information is available for this part.' %} -
-{% endif %} - -
- {% endblock %} \ No newline at end of file From 126c5ca3bfcfbeca8e27448b114aaa600b7cb974 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 12:48:42 +0200 Subject: [PATCH 05/68] typo --- InvenTree/part/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/settings.py b/InvenTree/part/settings.py index a3913caa95..671b7bf8f6 100644 --- a/InvenTree/part/settings.py +++ b/InvenTree/part/settings.py @@ -58,7 +58,7 @@ def part_salable_default(): def part_trackable_default(): """ - Returns the defualt value fro the 'trackable' field for a Part object + Returns the default value for the 'trackable' field for a Part object """ return InvenTreeSetting.get_setting('PART_TRACKABLE') From c14478ed1fd9fbb5c4167124033012c5556a8987 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 19:31:04 +0200 Subject: [PATCH 06/68] automato fill purchase price #1509 --- InvenTree/order/models.py | 12 +++++++++--- InvenTree/order/views.py | 6 +++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index fe336e2aba..884adefe2f 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -223,7 +223,7 @@ class PurchaseOrder(Order): return reverse('po-detail', kwargs={'pk': self.id}) @transaction.atomic - def add_line_item(self, supplier_part, quantity, group=True, reference=''): + def add_line_item(self, supplier_part, quantity, group=True, reference='', purchase_price=None): """ Add a new line item to this purchase order. This function will check that: @@ -254,7 +254,11 @@ class PurchaseOrder(Order): if matches.count() > 0: line = matches.first() - line.quantity += quantity + # update quantity and price + quantity_new = line.quantity + quantity + line.quantity = quantity_new + if purchase_price: + line.purchase_price = supplier_part.get_price(quantity_new) / quantity_new line.save() return @@ -263,7 +267,9 @@ class PurchaseOrder(Order): order=self, part=supplier_part, quantity=quantity, - reference=reference) + reference=reference, + purchase_price=purchase_price, + ) line.save() diff --git a/InvenTree/order/views.py b/InvenTree/order/views.py index f9ec52254f..fc7f376206 100644 --- a/InvenTree/order/views.py +++ b/InvenTree/order/views.py @@ -996,6 +996,7 @@ class OrderParts(AjaxView): part.order_supplier = supplier_part.id if supplier_part else None part.order_quantity = quantity + part.purchase_price = supplier_part.get_price(quantity) / quantity if supplier_part else None self.parts.append(part) @@ -1096,7 +1097,10 @@ class OrderParts(AjaxView): sp=item.order_supplier)) continue - order.add_line_item(supplier_part, quantity) + # get purchase price + purchase_price = item.purchase_price if item.purchase_price else None + + order.add_line_item(supplier_part, quantity, purchase_price=purchase_price) class POLineItemCreate(AjaxCreateView): From 7cb858546e8aee9ee580033b21a014c8dd5768b4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 22:16:56 +0200 Subject: [PATCH 07/68] tests for new methods in #1509 --- InvenTree/order/fixtures/order.yaml | 9 ++++++++ InvenTree/order/tests.py | 36 ++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/InvenTree/order/fixtures/order.yaml b/InvenTree/order/fixtures/order.yaml index 8943b36061..6b65c20786 100644 --- a/InvenTree/order/fixtures/order.yaml +++ b/InvenTree/order/fixtures/order.yaml @@ -50,6 +50,15 @@ supplier: 3 status: 40 # Cancelled + # for pricebreaks +- model: order.purchaseorder + pk: 7 + fields: + reference: '0007' + description: 'Another PO' + supplier: 2 + status: 10 # Pending + # Add some line items against PO 0001 # 100 x ACME0001 (M2x4 LPHS) diff --git a/InvenTree/order/tests.py b/InvenTree/order/tests.py index ed6a4ebb6a..1779a7f18c 100644 --- a/InvenTree/order/tests.py +++ b/InvenTree/order/tests.py @@ -21,6 +21,7 @@ class OrderTest(TestCase): fixtures = [ 'company', 'supplier_part', + 'price_breaks', 'category', 'part', 'location', @@ -63,7 +64,7 @@ class OrderTest(TestCase): next_ref = PurchaseOrder.getNextOrderNumber() - self.assertEqual(next_ref, '0007') + self.assertEqual(next_ref, '0008') def test_on_order(self): """ There should be 3 separate items on order for the M2x4 LPHS part """ @@ -117,6 +118,39 @@ class OrderTest(TestCase): with self.assertRaises(django_exceptions.ValidationError): order.add_line_item(sku, 99) + def test_pricing(self): + """ Test functions for adding line items to an order including price-breaks """ + + order = PurchaseOrder.objects.get(pk=7) + + self.assertEqual(order.status, PurchaseOrderStatus.PENDING) + self.assertEqual(order.lines.count(), 0) + + sku = SupplierPart.objects.get(SKU='ZERGM312') + part = sku.part + + # Order the part + self.assertEqual(part.on_order, 0) + + # Order 25 with manually set high value + pp = sku.get_price(25) + order.add_line_item(sku, 25, purchase_price=pp) + self.assertEqual(part.on_order, 25) + self.assertEqual(order.lines.count(), 1) + self.assertEqual(order.lines.first().purchase_price.amount, 200) + + # Add a few, now the pricebreak should adjust although wrong price given + order.add_line_item(sku, 10, purchase_price=sku.get_price(25)) + self.assertEqual(part.on_order, 35) + self.assertEqual(order.lines.count(), 1) + self.assertEqual(order.lines.first().purchase_price.amount, 8) + + # Order the same part again (it should be merged) + order.add_line_item(sku, 100, purchase_price=sku.get_price(100)) + self.assertEqual(order.lines.count(), 1) + self.assertEqual(part.on_order, 135) + self.assertEqual(order.lines.first().purchase_price.amount, 1.25) + def test_receive(self): """ Test order receiving functions """ From a1237b4a493d4c9eba1be860e582b181d25f48ee Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 22:17:54 +0200 Subject: [PATCH 08/68] always adjust pruchase price if one exists --- InvenTree/order/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index 884adefe2f..11d125b789 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -257,7 +257,7 @@ class PurchaseOrder(Order): # update quantity and price quantity_new = line.quantity + quantity line.quantity = quantity_new - if purchase_price: + if line.purchase_price: line.purchase_price = supplier_part.get_price(quantity_new) / quantity_new line.save() From 83764d5e6ce8a55ec46200731576408a1cb708c8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 22:57:48 +0200 Subject: [PATCH 09/68] added PO in the fixtures so that should be higher --- InvenTree/order/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/order/test_api.py b/InvenTree/order/test_api.py index cb92b8b384..2b9d02b5bf 100644 --- a/InvenTree/order/test_api.py +++ b/InvenTree/order/test_api.py @@ -60,7 +60,7 @@ class PurchaseOrderTest(OrderTest): def test_po_list(self): # List *ALL* PO items - self.filter({}, 6) + self.filter({}, 7) # Filter by supplier self.filter({'supplier': 1}, 1) @@ -80,7 +80,7 @@ class PurchaseOrderTest(OrderTest): """ self.filter({'overdue': True}, 0) - self.filter({'overdue': False}, 6) + self.filter({'overdue': False}, 7) order = PurchaseOrder.objects.get(pk=1) order.target_date = datetime.now().date() - timedelta(days=10) From a11fff02692b42d09818e6f084cec9ec34bec43c Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 22 Apr 2021 23:17:27 +0200 Subject: [PATCH 10/68] man those tests take long --- InvenTree/order/test_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/order/test_api.py b/InvenTree/order/test_api.py index 2b9d02b5bf..3e04bf4f52 100644 --- a/InvenTree/order/test_api.py +++ b/InvenTree/order/test_api.py @@ -67,11 +67,11 @@ class PurchaseOrderTest(OrderTest): self.filter({'supplier': 3}, 5) # Filter by "outstanding" - self.filter({'outstanding': True}, 4) + self.filter({'outstanding': True}, 5) self.filter({'outstanding': False}, 2) # Filter by "status" - self.filter({'status': 10}, 2) + self.filter({'status': 10}, 3) self.filter({'status': 40}, 1) def test_overdue(self): @@ -87,7 +87,7 @@ class PurchaseOrderTest(OrderTest): order.save() self.filter({'overdue': True}, 1) - self.filter({'overdue': False}, 5) + self.filter({'overdue': False}, 6) def test_po_detail(self): From 8f40b5712116b49dfe4b28d58d1e94cb9043638f Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 27 Apr 2021 16:32:43 +0200 Subject: [PATCH 11/68] improvements after code-review by @eeintech --- InvenTree/order/models.py | 5 +++-- InvenTree/order/views.py | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index 11d125b789..2e4ceb54e7 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -257,8 +257,9 @@ class PurchaseOrder(Order): # update quantity and price quantity_new = line.quantity + quantity line.quantity = quantity_new - if line.purchase_price: - line.purchase_price = supplier_part.get_price(quantity_new) / quantity_new + supplier_price = supplier_part.get_price(quantity_new) + if line.purchase_price and supplier_price: + line.purchase_price = supplier_price / quantity_new line.save() return diff --git a/InvenTree/order/views.py b/InvenTree/order/views.py index fc7f376206..c62a3816d5 100644 --- a/InvenTree/order/views.py +++ b/InvenTree/order/views.py @@ -996,7 +996,14 @@ class OrderParts(AjaxView): part.order_supplier = supplier_part.id if supplier_part else None part.order_quantity = quantity - part.purchase_price = supplier_part.get_price(quantity) / quantity if supplier_part else None + + # set supplier-price + if supplier_part: + supplier_price = supplier_part.get_price(quantity) + if supplier_price: + part.purchase_price = supplier_price / quantity + if not hasattr(part, 'purchase_price'): + part.purchase_price = None self.parts.append(part) @@ -1098,7 +1105,7 @@ class OrderParts(AjaxView): continue # get purchase price - purchase_price = item.purchase_price if item.purchase_price else None + purchase_price = item.purchase_price order.add_line_item(supplier_part, quantity, purchase_price=purchase_price) From 71c3ff4b9fdeb6c7580defec8fdc3ca1f9b303c2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 11 May 2021 16:15:10 +0200 Subject: [PATCH 12/68] prefetching related information --- InvenTree/part/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 6f8d66de21..1fdc5b60e3 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -2043,7 +2043,8 @@ class PartPricing(AjaxView): # Stock history if part_settings.part_show_graph and part.total_stock > 1: ret = [] - stock = part.stock_entries(include_variants=False, in_stock=True) + stock = part.stock_entries(include_variants=False, in_stock=True) #.order_by('purchase_order__date') + stock = stock.prefetch_related('purchase_order', 'supplier_part') for stock_item in stock: if None in [stock_item.purchase_price, stock_item.quantity]: From 169745c11f022120d35b6704bb2403bccca9dd2f Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 11 May 2021 16:23:26 +0200 Subject: [PATCH 13/68] style fix --- InvenTree/part/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 1fdc5b60e3..a2986fe869 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -2043,7 +2043,7 @@ class PartPricing(AjaxView): # Stock history if part_settings.part_show_graph and part.total_stock > 1: ret = [] - stock = part.stock_entries(include_variants=False, in_stock=True) #.order_by('purchase_order__date') + stock = part.stock_entries(include_variants=False, in_stock=True) # .order_by('purchase_order__date') stock = stock.prefetch_related('purchase_order', 'supplier_part') for stock_item in stock: From f2e9f58f1b3916f058e42fcbfa29c3b3e0539b41 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 13 May 2021 15:47:42 -0400 Subject: [PATCH 14/68] Added purchase price range and average to BOM items/view --- InvenTree/part/api.py | 9 ++++++++- InvenTree/part/serializers.py | 9 +++++++++ InvenTree/templates/js/bom.js | 29 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index de6ac5f273..659976a0b0 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals from django_filters.rest_framework import DjangoFilterBackend from django.http import JsonResponse -from django.db.models import Q, F, Count +from django.db.models import Q, F, Count, Min, Max, Avg from django.utils.translation import ugettext_lazy as _ from rest_framework import status @@ -877,6 +877,13 @@ class BomList(generics.ListCreateAPIView): else: queryset = queryset.exclude(pk__in=pks) + # Annotate with purchase prices + queryset = queryset.annotate( + purchase_price_min=Min('sub_part__stock_items__purchase_price'), + purchase_price_max=Max('sub_part__stock_items__purchase_price'), + purchase_price_avg=Avg('sub_part__stock_items__purchase_price'), + ) + return queryset filter_backends = [ diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 7ab385249c..8c2d72f43d 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -367,6 +367,12 @@ class BomItemSerializer(InvenTreeModelSerializer): validated = serializers.BooleanField(read_only=True, source='is_line_valid') + purchase_price_min = serializers.FloatField() + + purchase_price_max = serializers.FloatField() + + purchase_price_avg = serializers.FloatField() + def __init__(self, *args, **kwargs): # part_detail and sub_part_detail serializers are only included if requested. # This saves a bunch of database requests @@ -410,6 +416,9 @@ class BomItemSerializer(InvenTreeModelSerializer): 'sub_part_detail', # 'price_range', 'validated', + 'purchase_price_min', + 'purchase_price_max', + 'purchase_price_avg', ] diff --git a/InvenTree/templates/js/bom.js b/InvenTree/templates/js/bom.js index 462db6eba4..c97d8b30e5 100644 --- a/InvenTree/templates/js/bom.js +++ b/InvenTree/templates/js/bom.js @@ -243,6 +243,35 @@ function loadBomTable(table, options) { } }); + cols.push( + { + field: 'purchase_price_range', + title: '{% trans "Purchase Price Range" %}', + searchable: false, + sortable: true, + formatter: function(value, row, index, field) { + var purchase_price_range = 0; + + if (row.purchase_price_min > 0) { + if (row.purchase_price_min >= row.purchase_price_max) { + purchase_price_range = row.purchase_price_min; + } else { + purchase_price_range = row.purchase_price_min + " - " + row.purchase_price_max; + } + } + + return purchase_price_range; + }, + }); + + cols.push( + { + field: 'purchase_price_avg', + title: '{% trans "Purchase Price Average" %}', + searchable: false, + sortable: true, + }); + /* // TODO - Re-introduce the pricing column at a later stage, From 32d0f3039de910b8e3c90164c5c80da84907e541 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 13 May 2021 16:17:45 -0400 Subject: [PATCH 15/68] Obviously new float fields should be read-only... --- InvenTree/part/serializers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 8c2d72f43d..2316f2f18b 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -367,11 +367,11 @@ class BomItemSerializer(InvenTreeModelSerializer): validated = serializers.BooleanField(read_only=True, source='is_line_valid') - purchase_price_min = serializers.FloatField() + purchase_price_min = serializers.FloatField(read_only=True) - purchase_price_max = serializers.FloatField() + purchase_price_max = serializers.FloatField(read_only=True) - purchase_price_avg = serializers.FloatField() + purchase_price_avg = serializers.FloatField(read_only=True) def __init__(self, *args, **kwargs): # part_detail and sub_part_detail serializers are only included if requested. From 68f5ec8b6a9f54e8273627e2495edd7fbb169179 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 13 May 2021 17:09:52 -0400 Subject: [PATCH 16/68] Added currency conversion --- InvenTree/part/api.py | 42 +++++++++++++++++++++++++++++++++++ InvenTree/part/serializers.py | 7 +++--- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 659976a0b0..5b82a168cf 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -15,6 +15,10 @@ from rest_framework.response import Response from rest_framework import filters, serializers from rest_framework import generics +from djmoney.money import Money +from djmoney.contrib.exchange.models import convert_money +from djmoney.contrib.exchange.exceptions import MissingRate + from django.conf.urls import url, include from django.urls import reverse @@ -24,6 +28,7 @@ from .models import PartAttachment, PartTestTemplate from .models import PartSellPriceBreak from .models import PartCategoryParameterTemplate +from common.models import InvenTreeSetting from build.models import Build from . import serializers as part_serializers @@ -882,8 +887,45 @@ class BomList(generics.ListCreateAPIView): purchase_price_min=Min('sub_part__stock_items__purchase_price'), purchase_price_max=Max('sub_part__stock_items__purchase_price'), purchase_price_avg=Avg('sub_part__stock_items__purchase_price'), + purchase_price_currency=F('sub_part__stock_items__purchase_price_currency'), ) + # Convert prices to default currency (using backend conversion rates) + for item in queryset: + # Get default currency from settings + default_currency = InvenTreeSetting.get_setting('INVENTREE_DEFAULT_CURRENCY') + + if default_currency: + if item.purchase_price_min: + # Convert minimum + try: + # Get adjusted price + purchase_price_adjusted = convert_money(Money(item.purchase_price_min, item.purchase_price_currency), default_currency) + # Update queryset + item.purchase_price_min = purchase_price_adjusted + except MissingRate: + pass + + if item.purchase_price_max: + # Convert maximum + try: + # Get adjusted price + purchase_price_adjusted = convert_money(Money(item.purchase_price_max, item.purchase_price_currency), default_currency) + # Update queryset + item.purchase_price_max = purchase_price_adjusted + except MissingRate: + pass + + if item.purchase_price_avg: + # Convert average + try: + # Get adjusted price + purchase_price_adjusted = convert_money(Money(item.purchase_price_avg, item.purchase_price_currency), default_currency) + # Update queryset + item.purchase_price_avg = purchase_price_adjusted + except MissingRate: + pass + return queryset filter_backends = [ diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 2316f2f18b..096d072981 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -12,6 +12,7 @@ from InvenTree.serializers import (InvenTreeAttachmentSerializerField, from InvenTree.status_codes import BuildStatus, PurchaseOrderStatus from rest_framework import serializers from sql_util.utils import SubqueryCount, SubquerySum +from djmoney.contrib.django_rest_framework import MoneyField from stock.models import StockItem from .models import (BomItem, Part, PartAttachment, PartCategory, @@ -367,11 +368,11 @@ class BomItemSerializer(InvenTreeModelSerializer): validated = serializers.BooleanField(read_only=True, source='is_line_valid') - purchase_price_min = serializers.FloatField(read_only=True) + purchase_price_min = MoneyField(max_digits=10, decimal_places=4, read_only=True) - purchase_price_max = serializers.FloatField(read_only=True) + purchase_price_max = MoneyField(max_digits=10, decimal_places=4, read_only=True) - purchase_price_avg = serializers.FloatField(read_only=True) + purchase_price_avg = MoneyField(max_digits=10, decimal_places=4, read_only=True) def __init__(self, *args, **kwargs): # part_detail and sub_part_detail serializers are only included if requested. From 1940fd5199f34e91b6df6b17dc8a8adbd909efbf Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 14 May 2021 16:16:23 -0400 Subject: [PATCH 17/68] Now processing currencies --- InvenTree/part/api.py | 70 ++++++++++++++++++++--------------- InvenTree/part/serializers.py | 43 +++++++++++++++++++-- InvenTree/templates/js/bom.js | 13 ------- 3 files changed, 79 insertions(+), 47 deletions(-) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 5b82a168cf..065eca30c6 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -887,44 +887,54 @@ class BomList(generics.ListCreateAPIView): purchase_price_min=Min('sub_part__stock_items__purchase_price'), purchase_price_max=Max('sub_part__stock_items__purchase_price'), purchase_price_avg=Avg('sub_part__stock_items__purchase_price'), - purchase_price_currency=F('sub_part__stock_items__purchase_price_currency'), ) - # Convert prices to default currency (using backend conversion rates) - for item in queryset: + # Get values for currencies + currencies = queryset.annotate( + purchase_price_currency=F('sub_part__stock_items__purchase_price_currency'), + ).values('pk', 'sub_part', 'purchase_price_currency') + + def convert_price(price, currency, decimal_places=4): + """ Convert price field, returns Money field """ + + price_adjusted = None + # Get default currency from settings default_currency = InvenTreeSetting.get_setting('INVENTREE_DEFAULT_CURRENCY') - if default_currency: - if item.purchase_price_min: - # Convert minimum + if price: + if currency and default_currency: try: # Get adjusted price - purchase_price_adjusted = convert_money(Money(item.purchase_price_min, item.purchase_price_currency), default_currency) - # Update queryset - item.purchase_price_min = purchase_price_adjusted + price_adjusted = convert_money(Money(price, currency), default_currency) except MissingRate: - pass - - if item.purchase_price_max: - # Convert maximum - try: - # Get adjusted price - purchase_price_adjusted = convert_money(Money(item.purchase_price_max, item.purchase_price_currency), default_currency) - # Update queryset - item.purchase_price_max = purchase_price_adjusted - except MissingRate: - pass - - if item.purchase_price_avg: - # Convert average - try: - # Get adjusted price - purchase_price_adjusted = convert_money(Money(item.purchase_price_avg, item.purchase_price_currency), default_currency) - # Update queryset - item.purchase_price_avg = purchase_price_adjusted - except MissingRate: - pass + # No conversion rate set + price_adjusted = Money(price, currency) + else: + # Currency exists + if currency: + price_adjusted = Money(price, currency) + # Default currency exists + if default_currency: + price_adjusted = Money(price, default_currency) + + if price_adjusted and decimal_places: + price_adjusted.decimal_places = decimal_places + + return price_adjusted + + # Convert prices to default currency (using backend conversion rates) + for bom_item in queryset: + # Find associated currency (select first found) + purchase_price_currency = None + for currency_item in currencies: + if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part: + purchase_price_currency = currency_item['purchase_price_currency'] + break + # Convert prices + bom_item.purchase_price_min = convert_price(bom_item.purchase_price_min, purchase_price_currency) + bom_item.purchase_price_max = convert_price(bom_item.purchase_price_max, purchase_price_currency) + bom_item.purchase_price_avg = convert_price(bom_item.purchase_price_avg, purchase_price_currency) return queryset diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 096d072981..868997915b 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -368,11 +368,13 @@ class BomItemSerializer(InvenTreeModelSerializer): validated = serializers.BooleanField(read_only=True, source='is_line_valid') - purchase_price_min = MoneyField(max_digits=10, decimal_places=4, read_only=True) + purchase_price_min = MoneyField(max_digits=10, decimal_places=6, read_only=True) - purchase_price_max = MoneyField(max_digits=10, decimal_places=4, read_only=True) - - purchase_price_avg = MoneyField(max_digits=10, decimal_places=4, read_only=True) + purchase_price_max = MoneyField(max_digits=10, decimal_places=6, read_only=True) + + purchase_price_avg = serializers.SerializerMethodField() + + purchase_price_range = serializers.SerializerMethodField() def __init__(self, *args, **kwargs): # part_detail and sub_part_detail serializers are only included if requested. @@ -401,6 +403,38 @@ class BomItemSerializer(InvenTreeModelSerializer): queryset = queryset.prefetch_related('sub_part__supplier_parts__pricebreaks') return queryset + def get_purchase_price_range(self, obj): + """ Return purchase price range """ + + if obj.purchase_price_min and not obj.purchase_price_max: + # Get price range + purchase_price_range = str(obj.purchase_price_max) + elif not obj.purchase_price_min and obj.purchase_price_max: + # Get price range + purchase_price_range = str(obj.purchase_price_max) + elif obj.purchase_price_min and obj.purchase_price_max: + # Get price range + if obj.purchase_price_min >= obj.purchase_price_max: + # If min > max: use min only + purchase_price_range = str(obj.purchase_price_min) + else: + purchase_price_range = str(obj.purchase_price_min) + " - " + str(obj.purchase_price_max) + else: + purchase_price_range = '-' + + return purchase_price_range + + def get_purchase_price_avg(self, obj): + """ Return purchase price average """ + + if obj.purchase_price_avg: + # Get string representation of price average + purchase_price_avg = str(obj.purchase_price_avg) + else: + purchase_price_avg = '-' + + return purchase_price_avg + class Meta: model = BomItem fields = [ @@ -420,6 +454,7 @@ class BomItemSerializer(InvenTreeModelSerializer): 'purchase_price_min', 'purchase_price_max', 'purchase_price_avg', + 'purchase_price_range', ] diff --git a/InvenTree/templates/js/bom.js b/InvenTree/templates/js/bom.js index c97d8b30e5..e35a51d8bd 100644 --- a/InvenTree/templates/js/bom.js +++ b/InvenTree/templates/js/bom.js @@ -249,19 +249,6 @@ function loadBomTable(table, options) { title: '{% trans "Purchase Price Range" %}', searchable: false, sortable: true, - formatter: function(value, row, index, field) { - var purchase_price_range = 0; - - if (row.purchase_price_min > 0) { - if (row.purchase_price_min >= row.purchase_price_max) { - purchase_price_range = row.purchase_price_min; - } else { - purchase_price_range = row.purchase_price_min + " - " + row.purchase_price_max; - } - } - - return purchase_price_range; - }, }); cols.push( From 274eb51e48d7e8e4cea773b3223f33582791c869 Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 14 May 2021 16:29:55 -0400 Subject: [PATCH 18/68] Added read_only args --- InvenTree/part/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 868997915b..b6e24fd199 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -372,9 +372,9 @@ class BomItemSerializer(InvenTreeModelSerializer): purchase_price_max = MoneyField(max_digits=10, decimal_places=6, read_only=True) - purchase_price_avg = serializers.SerializerMethodField() + purchase_price_avg = serializers.SerializerMethodField(read_only=True) - purchase_price_range = serializers.SerializerMethodField() + purchase_price_range = serializers.SerializerMethodField(read_only=True) def __init__(self, *args, **kwargs): # part_detail and sub_part_detail serializers are only included if requested. From e9f41a83576f26b08e3f13b4c7e380184752b224 Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 14 May 2021 16:38:30 -0400 Subject: [PATCH 19/68] Currency finding fix --- InvenTree/part/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 065eca30c6..5bdd572145 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -928,7 +928,7 @@ class BomList(generics.ListCreateAPIView): # Find associated currency (select first found) purchase_price_currency = None for currency_item in currencies: - if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part: + if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part.pk: purchase_price_currency = currency_item['purchase_price_currency'] break # Convert prices From 5ce262172d77d133ee591751adab63eb86fd663f Mon Sep 17 00:00:00 2001 From: eeintech Date: Fri, 14 May 2021 16:59:59 -0400 Subject: [PATCH 20/68] Fixed bom_item unit test --- InvenTree/part/serializers.py | 39 ++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index b6e24fd199..04e0b7a119 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -372,9 +372,9 @@ class BomItemSerializer(InvenTreeModelSerializer): purchase_price_max = MoneyField(max_digits=10, decimal_places=6, read_only=True) - purchase_price_avg = serializers.SerializerMethodField(read_only=True) + purchase_price_avg = serializers.SerializerMethodField() - purchase_price_range = serializers.SerializerMethodField(read_only=True) + purchase_price_range = serializers.SerializerMethodField() def __init__(self, *args, **kwargs): # part_detail and sub_part_detail serializers are only included if requested. @@ -406,19 +406,29 @@ class BomItemSerializer(InvenTreeModelSerializer): def get_purchase_price_range(self, obj): """ Return purchase price range """ - if obj.purchase_price_min and not obj.purchase_price_max: + try: + purchase_price_min = obj.purchase_price_min + except AttributeError: + return None + + try: + purchase_price_max = obj.purchase_price_max + except AttributeError: + return None + + if purchase_price_min and not purchase_price_max: # Get price range - purchase_price_range = str(obj.purchase_price_max) - elif not obj.purchase_price_min and obj.purchase_price_max: + purchase_price_range = str(purchase_price_max) + elif not purchase_price_min and purchase_price_max: # Get price range - purchase_price_range = str(obj.purchase_price_max) - elif obj.purchase_price_min and obj.purchase_price_max: + purchase_price_range = str(purchase_price_max) + elif purchase_price_min and purchase_price_max: # Get price range - if obj.purchase_price_min >= obj.purchase_price_max: + if purchase_price_min >= purchase_price_max: # If min > max: use min only - purchase_price_range = str(obj.purchase_price_min) + purchase_price_range = str(purchase_price_min) else: - purchase_price_range = str(obj.purchase_price_min) + " - " + str(obj.purchase_price_max) + purchase_price_range = str(purchase_price_min) + " - " + str(purchase_price_max) else: purchase_price_range = '-' @@ -427,9 +437,14 @@ class BomItemSerializer(InvenTreeModelSerializer): def get_purchase_price_avg(self, obj): """ Return purchase price average """ - if obj.purchase_price_avg: + try: + purchase_price_avg = obj.purchase_price_avg + except AttributeError: + return None + + if purchase_price_avg: # Get string representation of price average - purchase_price_avg = str(obj.purchase_price_avg) + purchase_price_avg = str(purchase_price_avg) else: purchase_price_avg = '-' From 6c30d128a1278f3f132060f3c9b40bd1c3da6587 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 May 2021 17:33:24 +0200 Subject: [PATCH 21/68] removing duplicate information --- InvenTree/part/templates/part/part_pricing.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index 9cadd1a655..e552d40024 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -4,11 +4,6 @@ {% load inventree_extras %} {% block pre_form_content %} -
-{% blocktrans %}Pricing information for:
{{part}}.{% endblocktrans %} -
- -

{% trans 'Quantity' %}

From b803fbae72e8614f7f5bc42026cf6599cf71472f Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 00:18:04 +0200 Subject: [PATCH 22/68] remofing setting --- InvenTree/common/models.py | 7 ------- InvenTree/part/settings.py | 8 -------- InvenTree/part/test_part.py | 1 - InvenTree/templates/InvenTree/settings/part.html | 1 - 4 files changed, 17 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 04fd93188a..e499e9b801 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -217,13 +217,6 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, - 'PART_SHOW_GRAPH': { - 'name': _('Show Price History Graph'), - 'description': _('Display the price history graph in the part pricing view'), - 'default': False, - 'validator': bool, - }, - 'REPORT_DEBUG_MODE': { 'name': _('Debug Mode'), 'description': _('Generate reports in debug mode (HTML output)'), diff --git a/InvenTree/part/settings.py b/InvenTree/part/settings.py index 671b7bf8f6..e345a9d88d 100644 --- a/InvenTree/part/settings.py +++ b/InvenTree/part/settings.py @@ -62,11 +62,3 @@ def part_trackable_default(): """ return InvenTreeSetting.get_setting('PART_TRACKABLE') - - -def part_show_graph(): - """ - Returns if the part pricing graph should be shown - """ - - return InvenTreeSetting.get_setting('PART_SHOW_GRAPH') diff --git a/InvenTree/part/test_part.py b/InvenTree/part/test_part.py index 01e05f2710..cd8726ccf4 100644 --- a/InvenTree/part/test_part.py +++ b/InvenTree/part/test_part.py @@ -212,7 +212,6 @@ class PartSettingsTest(TestCase): self.assertFalse(part.settings.part_purchaseable_default()) self.assertFalse(part.settings.part_salable_default()) self.assertFalse(part.settings.part_trackable_default()) - self.assertFalse(part.settings.part_show_graph()) def test_initial(self): """ diff --git a/InvenTree/templates/InvenTree/settings/part.html b/InvenTree/templates/InvenTree/settings/part.html index 6c2aff7711..e359acdfc2 100644 --- a/InvenTree/templates/InvenTree/settings/part.html +++ b/InvenTree/templates/InvenTree/settings/part.html @@ -21,7 +21,6 @@ {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_EDIT_IPN" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_QUANTITY_IN_FORMS" icon="fa-hashtag" %} {% include "InvenTree/settings/setting.html" with key="PART_RECENT_COUNT" icon="fa-clock" %} - {% include "InvenTree/settings/setting.html" with key="PART_SHOW_GRAPH" icon="fa-chart-bar" %} {% include "InvenTree/settings/setting.html" with key="PART_TEMPLATE" icon="fa-clone" %} {% include "InvenTree/settings/setting.html" with key="PART_ASSEMBLY" icon="fa-tools" %} From 7c18ebbbe4594333525050b8f7f7bb46d55938fc Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 01:13:46 +0200 Subject: [PATCH 23/68] creating new tab --- InvenTree/part/templates/part/navbar.html | 6 + .../part/templates/part/order_prices.html | 219 ++++++++++++++++++ InvenTree/part/urls.py | 1 + InvenTree/part/views.py | 107 ++++++--- 4 files changed, 301 insertions(+), 32 deletions(-) create mode 100644 InvenTree/part/templates/part/order_prices.html diff --git a/InvenTree/part/templates/part/navbar.html b/InvenTree/part/templates/part/navbar.html index df49841e31..a2c8104486 100644 --- a/InvenTree/part/templates/part/navbar.html +++ b/InvenTree/part/templates/part/navbar.html @@ -69,6 +69,12 @@ {% endif %} {% if part.purchaseable and roles.purchase_order.view %} +
  • + + + {% trans "Order Price" %} + +
  • diff --git a/InvenTree/part/templates/part/order_prices.html b/InvenTree/part/templates/part/order_prices.html new file mode 100644 index 0000000000..5bbd5d22ef --- /dev/null +++ b/InvenTree/part/templates/part/order_prices.html @@ -0,0 +1,219 @@ +{% extends "part/part_base.html" %} +{% load static %} +{% load i18n %} +{% load inventree_extras %} + +{% block menubar %} +{% include 'part/navbar.html' with tab='order-prices' %} +{% endblock %} + +{% block heading %} +{% trans "Order Price Information" %} +{% endblock %} + +{% block details %} + +
    + {% csrf_token %} + {% load crispy_forms_tags %} + {% crispy form %} + + + +{% if part.supplier_count > 0 %} +

    {% trans 'Supplier Pricing' %}

    +
  • {% trans 'Part' %}
    + {% if min_total_buy_price %} + + + + + + {% if quantity > 1 %} + + + + + + {% endif %} + {% else %} + + + + {% endif %} +
    {% trans 'Unit Cost' %}Min: {% include "price.html" with price=min_unit_buy_price %}Max: {% include "price.html" with price=max_unit_buy_price %}
    {% trans 'Total Cost' %}Min: {% include "price.html" with price=min_total_buy_price %}Max: {% include "price.html" with price=max_total_buy_price %}
    + {% trans 'No supplier pricing available' %} +
    +{% endif %} + +{% if part.bom_count > 0 %} +

    {% trans 'BOM Pricing' %}

    + + {% if min_total_bom_price %} + + + + + + {% if quantity > 1 %} + + + + + + {% endif %} + {% if part.has_complete_bom_pricing == False %} + + + + {% endif %} + {% else %} + + + + {% endif %} +
    {% trans 'Unit Cost' %}Min: {% include "price.html" with price=min_unit_bom_price %}Max: {% include "price.html" with price=max_unit_bom_price %}
    {% trans 'Total Cost' %}Min: {% include "price.html" with price=min_total_bom_price %}Max: {% include "price.html" with price=max_total_bom_price %}
    + {% trans 'Note: BOM pricing is incomplete for this part' %} +
    + {% trans 'No BOM pricing available' %} +
    +{% endif %} + +{% if total_part_price %} +

    {% trans 'Sale Price' %}

    + + + + + + + + + +
    {% trans 'Unit Cost' %}{% include "price.html" with price=unit_part_price %}
    {% trans 'Total Cost' %}{% include "price.html" with price=total_part_price %}
    +{% endif %} + + {% if min_unit_buy_price or min_unit_bom_price %} + {% else %} +
    + {% trans 'No pricing information is available for this part.' %} +
    + {% endif %} +
    + +{% if price_history %} +

    {% trans 'Stock Pricing' %}

    + {% if price_history|length > 1 %} +
    + +
    + {% else %} +
    + {% trans 'No stock pricing history is available for this part.' %} +
    + {% endif %} +{% endif %} +{% endblock %} + + + + +{% block js_ready %} + {{ block.super }} + + {% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} + + {% if price_history %} + var pricedata = { + labels: [ + {% for line in price_history %}'{{ line.date }}',{% endfor %} + ], + datasets: [{ + label: '{% trans "Single Price" %}', + backgroundColor: 'rgba(255, 99, 132, 0.2)', + borderColor: 'rgb(255, 99, 132)', + yAxisID: 'y', + data: [ + {% for line in price_history %}{{ line.price|stringformat:".2f" }},{% endfor %} + ], + borderWidth: 1, + type: 'line' + }, + {% if 'price_diff' in price_history.0 %} + { + label: '{% trans "Single Price Difference" %}', + backgroundColor: 'rgba(68, 157, 68, 0.2)', + borderColor: 'rgb(68, 157, 68)', + yAxisID: 'y2', + data: [ + {% for line in price_history %}{{ line.price_diff|stringformat:".2f" }},{% endfor %} + ], + borderWidth: 1, + type: 'line' + }, + { + label: '{% trans "Part Single Price" %}', + backgroundColor: 'rgba(70, 127, 155, 0.2)', + borderColor: 'rgb(70, 127, 155)', + yAxisID: 'y', + data: [ + {% for line in price_history %}{{ line.price_part|stringformat:".2f" }},{% endfor %} + ], + borderWidth: 1, + type: 'line' + }, + {% endif %} + { + label: '{% trans "Quantity" %}', + backgroundColor: 'rgba(255, 206, 86, 0.2)', + borderColor: 'rgb(255, 206, 86)', + yAxisID: 'y1', + data: [ + {% for line in price_history %}{{ line.qty|stringformat:"f" }},{% endfor %} + ], + borderWidth: 1 + }] + } + var ctx = document.getElementById('StockPriceChart'); + var StockPriceChart = new Chart(ctx, { + type: 'bar', + data: pricedata, + options: { + responsive: true, + maintainAspectRatio: false, + plugins: {legend: {position: 'bottom'}}, + scales: { + y: { + type: 'linear', + position: 'left', + grid: {display: false}, + title: { + display: true, + text: '{% blocktrans %}Single Price - {{currency}}{% endblocktrans %}' + } + }, + y1: { + type: 'linear', + position: 'right', + grid: {display: false}, + titel: { + display: true, + text: '{% trans "Quantity" %}', + position: 'right' + } + }, + y2: { + type: 'linear', + position: 'left', + grid: {display: false}, + title: { + display: true, + text: '{% blocktrans %}Single Price Difference- {{currency}}{% endblocktrans %}' + } + } + }, + } + }); + {% endif %} + +{% endblock %} diff --git a/InvenTree/part/urls.py b/InvenTree/part/urls.py index c734b7f610..e53ce54782 100644 --- a/InvenTree/part/urls.py +++ b/InvenTree/part/urls.py @@ -59,6 +59,7 @@ part_detail_urls = [ url(r'^bom/?', views.PartDetail.as_view(template_name='part/bom.html'), name='part-bom'), url(r'^build/?', views.PartDetail.as_view(template_name='part/build.html'), name='part-build'), url(r'^used/?', views.PartDetail.as_view(template_name='part/used_in.html'), name='part-used-in'), + url(r'^order-prices/', views.PartPricingView.as_view(template_name='part/order_prices.html'), name='part-order-prices'), url(r'^manufacturers/?', views.PartDetail.as_view(template_name='part/manufacturer.html'), name='part-manufacturers'), url(r'^suppliers/?', views.PartDetail.as_view(template_name='part/supplier.html'), name='part-suppliers'), url(r'^orders/?', views.PartDetail.as_view(template_name='part/orders.html'), name='part-orders'), diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index a2986fe869..63352c613b 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -784,6 +784,81 @@ class PartDetail(InvenTreeRoleMixin, DetailView): return context +class PartPricingView(PartDetail): + """ Detail view for Part object + """ + context_object_name = 'part' + template_name = 'part/order_prices.html' + form_class = part_forms.PartPriceForm + + # Add in some extra context information based on query params + def get_context_data(self, **kwargs): + """ Provide extra context data to template """ + context = super().get_context_data(**kwargs) + + ctx = self.get_pricing(self.get_quantity()) + ctx['form'] = self.form_class(initial=self.get_initials()) + + context.update(ctx) + return context + + def get_quantity(self): + """ Return set quantity in decimal format """ + return Decimal(self.request.POST.get('quantity', 1)) + + def get_part(self): + return self.get_object() + + def get_pricing(self, quantity=1, currency=None): + """ returns context with pricing information """ + ctx = PartPricing.get_pricing(self, quantity, currency) + part = self.get_part() + # Stock history + if part.total_stock > 1: + ret = [] + stock = part.stock_entries(include_variants=False, in_stock=True) # .order_by('purchase_order__date') + stock = stock.prefetch_related('purchase_order', 'supplier_part') + + for stock_item in stock: + if None in [stock_item.purchase_price, stock_item.quantity]: + continue + + # convert purchase price to current currency - only one currency in the graph + price = convert_money(stock_item.purchase_price, inventree_settings.currency_code_default()) + line = { + 'price': price.amount, + 'qty': stock_item.quantity + } + # Supplier Part Name # TODO use in graph + if stock_item.supplier_part: + line['name'] = stock_item.supplier_part.pretty_name + + if stock_item.supplier_part.unit_pricing and price: + line['price_diff'] = price.amount - stock_item.supplier_part.unit_pricing + line['price_part'] = stock_item.supplier_part.unit_pricing + + # set date for graph labels + if stock_item.purchase_order: + line['date'] = stock_item.purchase_order.issue_date.strftime('%d.%m.%Y') + else: + line['date'] = stock_item.tracking_info.first().date.strftime('%d.%m.%Y') + ret.append(line) + + ctx['price_history'] = ret + + return ctx + + def get_initials(self): + """ returns initials for form """ + return {'quantity': self.get_quantity()} + + def post(self, request, *args, **kwargs): + self.object = self.get_object() + kwargs['object'] = self.object + ctx=self.get_context_data(**kwargs) + return self.get(request, context=ctx) + + class PartDetailFromIPN(PartDetail): slug_field = 'IPN' slug_url_kwarg = 'slug' @@ -2040,38 +2115,6 @@ class PartPricing(AjaxView): ctx['max_total_bom_price'] = max_bom_price ctx['max_unit_bom_price'] = max_unit_bom_price - # Stock history - if part_settings.part_show_graph and part.total_stock > 1: - ret = [] - stock = part.stock_entries(include_variants=False, in_stock=True) # .order_by('purchase_order__date') - stock = stock.prefetch_related('purchase_order', 'supplier_part') - - for stock_item in stock: - if None in [stock_item.purchase_price, stock_item.quantity]: - continue - - # convert purchase price to current currency - only one currency in the graph - price = convert_money(stock_item.purchase_price, inventree_settings.currency_code_default()) - line = { - 'price': price.amount, - 'qty': stock_item.quantity - } - # Supplier Part Name # TODO use in graph - if stock_item.supplier_part: - line['name'] = stock_item.supplier_part.pretty_name - - if stock_item.supplier_part.unit_pricing and price: - line['price_diff'] = price.amount - stock_item.supplier_part.unit_pricing - line['price_part'] = stock_item.supplier_part.unit_pricing - - # set date for graph labels - if stock_item.purchase_order: - line['date'] = stock_item.purchase_order.issue_date.strftime('%d.%m.%Y') - else: - line['date'] = stock_item.tracking_info.first().date.strftime('%d.%m.%Y') - ret.append(line) - - ctx['price_history'] = ret # part pricing information part_price = part.get_price(quantity) if part_price is not None: From 84d71d928fd7cea21efc3c0f8b0a2e835adbcade Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 01:14:15 +0200 Subject: [PATCH 24/68] removing new stuff in pricing modal --- .../part/templates/part/part_pricing.html | 128 +----------------- 1 file changed, 7 insertions(+), 121 deletions(-) diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index e552d40024..49e37fe0ad 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -1,7 +1,6 @@ {% extends "modal_form.html" %} {% load i18n %} -{% load inventree_extras %} {% block pre_form_content %} @@ -88,124 +87,11 @@
    {% endif %} - {% if min_unit_buy_price or min_unit_bom_price %} - {% else %} -
    - {% trans 'No pricing information is available for this part.' %} -
    - {% endif %} -
    +{% if min_unit_buy_price or min_unit_bom_price %} +{% else %} +
    + {% trans 'No pricing information is available for this part.' %} +
    +{% endif %} +
    {% endblock %} - -{% block post_form_content %} - {% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} - {% settings_value "PART_SHOW_GRAPH" as show_graph %} - - {% if show_graph and price_history %} -

    {% trans 'Stock Pricing' %}

    - {% if price_history|length > 1 %} -
    - -
    -
    - {% blocktrans %}All prices are converted from their original currencies to {{currency}} at the current conversion-rate.{% endblocktrans %} -
    - - {% else %} -
    - {% trans 'No stock pricing history is available for this part.' %} -
    - {% endif %} - {% endif %} -{% endblock %} \ No newline at end of file From 25681fb805bab21ceb6b10d9dc34685975398891 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 01:30:37 +0200 Subject: [PATCH 25/68] style --- InvenTree/part/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 63352c613b..6c4b7ed342 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -42,7 +42,6 @@ from common.models import InvenTreeSetting from company.models import SupplierPart import common.settings as inventree_settings -import part.settings as part_settings from . import forms as part_forms from .bom import MakeBomTemplate, BomUploadManager, ExportBom, IsValidBOMFormat @@ -855,7 +854,7 @@ class PartPricingView(PartDetail): def post(self, request, *args, **kwargs): self.object = self.get_object() kwargs['object'] = self.object - ctx=self.get_context_data(**kwargs) + ctx = self.get_context_data(**kwargs) return self.get(request, context=ctx) From d5b2bfedbc8c34afcef342a30469baa3b6721f2d Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 02:18:34 +0200 Subject: [PATCH 26/68] re-layouting tables --- .../part/templates/part/order_prices.html | 141 +++++++++--------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/InvenTree/part/templates/part/order_prices.html b/InvenTree/part/templates/part/order_prices.html index 5bbd5d22ef..299bc82468 100644 --- a/InvenTree/part/templates/part/order_prices.html +++ b/InvenTree/part/templates/part/order_prices.html @@ -1,6 +1,7 @@ {% extends "part/part_base.html" %} {% load static %} {% load i18n %} +{% load crispy_forms_tags %} {% load inventree_extras %} {% block menubar %} @@ -12,96 +13,94 @@ {% endblock %} {% block details %} +{% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} -
    - {% csrf_token %} - {% load crispy_forms_tags %} - {% crispy form %} -
    - +{% crispy form %} +
    +

    {% trans "Pricing ranges" %}

    + {% if part.supplier_count > 0 %} -

    {% trans 'Supplier Pricing' %}

    -
    {% if min_total_buy_price %} - - - - - - {% if quantity > 1 %} - - - - - - {% endif %} + + + + + + + {% if quantity > 1 %} + + + + + + + {% endif %} {% else %} - - - + + + {% endif %} -
    {% trans 'Unit Cost' %}Min: {% include "price.html" with price=min_unit_buy_price %}Max: {% include "price.html" with price=max_unit_buy_price %}
    {% trans 'Total Cost' %}Min: {% include "price.html" with price=min_total_buy_price %}Max: {% include "price.html" with price=max_total_buy_price %}
    {% trans 'Supplier Pricing' %}{% trans 'Unit Cost' %}Min: {% include "price.html" with price=min_unit_buy_price %}Max: {% include "price.html" with price=max_unit_buy_price %}
    {% trans 'Total Cost' %}Min: {% include "price.html" with price=min_total_buy_price %}Max: {% include "price.html" with price=max_total_buy_price %}
    - {% trans 'No supplier pricing available' %} -
    + {% trans 'No supplier pricing available' %} +
    {% endif %} {% if part.bom_count > 0 %} -

    {% trans 'BOM Pricing' %}

    - {% if min_total_bom_price %} - - - - - - {% if quantity > 1 %} - - - - - - {% endif %} - {% if part.has_complete_bom_pricing == False %} - - - - {% endif %} + + + + + + + {% if quantity > 1 %} + + + + + + + {% endif %} + {% if part.has_complete_bom_pricing == False %} + + + + {% endif %} {% else %} - - - + + + {% endif %} -
    {% trans 'Unit Cost' %}Min: {% include "price.html" with price=min_unit_bom_price %}Max: {% include "price.html" with price=max_unit_bom_price %}
    {% trans 'Total Cost' %}Min: {% include "price.html" with price=min_total_bom_price %}Max: {% include "price.html" with price=max_total_bom_price %}
    - {% trans 'Note: BOM pricing is incomplete for this part' %} -
    {% trans 'BOM Pricing' %}{% trans 'Unit Cost' %}Min: {% include "price.html" with price=min_unit_bom_price %}Max: {% include "price.html" with price=max_unit_bom_price %}
    {% trans 'Total Cost' %}Min: {% include "price.html" with price=min_total_bom_price %}Max: {% include "price.html" with price=max_total_bom_price %}
    + {% trans 'Note: BOM pricing is incomplete for this part' %} +
    - {% trans 'No BOM pricing available' %} -
    + {% trans 'No BOM pricing available' %} +
    {% endif %} {% if total_part_price %} -

    {% trans 'Sale Price' %}

    - - - - - - - - - -
    {% trans 'Unit Cost' %}{% include "price.html" with price=unit_part_price %}
    {% trans 'Total Cost' %}{% include "price.html" with price=total_part_price %}
    + + {% trans 'Sale Price' %} + {% trans 'Unit Cost' %} + {% include "price.html" with price=unit_part_price %} + + + + {% trans 'Total Cost' %} + {% include "price.html" with price=total_part_price %} + {% endif %} + - {% if min_unit_buy_price or min_unit_bom_price %} - {% else %} -
    - {% trans 'No pricing information is available for this part.' %} -
    - {% endif %} -
    +{% if min_unit_buy_price or min_unit_bom_price %} +{% else %} +
    + {% trans 'No pricing information is available for this part.' %} +
    +{% endif %} +
    {% if price_history %} +

    {% trans 'Stock Pricing' %}

    {% if price_history|length > 1 %}
    From fe8e03c666ad86d9d8f4cb60e97a61851618cf76 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 15:46:11 +0200 Subject: [PATCH 27/68] additional information for graph --- InvenTree/part/templates/part/order_prices.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/part/templates/part/order_prices.html b/InvenTree/part/templates/part/order_prices.html index 299bc82468..7d99d7a821 100644 --- a/InvenTree/part/templates/part/order_prices.html +++ b/InvenTree/part/templates/part/order_prices.html @@ -101,7 +101,8 @@ {% if price_history %}
    -

    {% trans 'Stock Pricing' %}

    +

    {% trans 'Stock Pricing' %}

    {% if price_history|length > 1 %}
    From 206bab137bb1f2892a4cab90055490da7714e717 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 17:39:32 +0200 Subject: [PATCH 28/68] refactor --- .../part/templates/part/order_prices.html | 46 ++----------------- InvenTree/templates/js/part.js | 43 +++++++++++++++++ 2 files changed, 47 insertions(+), 42 deletions(-) diff --git a/InvenTree/part/templates/part/order_prices.html b/InvenTree/part/templates/part/order_prices.html index 7d99d7a821..8efcf2994d 100644 --- a/InvenTree/part/templates/part/order_prices.html +++ b/InvenTree/part/templates/part/order_prices.html @@ -129,7 +129,7 @@ the part single price shown is the current price for that supplier part"> Date: Mon, 24 May 2021 19:14:38 +0200 Subject: [PATCH 29/68] added in randomColor for dynamic color gen --- InvenTree/InvenTree/static/script/randomColor.min.js | 1 + InvenTree/templates/base.html | 1 + 2 files changed, 2 insertions(+) create mode 100644 InvenTree/InvenTree/static/script/randomColor.min.js diff --git a/InvenTree/InvenTree/static/script/randomColor.min.js b/InvenTree/InvenTree/static/script/randomColor.min.js new file mode 100644 index 0000000000..218a0f65b0 --- /dev/null +++ b/InvenTree/InvenTree/static/script/randomColor.min.js @@ -0,0 +1 @@ +!function(r,e){var n;"object"==typeof exports?(n=e(),"object"==typeof module&&module&&module.exports&&(exports=module.exports=n),exports.randomColor=n):"function"==typeof define&&define.amd?define([],e):r.randomColor=e()}(this,function(){var o=null,s={};r("monochrome",null,[[0,0],[100,0]]),r("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),r("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),r("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),r("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),r("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),r("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),r("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]);var i=[],f=function(r){if(void 0!==(r=r||{}).seed&&null!==r.seed&&r.seed===parseInt(r.seed,10))o=r.seed;else if("string"==typeof r.seed)o=function(r){for(var e=0,n=0;n!==r.length&&!(e>=Number.MAX_SAFE_INTEGER);n++)e+=r.charCodeAt(n);return e}(r.seed);else{if(void 0!==r.seed&&null!==r.seed)throw new TypeError("The seed value must be an integer or string");o=null}var e,n;if(null===r.count||void 0===r.count)return function(r,e){switch(e.format){case"hsvArray":return r;case"hslArray":return d(r);case"hsl":var n=d(r);return"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)";case"hsla":var t=d(r),a=e.alpha||Math.random();return"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+a+")";case"rgbArray":return h(r);case"rgb":return"rgb("+h(r).join(", ")+")";case"rgba":var u=h(r),a=e.alpha||Math.random();return"rgba("+u.join(", ")+", "+a+")";default:return function(r){var e=h(r);function n(r){var e=r.toString(16);return 1==e.length?"0"+e:e}return"#"+n(e[0])+n(e[1])+n(e[2])}(r)}}([e=function(r){{if(0a.length;)o&&r.seed&&(r.seed+=1),a.push(f(r));return r.count=t,a};function l(r){for(var e in 334<=r&&r<=360&&(r-=360),s){var n=s[e];if(n.hueRange&&r>=n.hueRange[0]&&r<=n.hueRange[1])return s[e]}return"Color not found"}function c(r){if(null===o){var e=Math.random();return e+=.618033988749895,e%=1,Math.floor(r[0]+e*(r[1]+1-r[0]))}var n=r[1]||1,t=r[0]||0,a=(o=(9301*o+49297)%233280)/233280;return Math.floor(t+a*(n-t))}function r(r,e,n){var t=n[0][0],a=n[n.length-1][0],u=n[n.length-1][1],o=n[0][1];s[r]={hueRange:e,lowerBounds:n,saturationRange:[t,a],brightnessRange:[u,o]}}function h(r){var e=r[0];0===e&&(e=1),360===e&&(e=359),e/=360;var n=r[1]/100,t=r[2]/100,a=Math.floor(6*e),u=6*e-a,o=t*(1-n),s=t*(1-u*n),i=t*(1-(1-u)*n),f=256,l=256,c=256;switch(a){case 0:f=t,l=i,c=o;break;case 1:f=s,l=t,c=o;break;case 2:f=o,l=t,c=i;break;case 3:f=o,l=s,c=t;break;case 4:f=i,l=o,c=t;break;case 5:f=t,l=o,c=s}return[Math.floor(255*f),Math.floor(255*l),Math.floor(255*c)]}function g(r){r=3===(r=r.replace(/^#/,"")).length?r.replace(/(.)/g,"$1$1"):r;var e=parseInt(r.substr(0,2),16)/255,n=parseInt(r.substr(2,2),16)/255,t=parseInt(r.substr(4,2),16)/255,a=Math.max(e,n,t),u=a-Math.min(e,n,t),o=a?u/a:0;switch(a){case e:return[(n-t)/u%6*60||0,o,a];case n:return[60*((t-e)/u+2)||0,o,a];case t:return[60*((e-n)/u+4)||0,o,a]}}function d(r){var e=r[0],n=r[1]/100,t=r[2]/100,a=(2-n)*t;return[e,Math.round(n*t/(a<1?a:2-a)*1e4)/100,a/2*100]}return f}); \ No newline at end of file diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index d1dc1b2bfa..07b1a1d34b 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -140,6 +140,7 @@ + From b4c9edcd270a50658b1b6e989c5ab076bdba151f Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 24 May 2021 22:31:33 +0200 Subject: [PATCH 30/68] bom-price ranges as pie-chart --- .../part/templates/part/order_prices.html | 35 ++++++++++++++++--- InvenTree/part/views.py | 13 +++++++ InvenTree/templates/js/part.js | 16 ++++++++- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/InvenTree/part/templates/part/order_prices.html b/InvenTree/part/templates/part/order_prices.html index 8efcf2994d..6c5b2173bf 100644 --- a/InvenTree/part/templates/part/order_prices.html +++ b/InvenTree/part/templates/part/order_prices.html @@ -97,7 +97,16 @@ {% trans 'No pricing information is available for this part.' %}
    {% endif %} -
    +
    +{% if part.bom_count > 0 %} +
    +

    {% trans 'BOM Pricing' %}

    +
    + +
    +
    +{% endif %} + {% if price_history %}
    @@ -122,7 +131,6 @@ the part single price shown is the current price for that supplier part"> Date: Mon, 24 May 2021 22:45:00 +0200 Subject: [PATCH 31/68] style --- InvenTree/part/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index c237d6b249..24fc73fd3e 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -847,15 +847,15 @@ class PartPricingView(PartDetail): # BOM Information for Pie-Chart bom_items = [{'name': str(a.sub_part), 'price': a.sub_part.get_price_range(quantity), 'q': a.quantity} for a in part.bom_items.all()] - if [True for a in bom_items if len(set(a['price']))==2]: + if [True for a in bom_items if len(set(a['price'])) == 2]: ctx['bom_parts'] = [{ 'name': a['name'], - 'min_price': str((a['price'][0] * a['q'])/ quantity), + 'min_price': str((a['price'][0] * a['q']) / quantity), 'max_price': str((a['price'][1] * a['q']) / quantity)} for a in bom_items] ctx['bom_pie_min'] = True else: ctx['bom_parts'] = [{ - 'name':a['name'], + 'name': a['name'], 'price': str((a['price'][0] * a['q']) / quantity)} for a in bom_items] return ctx From c2fe5e08b4bb52277050309d98596f275b5ef040 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 27 May 2021 12:35:55 +1000 Subject: [PATCH 32/68] Expand possibilities for variant conversion - Ref get_conversion_options --- InvenTree/part/models.py | 53 +++++++++++++++++++ InvenTree/part/templates/part/part_base.html | 5 ++ .../stock/templates/stock/item_base.html | 2 +- InvenTree/stock/views.py | 2 +- 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 3c8e65bca7..7db998ab3d 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -1861,6 +1861,59 @@ class Part(MPTTModel): return self.get_descendants(include_self=False) + @property + def can_convert(self): + """ + Check if this Part can be "converted" to a different variant: + + It can be converted if: + + a) It has non-virtual variant parts underneath it + b) It has non-virtual template parts above it + c) It has non-virtual sibling variants + + """ + + return self.get_conversion_options().count() > 0 + + def get_conversion_options(self): + """ + Return options for converting this part to a "variant" within the same tree + + a) Variants underneath this one + b) Immediate parent + c) Siblings + """ + + parts = [] + + # Child parts + children = self.get_descendants(include_self=False) + + for child in children: + parts.append(child) + + # Immediate parent + if self.variant_of: + parts.append(self.variant_of) + + siblings = self.get_siblings(include_self=False) + + for sib in siblings: + parts.append(sib) + + filtered_parts = Part.objects.filter(pk__in=[part.pk for part in parts]) + + # Ensure this part is not in the queryset, somehow + filtered_parts = filtered_parts.exclude(pk=self.pk) + + filtered_parts = filtered_parts.filter( + active=True, + virtual=False, + ) + + return filtered_parts + def get_related_parts(self): """ Return list of tuples for all related parts: - first value is PartRelated object diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index f2f1f6557a..ec296d4174 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -102,6 +102,11 @@
    + {% if part.virtual %} +
    + {% trans "This is a virtual part" %} +
    + {% endif %} {% if part.variant_of %}
    {% object_link 'part-variants' part.variant_of.id part.variant_of.full_name as link %} diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index da770bab48..991bdee41c 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -139,7 +139,7 @@
    {% endif %} From 608547867290cbc29c47372580948b3cc15e5572 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 27 May 2021 16:34:37 +1000 Subject: [PATCH 37/68] Simplify settings view - Show various currency exchange rates - Button to "refresh now" --- InvenTree/InvenTree/forms.py | 34 ----- InvenTree/InvenTree/urls.py | 20 +-- InvenTree/InvenTree/views.py | 139 +++++++----------- .../InvenTree/settings/currencies.html | 59 ++++---- 4 files changed, 92 insertions(+), 160 deletions(-) diff --git a/InvenTree/InvenTree/forms.py b/InvenTree/InvenTree/forms.py index 488e982ddc..d843c1ddef 100644 --- a/InvenTree/InvenTree/forms.py +++ b/InvenTree/InvenTree/forms.py @@ -16,8 +16,6 @@ from crispy_forms.bootstrap import PrependedText, AppendedText, PrependedAppende from common.models import ColorTheme from part.models import PartCategory -from .exchange import InvenTreeManualExchangeBackend - class HelperForm(forms.ModelForm): """ Provides simple integration of crispy_forms extension. """ @@ -240,35 +238,3 @@ class SettingCategorySelectForm(forms.ModelForm): css_class='row', ), ) - - -class SettingExchangeRatesForm(forms.Form): - """ Form for displaying and setting currency exchange rates manually """ - - def __init__(self, *args, **kwargs): - - super().__init__(*args, **kwargs) - - exchange_rate_backend = InvenTreeManualExchangeBackend() - - # Update default currency (in case it has changed) - exchange_rate_backend.update_default_currency() - - for currency in exchange_rate_backend.currencies: - if currency != exchange_rate_backend.base_currency: - # Set field name - field_name = currency - # Set field input box - self.fields[field_name] = forms.CharField( - label=field_name, - required=False, - widget=forms.NumberInput(attrs={ - 'name': field_name, - 'class': 'numberinput', - 'style': 'width: 200px;', - 'type': 'number', - 'min': '0', - 'step': 'any', - 'value': 0, - }) - ) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 88ee554203..bce493fb23 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -39,6 +39,7 @@ from rest_framework.documentation import include_docs_urls from .views import IndexView, SearchView, DatabaseStatsView from .views import SettingsView, EditUserView, SetPasswordView +from .views import CurrencySettingsView, CurrencyRefreshView from .views import AppearanceSelectView, SettingCategorySelectView from .views import DynamicJsView @@ -82,15 +83,16 @@ settings_urls = [ url(r'^appearance/?', AppearanceSelectView.as_view(), name='settings-appearance'), url(r'^i18n/?', include('django.conf.urls.i18n')), - url(r'^global/?', SettingsView.as_view(template_name='InvenTree/settings/global.html'), name='settings-global'), - url(r'^report/?', SettingsView.as_view(template_name='InvenTree/settings/report.html'), name='settings-report'), - url(r'^category/?', SettingCategorySelectView.as_view(), name='settings-category'), - url(r'^part/?', SettingsView.as_view(template_name='InvenTree/settings/part.html'), name='settings-part'), - url(r'^stock/?', SettingsView.as_view(template_name='InvenTree/settings/stock.html'), name='settings-stock'), - url(r'^build/?', SettingsView.as_view(template_name='InvenTree/settings/build.html'), name='settings-build'), - url(r'^purchase-order/?', SettingsView.as_view(template_name='InvenTree/settings/po.html'), name='settings-po'), - url(r'^sales-order/?', SettingsView.as_view(template_name='InvenTree/settings/so.html'), name='settings-so'), - url(r'^currencies/?', SettingsView.as_view(template_name='InvenTree/settings/currencies.html'), name='settings-currencies'), + url(r'^global/', SettingsView.as_view(template_name='InvenTree/settings/global.html'), name='settings-global'), + url(r'^report/', SettingsView.as_view(template_name='InvenTree/settings/report.html'), name='settings-report'), + url(r'^category/', SettingCategorySelectView.as_view(), name='settings-category'), + url(r'^part/', SettingsView.as_view(template_name='InvenTree/settings/part.html'), name='settings-part'), + url(r'^stock/', SettingsView.as_view(template_name='InvenTree/settings/stock.html'), name='settings-stock'), + url(r'^build/', SettingsView.as_view(template_name='InvenTree/settings/build.html'), name='settings-build'), + url(r'^purchase-order/', SettingsView.as_view(template_name='InvenTree/settings/po.html'), name='settings-po'), + url(r'^sales-order/', SettingsView.as_view(template_name='InvenTree/settings/so.html'), name='settings-so'), + url(r'^currencies/', CurrencySettingsView.as_view(), name='settings-currencies'), + url(r'^currencies-refresh/', CurrencyRefreshView.as_view(), name='settings-currencies-refresh'), url(r'^(?P\d+)/edit/', SettingEdit.as_view(), name='setting-edit'), diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index a18845bf02..4189def492 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -12,12 +12,15 @@ from django.utils.translation import gettext_lazy as _ from django.template.loader import render_to_string from django.http import JsonResponse, HttpResponseRedirect from django.urls import reverse_lazy +from django.conf import settings from django.contrib.auth.mixins import PermissionRequiredMixin from django.views import View from django.views.generic import ListView, DetailView, CreateView, FormView, DeleteView, UpdateView -from django.views.generic.base import TemplateView +from django.views.generic.base import RedirectView, TemplateView + +from djmoney.contrib.exchange.models import ExchangeBackend, Rate from part.models import Part, PartCategory from stock.models import StockLocation, StockItem @@ -25,11 +28,11 @@ from common.models import InvenTreeSetting, ColorTheme from users.models import check_user_role, RuleSet from InvenTree.helpers import clean_decimal +import InvenTree.tasks + from .forms import DeleteForm, EditUserForm, SetPasswordForm from .forms import ColorThemeSelectForm, SettingCategorySelectForm -from .forms import SettingExchangeRatesForm from .helpers import str2bool -from .exchange import get_exchange_rate_backend from rest_framework import views @@ -772,6 +775,50 @@ class SettingsView(TemplateView): return ctx + +class CurrencyRefreshView(RedirectView): + + url = reverse_lazy("settings-currencies") + + def post(self, request, *args, **kwargs): + """ + On a POST request we will attempt to refresh the exchange rates + """ + + print("POST!") + + # Will block for a little bit + InvenTree.tasks.update_exchange_rates() + + return self.get(request, *args, **kwargs) + + +class CurrencySettingsView(TemplateView): + """ + View for configuring currency settings + """ + + template_name = "InvenTree/settings/currencies.html" + + def get_context_data(self, **kwargs): + + ctx = super().get_context_data(**kwargs).copy() + + ctx['settings'] = InvenTreeSetting.objects.all().order_by('key') + ctx["base_currency"] = settings.BASE_CURRENCY + ctx["currencies"] = settings.CURRENCIES + + ctx["rates"] = Rate.objects.filter(backend="InvenTreeExchange") + + # When were the rates last updated? + try: + backend = ExchangeBackend.objects.get(name='InvenTreeExchange') + ctx["rates_updated"] = backend.last_update + except: + ctx["rates_updated"] = None + + return ctx + class AppearanceSelectView(FormView): """ View for selecting a color theme """ @@ -911,89 +958,3 @@ class DatabaseStatsView(AjaxView): """ return ctx - - -class CurrencySettingsView(FormView): - - form_class = SettingExchangeRatesForm - template_name = 'InvenTree/settings/currencies.html' - success_url = reverse_lazy('settings-currencies') - - exchange_rate_backend = None - - def get_exchange_rate_backend(self): - - if not self.exchange_rate_backend: - self.exchange_rate_backend = get_exchange_rate_backend() - - return self.exchange_rate_backend - - def get_context_data(self, **kwargs): - - context = super().get_context_data(**kwargs) - - # Set default API result - if 'api_rates_success' not in context: - context['default_currency'] = True - else: - # Update form - context['form'] = self.get_form() - - # Get exchange rate backend - exchange_rate_backend = self.get_exchange_rate_backend() - - context['default_currency'] = exchange_rate_backend.base_currency - - context['custom_rates'] = exchange_rate_backend.custom_rates - - context['exchange_backend'] = exchange_rate_backend.name - - return context - - def get_form(self): - - form = super().get_form() - - # Get exchange rate backend - exchange_rate_backend = self.get_exchange_rate_backend() - - # Get stored exchange rates - stored_rates = exchange_rate_backend.get_stored_rates() - - for field in form.fields: - if not exchange_rate_backend.custom_rates: - # Disable all the fields - form.fields[field].disabled = True - form.fields[field].initial = clean_decimal(stored_rates.get(field, 0)) - - return form - - def post(self, request, *args, **kwargs): - - form = self.get_form() - - # Get exchange rate backend - exchange_rate_backend = self.get_exchange_rate_backend() - - if not exchange_rate_backend.custom_rates: - # Refresh rate from Fixer.IO API - exchange_rate_backend.update_rates(base_currency=exchange_rate_backend.base_currency) - # Check if rates have been updated - if not exchange_rate_backend.get_stored_rates(): - # Update context - context = {'api_rates_success': False} - # Return view with updated context - return self.render_to_response(self.get_context_data(form=form, **context)) - else: - # Update rates from form - manual_rates = {} - - if form.is_valid(): - for field, value in form.cleaned_data.items(): - manual_rates[field] = clean_decimal(value) - - exchange_rate_backend.update_rates(base_currency=exchange_rate_backend.base_currency, **{'rates': manual_rates}) - else: - return self.form_invalid(form) - - return self.form_valid(form) diff --git a/InvenTree/templates/InvenTree/settings/currencies.html b/InvenTree/templates/InvenTree/settings/currencies.html index dd47bc6cdd..78598236f9 100644 --- a/InvenTree/templates/InvenTree/settings/currencies.html +++ b/InvenTree/templates/InvenTree/settings/currencies.html @@ -13,40 +13,43 @@ {% block settings %} - {% include "InvenTree/settings/header.html" %} - {% include "InvenTree/settings/setting.html" with key="INVENTREE_DEFAULT_CURRENCY" icon="fa-dollar-sign" %} - {% include "InvenTree/settings/setting.html" with key="CUSTOM_EXCHANGE_RATES" icon="fa-edit" %} + + + + + + + + {% for rate in rates %} + + + + + {% endfor %} + + + +
    {% trans "Base Currency" %}{{ base_currency }}
    {% trans "Exchange Rates" %}
    {{ rate.currency }}{{ rate.value }}
    + {% trans "Last Update" %} + + {% if rates_updated %} + {{ rates_updated }} + {% else %} + {% trans "Never" %} + {% endif %} +
    +
    + {% csrf_token %} + +
    +
    +
    -
    -
    -

    {% blocktrans with cur=default_currency %}Exchange Rates - Convert to {{cur}}{% endblocktrans %}

    -
    -
    - -
    -
    - {% csrf_token %} - {% load crispy_forms_tags %} - {% crispy form %} - {% if custom_rates is False %} - - {% else %} - - {% endif %} -
    -
    - {% endblock %} {% block js_ready %} {{ block.super }} - -{% if api_rates_success is False %} - var alert_msg = {% blocktrans %}"Failed to refresh exchange rates" {% endblocktrans %}; - showAlertOrCache("alert-danger", alert_msg, null, 5000); -{% endif %} - {% endblock %} \ No newline at end of file From 4520bb74478258b0842bb2af69658cbb99d6884b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 27 May 2021 16:36:26 +1000 Subject: [PATCH 38/68] PEP style fixes --- InvenTree/InvenTree/exchange.py | 2 +- InvenTree/InvenTree/views.py | 3 +-- InvenTree/common/models.py | 1 - InvenTree/common/test_views.py | 11 +++-------- InvenTree/company/tests.py | 13 ------------- 5 files changed, 5 insertions(+), 25 deletions(-) diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py index dfbfff872c..0695e69f48 100644 --- a/InvenTree/InvenTree/exchange.py +++ b/InvenTree/InvenTree/exchange.py @@ -7,7 +7,7 @@ class InvenTreeExchange(SimpleExchangeBackend): """ Backend for automatically updating currency exchange rates. - Uses the exchangerate.host service API + Uses the exchangerate.host service API """ name = "InvenTreeExchange" diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 4189def492..4ac90bd722 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -26,7 +26,6 @@ from part.models import Part, PartCategory from stock.models import StockLocation, StockItem from common.models import InvenTreeSetting, ColorTheme from users.models import check_user_role, RuleSet -from InvenTree.helpers import clean_decimal import InvenTree.tasks @@ -775,7 +774,6 @@ class SettingsView(TemplateView): return ctx - class CurrencyRefreshView(RedirectView): url = reverse_lazy("settings-currencies") @@ -819,6 +817,7 @@ class CurrencySettingsView(TemplateView): return ctx + class AppearanceSelectView(FormView): """ View for selecting a color theme """ diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 6cfe5915e0..236e48770f 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -14,7 +14,6 @@ from django.db import models, transaction from django.db.utils import IntegrityError, OperationalError from django.conf import settings -import djmoney.settings from djmoney.models.fields import MoneyField from djmoney.contrib.exchange.models import convert_money from djmoney.contrib.exchange.exceptions import MissingRate diff --git a/InvenTree/common/test_views.py b/InvenTree/common/test_views.py index 8dc5830108..56a244ba0c 100644 --- a/InvenTree/common/test_views.py +++ b/InvenTree/common/test_views.py @@ -98,20 +98,15 @@ class SettingsViewTest(TestCase): Tests for a setting which has choices """ - setting = InvenTreeSetting.get_setting_object('INVENTREE_DEFAULT_CURRENCY') + setting = InvenTreeSetting.get_setting_object('PURCHASEORDER_REFERENCE_PREFIX') # Default value! - self.assertEqual(setting.value, 'USD') + self.assertEqual(setting.value, 'PO') url = self.get_url(setting.pk) # Try posting an invalid currency option - data, errors = self.post(url, {'value': 'XPQaaa'}, valid=False) - - self.assertIsNotNone(errors.get('value'), None) - - # Try posting a valid currency option - data, errors = self.post(url, {'value': 'AUD'}, valid=True) + data, errors = self.post(url, {'value': 'Purchase Order'}, valid=True) def test_binary_values(self): """ diff --git a/InvenTree/company/tests.py b/InvenTree/company/tests.py index 2c6e722440..b1e05efe14 100644 --- a/InvenTree/company/tests.py +++ b/InvenTree/company/tests.py @@ -11,9 +11,6 @@ from .models import Company, Contact, ManufacturerPart, SupplierPart from .models import rename_company_image from part.models import Part -from InvenTree.exchange import InvenTreeManualExchangeBackend -from djmoney.contrib.exchange.models import Rate - class CompanySimpleTest(TestCase): @@ -40,16 +37,6 @@ class CompanySimpleTest(TestCase): self.acme0002 = SupplierPart.objects.get(SKU='ACME0002') self.zerglphs = SupplierPart.objects.get(SKU='ZERGLPHS') self.zergm312 = SupplierPart.objects.get(SKU='ZERGM312') - - # Exchange rate backend - backend = InvenTreeManualExchangeBackend() - backend.update_rates(base_currency=backend.base_currency) - - Rate.objects.create( - currency='AUD', - value='1.35', - backend_id=backend.name, - ) def test_company_model(self): c = Company.objects.get(name='ABC Co.') From c71f4ed04577ac5450be7993e322db74bf054c89 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 27 May 2021 16:48:13 +1000 Subject: [PATCH 39/68] Add currency exchange unit tests --- InvenTree/InvenTree/tests.py | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/InvenTree/InvenTree/tests.py b/InvenTree/InvenTree/tests.py index d65829cf8e..b7e5b98c1b 100644 --- a/InvenTree/InvenTree/tests.py +++ b/InvenTree/InvenTree/tests.py @@ -5,6 +5,12 @@ from django.test import TestCase import django.core.exceptions as django_exceptions from django.core.exceptions import ValidationError +from django.conf import settings + +from djmoney.money import Money +from djmoney.contrib.exchange.models import Rate, convert_money +from djmoney.contrib.exchange.exceptions import MissingRate + from .validators import validate_overage, validate_part_name from . import helpers from . import version @@ -13,6 +19,8 @@ from mptt.exceptions import InvalidMove from decimal import Decimal +import InvenTree.tasks + from stock.models import StockLocation @@ -308,3 +316,46 @@ class TestVersionNumber(TestCase): self.assertTrue(v_c > v_b) self.assertTrue(v_d > v_c) self.assertTrue(v_d > v_a) + + +class CurrencyTests(TestCase): + """ + Unit tests for currency / exchange rate functionality + """ + + def test_rates(self): + + # Initially, there will not be any exchange rate information + rates = Rate.objects.all() + + self.assertEqual(rates.count(), 0) + + # Without rate information, we cannot convert anything... + with self.assertRaises(MissingRate): + convert_money(Money(100, 'USD'), 'AUD') + + with self.assertRaises(MissingRate): + convert_money(Money(100, 'AUD'), 'USD') + + currencies = settings.CURRENCIES + + InvenTree.tasks.update_exchange_rates() + + rates = Rate.objects.all() + + self.assertEqual(rates.count(), len(currencies)) + + # Now that we have some exchange rate information, we can perform conversions + + # Forwards + convert_money(Money(100, 'USD'), 'AUD') + + # Backwards + convert_money(Money(100, 'AUD'), 'USD') + + # Convert between non base currencies + convert_money(Money(100, 'CAD'), 'NZD') + + # Convert to a symbol which is not covered + with self.assertRaises(MissingRate): + convert_money(Money(100, 'GBP'), 'ZWL') From 52fc698b51c8b87a02cecb5c1cf613786cf31e03 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 May 2021 12:07:53 +1000 Subject: [PATCH 40/68] Remove debug message --- InvenTree/InvenTree/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 4ac90bd722..108908c571 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -775,6 +775,9 @@ class SettingsView(TemplateView): class CurrencyRefreshView(RedirectView): + """ + POST endpoint to refresh / update exchange rates + """ url = reverse_lazy("settings-currencies") @@ -783,8 +786,6 @@ class CurrencyRefreshView(RedirectView): On a POST request we will attempt to refresh the exchange rates """ - print("POST!") - # Will block for a little bit InvenTree.tasks.update_exchange_rates() From 4ddeab3330fa2af12254a56d02aa17c79cac929a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 May 2021 12:44:39 +1000 Subject: [PATCH 41/68] Update exchange rates when launching the server - Ensures that the exchange rates don't get messed up if the base currency is changed! --- InvenTree/InvenTree/apps.py | 48 ++++++++++++++++++++++++++++++++++++ InvenTree/InvenTree/tasks.py | 4 +++ 2 files changed, 52 insertions(+) diff --git a/InvenTree/InvenTree/apps.py b/InvenTree/InvenTree/apps.py index aa60058dcf..465dc2087b 100644 --- a/InvenTree/InvenTree/apps.py +++ b/InvenTree/InvenTree/apps.py @@ -4,6 +4,7 @@ import logging from django.apps import AppConfig from django.core.exceptions import AppRegistryNotReady +from django.conf import settings from InvenTree.ready import canAppAccessDatabase import InvenTree.tasks @@ -19,6 +20,7 @@ class InvenTreeConfig(AppConfig): if canAppAccessDatabase(): self.start_background_tasks() + self.update_exchange_rates() def start_background_tasks(self): @@ -49,3 +51,49 @@ class InvenTreeConfig(AppConfig): 'InvenTree.tasks.update_exchange_rates', schedule_type=Schedule.DAILY, ) + + def update_exchange_rates(self): + """ + Update exchange rates each time the server is started, *if*: + + a) Have not been updated recently (one day or less) + b) The base exchange rate has been altered + """ + + try: + from djmoney.contrib.exchange.models import ExchangeBackend + from datetime import datetime, timedelta + from InvenTree.tasks import update_exchange_rates + except AppRegistryNotReady: + pass + + base_currency = settings.BASE_CURRENCY + + update = False + + try: + backend = ExchangeBackend.objects.get(name='InvenTreeExchange') + + last_update = backend.last_update + + if last_update is not None: + delta = datetime.now().date() - last_update.date() + if delta > timedelta(days=1): + print(f"Last update was {last_update}") + update = True + else: + # Never been updated + print("Exchange backend has never been updated") + update = True + + # Backend currency has changed? + if not base_currency == backend.base_currency: + print(f"Base currency changed from {backend.base_currency} to {base_currency}") + update = True + + except (ExchangeBackend.DoesNotExist): + print("Exchange backend not found - updating") + update = True + + if update: + update_exchange_rates() diff --git a/InvenTree/InvenTree/tasks.py b/InvenTree/InvenTree/tasks.py index 9a71d5d84c..92c58c24a8 100644 --- a/InvenTree/InvenTree/tasks.py +++ b/InvenTree/InvenTree/tasks.py @@ -168,6 +168,7 @@ def update_exchange_rates(): try: from InvenTree.exchange import InvenTreeExchange + from djmoney.contrib.exchange.models import Rate from django.conf import settings except AppRegistryNotReady: # Apps not yet loaded! @@ -182,6 +183,9 @@ def update_exchange_rates(): backend.update_rates(base_currency=base) + # Remove any exchange rates which are not in the provided currencies + Rate.objects.filter(backend="InvenTreeExchange").exclude(currency__in=settings.CURRENCIES).delete() + def send_email(subject, body, recipients, from_email=None): """ From 09782353703f6866d26573b5eade9821c7f49ae1 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 May 2021 12:49:50 +1000 Subject: [PATCH 42/68] Fix? --- InvenTree/InvenTree/tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InvenTree/InvenTree/tasks.py b/InvenTree/InvenTree/tasks.py index 92c58c24a8..994a344cc9 100644 --- a/InvenTree/InvenTree/tasks.py +++ b/InvenTree/InvenTree/tasks.py @@ -173,6 +173,9 @@ def update_exchange_rates(): except AppRegistryNotReady: # Apps not yet loaded! return + except: + # Other error? + return backend = InvenTreeExchange() print(f"Updating exchange rates from {backend.url}") From 7832ccccc298911dcabe37e823c67491df9bc052 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 May 2021 12:54:55 +1000 Subject: [PATCH 43/68] Check if database tables are ready --- InvenTree/InvenTree/tasks.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/tasks.py b/InvenTree/InvenTree/tasks.py index 994a344cc9..d45df99152 100644 --- a/InvenTree/InvenTree/tasks.py +++ b/InvenTree/InvenTree/tasks.py @@ -168,7 +168,7 @@ def update_exchange_rates(): try: from InvenTree.exchange import InvenTreeExchange - from djmoney.contrib.exchange.models import Rate + from djmoney.contrib.exchange.models import ExchangeBackend, Rate from django.conf import settings except AppRegistryNotReady: # Apps not yet loaded! @@ -177,6 +177,16 @@ def update_exchange_rates(): # Other error? return + # Test to see if the database is ready yet + try: + backend = ExchangeBackend.objects.get(name='InvenTreeExchange') + except ExchangeBackend.DoesNotExist: + pass + except: + # Some other error + print("Database not ready") + return + backend = InvenTreeExchange() print(f"Updating exchange rates from {backend.url}") From be6e2aa2769c1d21f30c7b1e9efc5da671380f36 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 May 2021 13:02:34 +1000 Subject: [PATCH 44/68] Better exception handling --- InvenTree/InvenTree/apps.py | 10 ++++++++-- InvenTree/InvenTree/ready.py | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/apps.py b/InvenTree/InvenTree/apps.py index 465dc2087b..aeddb714a0 100644 --- a/InvenTree/InvenTree/apps.py +++ b/InvenTree/InvenTree/apps.py @@ -6,7 +6,7 @@ from django.apps import AppConfig from django.core.exceptions import AppRegistryNotReady from django.conf import settings -from InvenTree.ready import canAppAccessDatabase +from InvenTree.ready import isInTestMode, canAppAccessDatabase import InvenTree.tasks @@ -20,7 +20,9 @@ class InvenTreeConfig(AppConfig): if canAppAccessDatabase(): self.start_background_tasks() - self.update_exchange_rates() + + if not isInTestMode(): + self.update_exchange_rates() def start_background_tasks(self): @@ -95,5 +97,9 @@ class InvenTreeConfig(AppConfig): print("Exchange backend not found - updating") update = True + except: + # Some other error - potentially the tables are not ready yet + return + if update: update_exchange_rates() diff --git a/InvenTree/InvenTree/ready.py b/InvenTree/InvenTree/ready.py index aa31fac947..5a4f1e9576 100644 --- a/InvenTree/InvenTree/ready.py +++ b/InvenTree/InvenTree/ready.py @@ -1,6 +1,17 @@ import sys +def isInTestMode(): + """ + Returns True if the database is in testing mode + """ + + if 'test' in sys.argv: + return True + + return False + + def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. From b7163124385044508e89fa4fd078f8fabeaa8f99 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 May 2021 13:24:18 +1000 Subject: [PATCH 45/68] Ignore actions for l10 branches --- .github/workflows/coverage.yaml | 9 ++++++++- .github/workflows/mysql.yaml | 9 ++++++++- .github/workflows/postgresql.yaml | 9 ++++++++- .github/workflows/style.yaml | 9 ++++++++- .github/workflows/translations.yml | 1 - 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index ad5f7a841e..6d0334b804 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -2,7 +2,14 @@ name: SQLite -on: ["push", "pull_request"] +on: + push: + branches-ignore: + - l10* + + pull_request: + branches-ignore: + - l10* jobs: diff --git a/.github/workflows/mysql.yaml b/.github/workflows/mysql.yaml index 5bafe56253..f0eb0efd7f 100644 --- a/.github/workflows/mysql.yaml +++ b/.github/workflows/mysql.yaml @@ -2,7 +2,14 @@ name: MySQL -on: ["push", "pull_request"] +on: + push: + branches-ignore: + - l10* + + pull_request: + branches-ignore: + - l10* jobs: diff --git a/.github/workflows/postgresql.yaml b/.github/workflows/postgresql.yaml index 3481895d85..9a56382c4e 100644 --- a/.github/workflows/postgresql.yaml +++ b/.github/workflows/postgresql.yaml @@ -2,7 +2,14 @@ name: PostgreSQL -on: ["push", "pull_request"] +on: + push: + branches-ignore: + - l10* + + pull_request: + branches-ignore: + - l10* jobs: diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 31da3ec61a..df52de1dcb 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -1,6 +1,13 @@ name: Style Checks -on: ["push", "pull_request"] +on: + push: + branches-ignore: + - l10* + + pull_request: + branches-ignore: + - l10* jobs: style: diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index a3950b2002..24106c028e 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -5,7 +5,6 @@ on: branches: - master - jobs: build: From 0995ccee672835363aeadfff0a11db2b850ae372 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 29 May 2021 17:33:07 +1000 Subject: [PATCH 46/68] L10 merge master (#1617) * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * Adds a commit message * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * updated translation base * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * updated translation base * New Crowdin updates (#1551) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * New Crowdin updates (#1552) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * New Crowdin updates (#1568) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * New Crowdin updates (#1570) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * updated translation base * Trans merge fix (#1599) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * New Crowdin updates (#1597) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * updated translation base * Update github actions * L10 merge fix (#1614) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Update github actions (cherry picked from commit d9bbebddb0629af5690ad5a9ea408fafb8904335) * New Crowdin updates (#1603) * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Fix: New translations django.po from Crowdin * Update github actions (cherry picked from commit d9bbebddb0629af5690ad5a9ea408fafb8904335) * updated translation base Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- InvenTree/locale/de/LC_MESSAGES/django.po | 1189 +++++++++++---------- InvenTree/locale/en/LC_MESSAGES/django.po | 1147 +++++++++++--------- InvenTree/locale/es/LC_MESSAGES/django.po | 1158 +++++++++++--------- InvenTree/locale/fr/LC_MESSAGES/django.po | 1156 +++++++++++--------- InvenTree/locale/it/LC_MESSAGES/django.po | 1156 +++++++++++--------- InvenTree/locale/ja/LC_MESSAGES/django.po | 1156 +++++++++++--------- InvenTree/locale/pl/LC_MESSAGES/django.po | 1169 +++++++++++--------- InvenTree/locale/ru/LC_MESSAGES/django.po | 1156 +++++++++++--------- InvenTree/locale/tr/LC_MESSAGES/django.po | 1156 +++++++++++--------- InvenTree/locale/zh/LC_MESSAGES/django.po | 1156 +++++++++++--------- 10 files changed, 6274 insertions(+), 5325 deletions(-) diff --git a/InvenTree/locale/de/LC_MESSAGES/django.po b/InvenTree/locale/de/LC_MESSAGES/django.po index 300a639a69..7fdc9f1943 100644 --- a/InvenTree/locale/de/LC_MESSAGES/django.po +++ b/InvenTree/locale/de/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: German\n" "Language: de_DE\n" @@ -33,42 +33,42 @@ msgstr "Keine passende Aktion gefunden" msgid "Enter date" msgstr "Datum eingeben" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "Bestätigen" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "Löschung bestätigen" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "Löschung von Position bestätigen" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "Passwort eingeben" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "Neues Passwort eingeben" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "Passwort wiederholen" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "Neues Passwort bestätigen" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "Thema anwenden" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "Kategorie auswählen" @@ -122,9 +122,9 @@ msgstr "Kommentar" msgid "File comment" msgstr "Datei-Kommentar" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "Benutzer" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "Hochladedatum" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "Beschreibung (optional)" msgid "parent" msgstr "Eltern" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "Englisch" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "Französisch" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "Deutsch" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "Polnisch" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "Türkisch" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "Zurückgegeben" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "Versendet" @@ -372,27 +372,27 @@ msgstr "Überschuss darf 100% nicht überschreiten" msgid "Overage must be an integer value or a percentage" msgstr "Überschuss muss eine Ganzzahl oder ein Prozentwert sein" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "Element löschen" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "Häkchen setzen um Löschung von Objekt zu bestätigen" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "Benutzerinformationen bearbeiten" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "Passwort eingeben" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "Passwörter stimmen nicht überein" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "Systeminformationen" @@ -444,10 +444,10 @@ msgstr "Bauauftrags-Referenz" msgid "Order target date" msgstr "geplantes Bestelldatum" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "Zieldatum für Bauauftrag-Fertigstellung." #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "Zieldatum für Bauauftrag-Fertigstellung." #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "Anzahl" @@ -528,11 +530,11 @@ msgstr "Bauauftrag als vollständig markieren" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "Lagerort" @@ -540,14 +542,14 @@ msgstr "Lagerort" msgid "Location of completed parts" msgstr "Lagerort der Endprodukte" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "Status" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "Menge der BestandsObjekte für Zuordnung auswählen" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "Bauauftrag" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "Bauaufträge" @@ -602,7 +604,7 @@ msgstr "Bauauftragsreferenz" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "Referenz" msgid "Brief description of the build" msgstr "Kurze Beschreibung des Baus" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "Eltern-Bauauftrag" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "Bauauftrag, zu dem dieser Bauauftrag zugwiesen ist" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "Bauauftrag, zu dem dieser Bauauftrag zugwiesen ist" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "Teil" @@ -691,7 +693,7 @@ msgstr "Fertiggestellte Teile" msgid "Number of stock items which have been completed" msgstr "Anzahl der fertigen BestandsObjekte" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "Bauauftrags-Status" @@ -732,10 +734,10 @@ msgstr "Aufgegeben von" msgid "User who issued this build order" msgstr "Nutzer der diesen Bauauftrag erstellt hat" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "Verantwortlicher Benutzer" @@ -749,8 +751,8 @@ msgstr "Nutzer der für diesen Bauauftrag zuständig ist" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "Externer Link" @@ -768,12 +770,12 @@ msgstr "Link zu einer externen URL" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "Notizen" @@ -823,7 +825,7 @@ msgstr "Reserviermenge muss größer null sein" msgid "Quantity must be 1 for serialized stock" msgstr "Anzahl muss 1 für Objekte mit Seriennummer sein" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "Bauauftrag starten um Teile zuzuweisen" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "BestandsObjekt" @@ -913,7 +915,7 @@ msgstr "Dieser Bauauftrag hat keine zugeordneten Stücklisten-Einträge" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "Seriennummer" @@ -921,8 +923,8 @@ msgstr "Seriennummer" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "Anhänge" @@ -943,119 +945,119 @@ msgstr "Keine BestandsObjekte gefunden, die diesem Endprodukt automatisch zugewi msgid "Stock items will have to be manually allocated" msgstr "BestandsObjekte müssen manuell zugewiesen werden" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "Dieser Bauauftrag ist dem Auftrag %(link)s zugeordnet" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "Dieser Bauauftrag ist dem Bauauftrag %(link)s untergeordnet" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "Bauauftrag ist bereit abgeschlossen zu werden" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "Bauauftrag kann nicht abgeschlossen werden, da es noch ausstehende Endprodukte gibt" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "Benötigte Teil-Anzahl wurde noch nicht fertiggestellt" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "Lagerbestand wurde Bauauftrag noch nicht vollständig zugewiesen" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "Admin" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "Überfällig" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "Aktionen drucken" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "Bauauftrag drucken" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "Bauauftrag fertigstellen" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "Bau-Auftrag Aktionen" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "Bauauftrag bearbeiten" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "Bauauftrag abbrechen" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "Bau-Status" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "Bauauftrag war fällig am %(target)s" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "Fortschritt" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "Auftrag" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "Aufgegeben von" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "Unfertige Endprodukte" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "Bauauftrag kann nicht abgeschlossen werden, da es noch unvollständige Endprodukte gibt" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "Ziel-Lagerort nicht angegeben" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "Losnummer" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "Erstellt" @@ -1282,8 +1284,8 @@ msgstr "Bermerkungen bearbeiten" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "Speichern" @@ -1429,7 +1431,7 @@ msgstr "Bauobjekt aktualisiert" msgid "Add Build Order Attachment" msgstr "Bauauftrags-Anhang hinzufügen" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "Anhang hinzugefügt" @@ -1466,368 +1468,360 @@ msgstr "Fehler beim Lesen der Datei (falsche Größe)" msgid "Error reading file (data could be corrupted)" msgstr "Fehler beim Lesen der Datei (Daten könnten beschädigt sein)" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "Datei" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "Datei zum Hochladen auswählen" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "{name.title()} Datei" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "{name} Datei zum Hochladen auswählen" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "InvenTree Instanzname" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "Kurze Beschreibung der Instanz" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "Name der Instanz verwenden" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "Den Namen der Instanz in der Titelleiste verwenden" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "Firmenname" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "interner Firmenname" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "Basis-URL" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "Basis-URL für dieses Instanz" -#: common/models.py:84 -msgid "Default Currency" -msgstr "Standard-Währung" - #: common/models.py:85 -msgid "Default currency" -msgstr "Standard-Währung" - -#: common/models.py:91 msgid "Download from URL" msgstr "Von URL herunterladen" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "Herunterladen von externen Bildern und Dateien von URLs erlaubt" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "Bacode-Feature verwenden" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "Barcode-Scanner Unterstützung" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "IPN Regex" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "RegEx Muster für die Zuordnung von Teil-IPN" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "Mehrere Artikel mit gleicher IPN erlaubt" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "Mehrere Artikel mit gleicher IPN erlaubt" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "Ändern von IPN erlaubt" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "Ändern der IPN während des Bearbeiten eines Teils erlaubt" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "Teil-Stückliste kopieren" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "Stückliste von Teil kopieren wenn das Teil dupliziert wird " -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "Teil-Parameter kopieren" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "Parameter-Daten für dieses Teil kopieren wenn das Teil dupliziert wird" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "Teil-Testdaten kopieren" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "Test-Daten für dieses Teil kopieren wenn das Teil dupliziert wird" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "Kategorie-Parametervorlage kopieren" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "Kategorie-Parameter Vorlagen kopieren wenn ein Teil angelegt wird" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "Aktuelle Teile-Stände" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "Anzahl der neusten Teile auf der Startseite" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "Vorlage" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "Teile sind standardmäßig Vorlagen" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "Baugruppe" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "Teile können standardmäßig aus anderen Teilen angefertigt werden" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "Komponente" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "Teile können standardmäßig in Baugruppen benutzt werden" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "Kaufbar" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "Artikel sind grundsätzlich kaufbar" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "Verkäuflich" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "Artikel sind grundsätzlich verkaufbar" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "Nachverfolgbar" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "Artikel sind grundsätzlich verfolgbar" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "Virtuell" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "Teile sind grundsätzlich virtuell" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "zeige Bestand in Eingabemasken" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "Zeige den verfügbaren Bestand in einigen Eingabemasken" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "Entwickler-Modus" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "Berichte im Entwickler-Modus generieren (als HTML)" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "Seitengröße" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "Standardseitenformat für PDF-Bericht" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "Test-Berichte" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "Erstellung von Test-Berichten aktivieren" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "Bestands-Ablauf" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "Ablaufen von Bestand ermöglichen" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "Abgelaufenen Bestand verkaufen" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "Verkauf von abgelaufenem Bestand erlaubt" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "Bestands-Stehzeit" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "Anzahl an Tagen, an denen Bestand als abgestanden markiert wird, bevor sie ablaufen" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "Tage" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "Abgelaufenen Bestand verbauen" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "Verbauen von abgelaufenen Bestand erlaubt" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "Bestands-Eigentümerkontrolle" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "Eigentümerkontrolle für Lagerorte und Teile aktivieren" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "Gruppieren nach Teil" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "Bestand in Tabellen anhand von Teil-Referenz gruppieren" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "aktueller Bestand" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "Anzahl des geänderten Bestands auf der Startseite" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "Bauauftrag-Referenz Präfix" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "Präfix für Bauauftrag-Referenz" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "Bauauftrag-Referenz RegEx" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "RegEx Muster für die Zuordnung von Bauauftrag-Referenzen" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "Auftrags-Referenz Präfix" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "Präfix für Auftrags-Referenz" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "Bestellungs-Referenz Präfix" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "Präfix für Bestellungs-Referenz" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "Einstellungs-Schlüssel (muss einzigartig sein, Groß-/ Kleinschreibung wird nicht beachtet)" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "Einstellungs-Wert" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "Nur Ganzzahl eingeben" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "Wahrheitswert erforderlich" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "Nur Ganzzahl eingeben" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "Schlüsseltext muss eindeutig sein" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "Preisstaffelungs Anzahl" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "Preis" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "Stückpreis für die angegebene Anzahl" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "Standard" @@ -1882,7 +1876,7 @@ msgstr "URL" msgid "Image URL" msgstr "Bild-URL" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "Einzelpreis" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "Produziert diese Firma Teile?" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "Basisteil" @@ -2011,7 +2005,7 @@ msgstr "Teil auswählen" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "Teilbeschreibung des Herstellers" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "Lagerbestandseinheit (SKU) des Zulieferers" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "Herstellerteil" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "Zuliefererbeschreibung des Teils" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "Mindestpreis" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "Verpackungen" @@ -2154,9 +2148,11 @@ msgstr "Sind Sie sicher, dass Sie die Firma '%(name)s' löschen wollen?" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." -msgstr "Es gibt %(count)s Teile, die von diesem Unternehmen bezogen werden.
    \n" +msgstr "" +"Es gibt %(count)s Teile, die von diesem Unternehmen bezogen werden.
    \n" "Wenn dieser Lieferant gelöscht wird, werden auch diese Zulieferer-Teile gelöscht." #: company/templates/company/detail.html:21 @@ -2172,10 +2168,10 @@ msgid "Uses default currency" msgstr "verwendet Standard-Währung" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "Kunde" @@ -2221,7 +2217,7 @@ msgstr "Teile löschen" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "Neues Teil" @@ -2268,7 +2264,7 @@ msgstr "Neues Zuliefererteil anlegen" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "Neues Zuliefererteil" @@ -2291,7 +2287,7 @@ msgstr "Zulieferer-Liste" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "Teil bestellen" @@ -2325,8 +2321,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "Für dieses Herstellerteil sind %(count)s Lieferanten definiert. Wenn Sie es löschen, werden die folgenden Lieferantenteile ebenfalls gelöscht:" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "Zulieferer" @@ -2343,7 +2339,7 @@ msgstr "Herstellerteil-Bestand" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "Lagerbestand" @@ -2401,10 +2397,10 @@ msgstr "Teilbestand" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "Aufträge" @@ -2413,10 +2409,10 @@ msgstr "Aufträge" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "Bestellungen" @@ -2447,7 +2443,7 @@ msgstr "Neuer Auftrag" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "Zuliefererteil" @@ -2496,7 +2492,7 @@ msgid "Pricing Information" msgstr "Preisinformationen ansehen" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "Preisstaffel hinzufügen" @@ -2515,8 +2511,8 @@ msgstr "Preisstaffel bearbeiten" msgid "Delete price break" msgstr "Preisstaffel löschen" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "Hersteller" @@ -2538,20 +2534,20 @@ msgstr "Firmen" msgid "New Company" msgstr "Neue Firma" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "Bild herunterladen" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "Bildgröße überschreitet maximal-erlaubte Größe für Downloads" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "Ungültige Antwort {code}" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "Angegebene URL ist kein gültiges Bild" @@ -2603,7 +2599,7 @@ msgstr "Herstellerteil löschen" msgid "Edit Supplier Part" msgstr "Zuliefererteil bearbeiten" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "Neues Zuliefererteil anlegen" @@ -2611,15 +2607,15 @@ msgstr "Neues Zuliefererteil anlegen" msgid "Delete Supplier Part" msgstr "Zuliefererteil entfernen" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "neue Preisstaffel hinzufügt" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "Preisstaffel bearbeiten" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "Preisstaffel löschen" @@ -2693,11 +2689,11 @@ msgid "Mark order as complete" msgstr "Bestellung als vollständig markieren" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "Bestellung stornieren" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "Bestellung versenden" @@ -2794,7 +2790,7 @@ msgstr "Geplantes Lieferdatum für Auftrag." msgid "Date order was completed" msgstr "Datum an dem der Auftrag fertigstellt wurde" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "Anzahl muss größer Null sein" @@ -2860,8 +2856,8 @@ msgstr "Bestellung" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "Bestellung" @@ -2872,7 +2868,7 @@ msgstr "Zuliefererteil" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "Empfangen" @@ -2881,7 +2877,7 @@ msgid "Number of items received" msgstr "Empfangene Objekt-Anzahl" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "Preis" @@ -2889,8 +2885,9 @@ msgstr "Preis" msgid "Unit purchase price" msgstr "Preis pro Einheit" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "Verkaufspreis" @@ -2941,12 +2938,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "Sind Sie sicher, dass Sie diesen Anhang löschen wollen?" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "Drucken" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "Bestellung bearbeiten" @@ -2964,12 +2961,12 @@ msgid "Purchase Order Details" msgstr "Bestellungs-Details" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "Bestellreferenz" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "Bestellstatus" @@ -2982,7 +2979,7 @@ msgstr "Aufgegeben" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "Neuer Lagerort" @@ -3194,14 +3191,14 @@ msgstr "Berichte drucken" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "Ausstehende Teile für %(order)s - %(desc)s empfangen" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3216,7 +3213,7 @@ msgid "Order Code" msgstr "Bestellnummer" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "Bestellt" @@ -3232,20 +3229,20 @@ msgstr "Fehler: verknüpftes Teil wurde gelöscht" msgid "Remove line" msgstr "Position entfernen" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "Dieser Auftrag ist nicht vollständig zugeordnet" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "Packliste" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "Auftragsdetails" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "Kundenreferenz" @@ -3264,7 +3261,7 @@ msgstr "Abbruch dieser Bestellung bedeutet, dass sie nicht länger bearbeitbar i msgid "Sales Order Items" msgstr "Auftrags-Positionen" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "Aktionen" @@ -3559,7 +3556,7 @@ msgstr "{part} Stückpreis auf {price} und Menge auf {qty} aktualisiert" msgid "Default Location" msgstr "Standard-Lagerort" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "Verfügbarer Lagerbestand" @@ -3632,7 +3629,7 @@ msgstr "Zulieferer einschließen" msgid "Include part supplier data in exported BOM" msgstr "Zulieferer-Daten in Stückliste-Export einschließen" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "Ausgangsteil" @@ -3708,7 +3705,7 @@ msgstr "Parameter-Vorlage zu Kategorien dieser Ebene hinzufügen" msgid "Add parameter template to all categories" msgstr "Parameter-Vorlage zu allen Kategorien hinzufügen" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "Untergeordnetes Teil" @@ -3728,7 +3725,7 @@ msgstr "Standard Stichwörter" msgid "Default keywords for parts in this category" msgstr "Standard-Stichworte für Teile dieser Kategorie" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "Teil-Kategorie" @@ -3798,7 +3795,7 @@ msgstr "Schlüsselwörter" msgid "Part keywords to improve visibility in search results" msgstr "Schlüsselworte um die Sichtbarkeit in Suchergebnissen zu verbessern" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "Kategorie" @@ -3808,7 +3805,7 @@ msgid "Part category" msgstr "Teile-Kategorie" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "IPN (Interne Produktnummer)" @@ -3853,7 +3850,7 @@ msgstr "Minimaler Lagerbestand" msgid "Minimum allowed stock level" msgstr "Minimal zulässiger Lagerbestand" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "Einheiten" @@ -3924,167 +3921,167 @@ msgstr "Erstellungs-Nutzer" msgid "Sell multiple" msgstr "Mehrere verkaufen" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "Test-Vorlagen können nur für verfolgbare Teile angelegt werden" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "Ein Test mit diesem Namen besteht bereits für dieses Teil" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "Test-Name" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "Namen für diesen Test eingeben" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "Test-Beschreibung" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "Beschreibung für diesen Test eingeben" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "Benötigt" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "Muss dieser Test erfolgreich sein?" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "Erfordert Wert" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "Muss für diesen Test ein Wert für das Test-Ergebnis eingetragen werden?" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "Anhang muss eingegeben werden" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "Muss für diesen Test ein Anhang für das Test-Ergebnis hinzugefügt werden?" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "Vorlagen-Name des Parameters muss eindeutig sein" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "Name des Parameters" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "Einheit des Parameters" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "Parameter Vorlage" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "Wert" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "Parameter Wert" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "Standard-Wert" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "Standard Parameter Wert" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "Ausgangsteil auswählen" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "Teil für die Nutzung in der Stückliste auswählen" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "Stücklisten-Anzahl für dieses Stücklisten-Teil" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "Optional" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "Diese Stücklisten-Position ist optional" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "Überschuss" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "Geschätzter Ausschuss (absolut oder prozentual)" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "Referenz der Postion auf der Stückliste" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "Notizen zur Stücklisten-Position" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "Prüfsumme" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "Prüfsumme der Stückliste" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "Geerbt" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "Diese Stücklisten-Position wird in die Stücklisten von Teil-Varianten vererbt" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "Menge muss eine Ganzzahl sein" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "Zuliefererteil muss festgelegt sein" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "Stücklisten-Position" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "Teil 1" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "Teil 2" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "verknüpftes Teil auswählen" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "Fehler bei Verwandschaft: Ist das Teil mit sich selbst verwandt oder ist das die Verwandtschaft nicht eindeutig?" @@ -4152,7 +4149,7 @@ msgstr "Stückliste bearbeiten" msgid "Validate Bill of Materials" msgstr "Stückliste kontrollieren" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "Stückliste exportieren" @@ -4168,8 +4165,8 @@ msgstr "Ausgewählte Stücklistenpositionen löschen?" msgid "All selected BOM items will be deleted" msgstr "Alle ausgewählte Stücklistenpositionen werden gelöscht" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "Neues Teil anlegen" @@ -4250,7 +4247,7 @@ msgstr "Neuen Bauauftrag beginnen" msgid "All parts" msgstr "Alle Teile" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "Teil-Kategorie anlegen" @@ -4368,7 +4365,7 @@ msgstr "Parameter" msgid "Part Parameters" msgstr "Teilparameter" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "Teil duplizieren" @@ -4505,27 +4502,122 @@ msgstr "Zuweisungen" msgid "Used In" msgstr "Benutzt in" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +#, fuzzy +#| msgid "Sell Price Information" +msgid "Order Price Information" +msgstr "Verkaufspreis Informationen" + +#: part/templates/part/navbar.html:75 +#, fuzzy +#| msgid "Order Part" +msgid "Order Price" +msgstr "Teil bestellen" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "Preisinformationen ansehen" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "Teil Test-Vorlagen" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "Tests" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "Verknüpfte Teile" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "Teil-Bemerkungen" +#: part/templates/part/order_prices.html:21 +#, fuzzy +#| msgid "Pricing Information" +msgid "Pricing ranges" +msgstr "Preisinformationen ansehen" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "Zulieferer-Preise" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "Stückpreis" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "Gesamtkosten" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "Keine Zulieferer-Preise verfügbar" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "Stücklistenpreise" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "Anmerkung: Stücklistenbepreisung für dieses Teil ist unvollständig" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "Keine Stücklisten-Preise verfügbar" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "Keine Preise für dieses Teil verfügbar" + +#: part/templates/part/order_prices.html:113 +#, fuzzy +#| msgid "Part Pricing" +msgid "Stock Pricing" +msgstr "Teilbepreisung" + +#: part/templates/part/order_prices.html:121 +#, fuzzy +#| msgid "No pricing information is available for this part." +msgid "No stock pricing history is available for this part." +msgstr "Keine Preise für dieses Teil verfügbar" + +#: part/templates/part/order_prices.html:140 +#, fuzzy, python-format +#| msgid "Single Price" +msgid "Single Price - %(currency)s" +msgstr "Einzelpreis" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "Parameter hinzufügen" @@ -4559,126 +4651,94 @@ msgstr "Neue Teilparametervorlage anlegen" msgid "Part List" msgstr "Teileliste" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "Dieses Teil ist eine Variante von %(link)s" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "Inaktiv" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "Teil favorisieren" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "Barcode Aktionen" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "QR-Code anzeigen" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "Label drucken" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "Kosteninformationen ansehen" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "Lagerbestand zählen" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "Teile Aktionen" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "Teil duplizieren" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "Teil bearbeiten" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "Teil löschen" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "Dies ist ein virtuelles Teil" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "Dieses Teil ist eine Variante von %(link)s" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "Auf Lager" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "Für Bauaufträge benötigt" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "Benötigt für Aufträge" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "Zu Bauaufträgen zugeordnet" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "Herstellbar" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "Im Bau" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "Berechnen" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "Zulieferer-Preise" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "Stückpreis" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "Gesamtkosten" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "Keine Zulieferer-Preise verfügbar" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "Stücklistenpreise" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "Anmerkung: Stücklistenbepreisung für dieses Teil ist unvollständig" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "Keine Stücklisten-Preise verfügbar" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "Keine Preise für dieses Teil verfügbar" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "Test Vorlage hinzufügen" @@ -4788,212 +4848,212 @@ msgstr "neue Variante anlegen" msgid "Unknown database" msgstr "Unbekannte Datenbank" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "verknüpftes Teil hinzufügen" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "verknüpftes Teil entfernen" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "Teilanhang hinzufügen" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "Anhang bearbeiten" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "Teilanhang aktualisiert" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "Teilanhang löschen" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "Teilanhang gelöscht" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "Testvorlage anlegen" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "Testvorlage bearbeiten" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "Testvorlage löschen" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "Teil-Kategorie auswählen" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "Kategorie für {n} Teile setzen" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "Variante anlegen" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "Teil kopiert" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "Übereinstimmung gefunden - Teil trotzdem anlegen" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "Neues Teil angelegt" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "Teil-QR-Code" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "Teilbild hochladen" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "Teilbild aktualisiert" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "Teilbild auswählen" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "Teilbild nicht gefunden" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "Teileigenschaften bearbeiten" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "Stückliste duplizieren" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "bestätige Duplizierung Stückliste von übergeordneter Stückliste" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "Stückliste überprüfen" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "Bestätigen, dass Stückliste korrekt ist" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "überprüfte Stückliste" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "Keine Stückliste angegeben" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "Bitte eine gültige Anzahl eingeben" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "Bitte ein gültiges Teil auswählen" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "Teil doppelt ausgewählt" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "Teil auswählen" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "gewähltes Teil erzeugt rekursive Stückliste" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "Anzahl angeben" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "Löschen des Teils bestätigen" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "Teil wurde gelöscht" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "Teilbepreisung" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "Teilparametervorlage anlegen" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "Teilparametervorlage bearbeiten" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "Teilparametervorlage löschen" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "Teilparameter anlegen" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "Teilparameter bearbeiten" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "Teilparameter löschen" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "Teil-Kategorie bearbeiten" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "Teil-Kategorie löschen" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "Teil-Kategorie wurde gelöscht" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "Kategorieparametervorlage anlegen" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "Kategorieparametervorlage bearbeiten" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "Kategorieparametervorlage löschen" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "Stücklisten-Position anlegen" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "Stücklisten-Position bearbeiten" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "löschen von Stücklisten-Position bestätigen" @@ -5128,7 +5188,7 @@ msgid "Moved {n} parts to {loc}" msgstr "{n} Teile nach {loc} bewegt" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "Ablaufdatum" @@ -5278,7 +5338,7 @@ msgstr "Wo wird dieses Teil normalerweise gelagert?" msgid "Packaging this stock item is stored in" msgstr "Die Verpackung dieses BestandsObjekt ist gelagert in" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "verbaut in" @@ -5413,173 +5473,173 @@ msgstr "neuer Eintrag" msgid "Stock Item Attachments" msgstr "BestandsObjekt-Anhang" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "Sie gehören nicht zu den Eigentümern dieses Objekts und können es nicht ändern." - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "Dieses BestandsObjekt wird gerade hergestellt und kann nicht geändert werden." - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "Ändern des BestandsObjekts in der Bauauftrag-Ansicht." - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "Dieses BestandsObjekt hat nicht alle Tests bestanden" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "Dieses BestandsObjekt ist dem Auftrag %(link)s zugewiesen (Menge: %(qty)s)" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "Dieses BestandsObjekt ist dem Bauauftrag %(link)s zugewiesen (Menge: %(qty)s)" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "Dieses BestandsObjekt ist serialisiert. Es hat eine eindeutige Seriennummer und die Anzahl kann nicht angepasst werden." - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "Dieses BestandsObjekt kann nicht gelöscht werden, da es Kinder besitzt" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "Dieses BestandsObjekt wird automatisch gelöscht wenn der Lagerbestand aufgebraucht ist." - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "abgelaufen" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "überfällig" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "Barcode abhängen" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "Barcode anhängen" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "zu Lagerort einscannen" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "Druck Aktionen" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "Test-Bericht" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "Bestands-Anpassungs Aktionen" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "Bestand zählen" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "Bestand hinzufügen" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "Bestand entfernen" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "Lagerbestand serialisieren" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "Bestand verschieben" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "Kunden zuweisen" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "zu Bestand zurückgeben" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "BestandsObjekt deinstallieren" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "Deinstallieren" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "Bestands-Aktionen" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "in Variante ändern" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "BestandsObjekt duplizieren" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "BestandsObjekt bearbeiten" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "BestandsObjekt löschen" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "Sie gehören nicht zu den Eigentümern dieses Objekts und können es nicht ändern." + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "Dieses BestandsObjekt wird gerade hergestellt und kann nicht geändert werden." + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "Ändern des BestandsObjekts in der Bauauftrag-Ansicht." + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "Dieses BestandsObjekt hat nicht alle Tests bestanden" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "Dieses BestandsObjekt ist dem Auftrag %(link)s zugewiesen (Menge: %(qty)s)" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "Dieses BestandsObjekt ist dem Bauauftrag %(link)s zugewiesen (Menge: %(qty)s)" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "Dieses BestandsObjekt ist serialisiert. Es hat eine eindeutige Seriennummer und die Anzahl kann nicht angepasst werden." + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "Dieses BestandsObjekt kann nicht gelöscht werden, da es Kinder besitzt" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "Dieses BestandsObjekt wird automatisch gelöscht wenn der Lagerbestand aufgebraucht ist." + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "BestandsObjekt-Details" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "Kein Lagerort gesetzt" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "Barcode-Bezeichner" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "Elternposition" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "Dieses BestandsObjekt lief am %(item.expiry_date)s ab" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "Dieses BestandsObjekt läuft am %(item.expiry_date)s ab" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "Zuletzt aktualisiert" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "Letzte Inventur" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "Keine Inventur ausgeführt" @@ -5932,7 +5992,7 @@ msgstr "{n} BestandsObjekte gelöscht" #: stock/views.py:1222 msgid "Edit Stock Item Status" -msgstr "Lagerbestandsstatus bearbeiten" +msgstr "Status bearbeiten" #: stock/views.py:1245 msgid "Edit Stock Item" @@ -6068,11 +6128,13 @@ msgstr "Farbschemata" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " -msgstr "\n" +msgstr "" +"\n" "\t\tDie CSS Datei \"%(invalid_color_theme)s.css\" für das aktuell ausgewählte Farbschema wurde nicht gefunden.
    \n" "\t\tBitte ein anderes Farbschema auswählen:)\n" "\t " @@ -6111,11 +6173,35 @@ msgstr "Vorlage bearbeiten" msgid "Delete Template" msgstr "Vorlage löschen" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "Währungseinstellungen" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "Basiswährung" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "Wechselkurse" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "Letzte Aktualisierung" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "Nie" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "Jetzt aktualisieren" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "Systemweite InvenTree-Einstellungen" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "Barcode-Einstellungen" @@ -6194,10 +6280,14 @@ msgid "Global" msgstr "Systemweit" #: templates/InvenTree/settings/tabs.html:19 +msgid "Currencies" +msgstr "Währungen" + +#: templates/InvenTree/settings/tabs.html:22 msgid "Report" msgstr "Bericht" -#: templates/InvenTree/settings/tabs.html:22 +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "Kategorien" @@ -6243,46 +6333,50 @@ msgid "Update Available" msgstr "Aktualisierung verfügbar" #: templates/about.html:34 +msgid "API Version" +msgstr "API-Version" + +#: templates/about.html:39 msgid "Django Version" msgstr "Django-Version" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "Commit-Hash" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "Commit-Datum" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "InvenTree-Dokumentation" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "Code auf GitHub ansehen" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "Danksagung" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "Mobile App" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "Fehlerbericht senden" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "In die Zwischenablage kopieren" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "Versionsinformationen kopieren" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6412,41 +6506,49 @@ msgstr "Barcode entspricht keinem Lagerort" msgid "Open subassembly" msgstr "Unterbaugruppe öffnen" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "Keine Preisinformation verfügbar" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "ja" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "nein" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "Stückliste anzeigen" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "Stücklisten-Position kontrollieren" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "Diese Position wurde kontrolliert" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "Stücklisten-Position bearbeiten" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "Stücklisten-Position löschen" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "Keine Stücklisten-Position(en) gefunden" @@ -6489,7 +6591,7 @@ msgstr "Keine Bauaufträge passen zur Anfrage" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "Auswählen" @@ -6752,6 +6854,12 @@ msgstr "Testergebnis löschen" msgid "This test is defined for a parent part" msgstr "Dieses Testergebnis ist für ein Hauptteil" +#: templates/js/part.js:727 +#, fuzzy +#| msgid "Single Price" +msgid "Single Price Difference" +msgstr "Einzelpreis" + #: templates/js/report.js:47 msgid "items selected" msgstr "BestandsObjekt ausgewählt" @@ -6928,11 +7036,11 @@ msgstr "Inventur" #: templates/js/stock.js:825 msgid "Stock Status" -msgstr "Bestandsstatus" +msgstr "Status" #: templates/js/stock.js:840 msgid "Set Stock Status" -msgstr "Bestandsstatus setzen" +msgstr "Status setzen" #: templates/js/stock.js:854 msgid "Select Status Code" @@ -6946,55 +7054,55 @@ msgstr "Status Code muss ausgewählt werden" msgid "Invalid date" msgstr "Ungültiges Datum" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "Standort nicht mehr vorhanden" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "Bestellung existiert nicht mehr" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "Kunde existiert nicht mehr" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "Lagerbestand existiert nicht mehr" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "Hinzugefügt" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "Entfernt" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "Keine Benutzerinformation" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "Tracking-Eintrag bearbeiten" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "Tracking-Eintrag löschen" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "Neuen Lagerort anlegen" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "Seriennummer" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "Installiert" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "Installiere Objekt" @@ -7110,7 +7218,7 @@ msgstr "zeige zu Kunden zugeordnete Einträge" #: templates/js/table_filters.js:198 templates/js/table_filters.js:199 msgid "Stock status" -msgstr "Bestandsstatus" +msgstr "Status" #: templates/js/table_filters.js:232 msgid "Build status" @@ -7327,11 +7435,11 @@ msgstr "Server läuft im Debug-Modus" #: templates/stats.html:33 msgid "Docker Mode" -msgstr "" +msgstr "Docker-Modus" #: templates/stats.html:34 msgid "Server is deployed using docker" -msgstr "" +msgstr "Server wird mit Docker bereitgestellt" #: templates/stats.html:40 msgid "Server status" @@ -7403,7 +7511,7 @@ msgstr "Status ändern" #: templates/stock_table.html:60 msgid "Change stock status" -msgstr "Bestandsstatus ändern" +msgstr "Status ändern" #: templates/stock_table.html:63 msgid "Delete selected items" @@ -7476,4 +7584,3 @@ msgstr "Berechtigungen Einträge zu ändern" #: users/models.py:187 msgid "Permission to delete items" msgstr "Berechtigung Einträge zu löschen" - diff --git a/InvenTree/locale/en/LC_MESSAGES/django.po b/InvenTree/locale/en/LC_MESSAGES/django.po index 7e057e4153..ffe58c6405 100644 --- a/InvenTree/locale/en/LC_MESSAGES/django.po +++ b/InvenTree/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,42 +34,42 @@ msgstr "" msgid "Enter date" msgstr "" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "" @@ -123,9 +123,9 @@ msgstr "" msgid "File comment" msgstr "" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "" @@ -134,7 +134,7 @@ msgid "upload date" msgstr "" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -172,23 +172,23 @@ msgstr "" msgid "parent" msgstr "" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "" @@ -233,7 +233,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -373,27 +373,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -445,10 +445,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -462,8 +462,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -474,20 +474,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -529,11 +531,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -541,14 +543,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -581,7 +583,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -593,7 +595,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -603,7 +605,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -614,7 +616,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -624,17 +626,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -644,7 +646,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -692,7 +694,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -733,10 +735,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -750,8 +752,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -769,12 +771,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -824,7 +826,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -839,10 +841,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -914,7 +916,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -922,8 +924,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -944,119 +946,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1192,15 +1194,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1283,8 +1285,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1430,7 +1432,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1467,368 +1469,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1883,7 +1877,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1999,7 +1993,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2012,7 +2006,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2031,7 +2025,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2055,7 +2049,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2072,7 +2066,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2087,7 +2081,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2173,10 +2167,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2222,7 +2216,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2269,7 +2263,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2292,7 +2286,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2326,8 +2320,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2344,7 +2338,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2402,10 +2396,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2414,10 +2408,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2448,7 +2442,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2497,7 +2491,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2516,8 +2510,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2539,20 +2533,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2604,7 +2598,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2612,15 +2606,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2694,11 +2688,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2795,7 +2789,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2861,8 +2855,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2873,7 +2867,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2882,7 +2876,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2890,8 +2884,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2942,12 +2937,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2965,12 +2960,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2983,7 +2978,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3195,14 +3190,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3217,7 +3212,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3233,20 +3228,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3265,7 +3260,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3560,7 +3555,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3633,7 +3628,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3709,7 +3704,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3729,7 +3724,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3799,7 +3794,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3809,7 +3804,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3854,7 +3849,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3925,167 +3920,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4153,7 +4148,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4169,8 +4164,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4251,7 +4246,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4369,7 +4364,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4506,27 +4501,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4560,126 +4639,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4789,212 +4836,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5129,7 +5176,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5279,7 +5326,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5414,173 +5461,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6110,11 +6157,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6193,10 +6264,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6242,46 +6317,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6411,41 +6490,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6488,7 +6575,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6751,6 +6838,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6945,55 +7036,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" diff --git a/InvenTree/locale/es/LC_MESSAGES/django.po b/InvenTree/locale/es/LC_MESSAGES/django.po index f56eb19904..e3617c1f4f 100644 --- a/InvenTree/locale/es/LC_MESSAGES/django.po +++ b/InvenTree/locale/es/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Spanish\n" "Language: es_ES\n" @@ -33,42 +33,42 @@ msgstr "" msgid "Enter date" msgstr "" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "Confirmar" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "Confirmar la contraseña" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "Confirmar contraseña nueva" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "" @@ -122,9 +122,9 @@ msgstr "Comentario" msgid "File comment" msgstr "" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "Usuario" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "" msgid "parent" msgstr "" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "Inglés" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "Francés" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "Alemán" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "Polaco" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "Turco" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "Eliminar elemento" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "Configurar Contraseña" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "Información del sistema" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "Cantidad" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "Unicación" @@ -540,14 +542,14 @@ msgstr "Unicación" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "Estado" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "Referencia" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "Parte" @@ -691,7 +693,7 @@ msgstr "Elementos completados" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "Responsable" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "Notas" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "Número de serie" @@ -921,8 +923,8 @@ msgstr "Número de serie" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "Progreso" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "Lote" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "Guardar" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "días" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "Cliente" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "Fabricantes" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,113 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +#, fuzzy +#| msgid "System Information" +msgid "Order Price Information" +msgstr "Información del sistema" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4640,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4837,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5177,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5327,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5462,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6117,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6158,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6265,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6318,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6491,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6576,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6839,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7037,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7567,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/fr/LC_MESSAGES/django.po b/InvenTree/locale/fr/LC_MESSAGES/django.po index 9f32eeb22f..7db5f3a3d4 100644 --- a/InvenTree/locale/fr/LC_MESSAGES/django.po +++ b/InvenTree/locale/fr/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: French\n" "Language: fr_FR\n" @@ -33,42 +33,42 @@ msgstr "" msgid "Enter date" msgstr "Entrer la date" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "Confirmer" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "Confirmer la suppression" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "Confirmer la suppression de cet élément" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "Entrer le mot de passe" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "Entrer le nouveau mot de passe" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "Confirmez le mot de passe" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "Confirmer le nouveau mot de passe" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "" @@ -122,9 +122,9 @@ msgstr "Commentaire" msgid "File comment" msgstr "" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "Description (facultative)" msgid "parent" msgstr "parent" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "Supprimer cet élément" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -540,14 +542,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -691,7 +693,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -921,8 +923,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4638,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4835,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5175,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5325,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5460,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6115,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6156,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6263,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6316,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6489,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6574,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6837,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7035,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7565,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/it/LC_MESSAGES/django.po b/InvenTree/locale/it/LC_MESSAGES/django.po index 20cbccebaa..d7603d9931 100644 --- a/InvenTree/locale/it/LC_MESSAGES/django.po +++ b/InvenTree/locale/it/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Italian\n" "Language: it_IT\n" @@ -33,42 +33,42 @@ msgstr "" msgid "Enter date" msgstr "" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "" @@ -122,9 +122,9 @@ msgstr "" msgid "File comment" msgstr "" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "" msgid "parent" msgstr "" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -540,14 +542,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -691,7 +693,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -921,8 +923,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4638,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4835,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5175,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5325,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5460,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6115,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6156,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6263,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6316,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6489,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6574,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6837,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7035,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7565,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/ja/LC_MESSAGES/django.po b/InvenTree/locale/ja/LC_MESSAGES/django.po index fe9b71062e..80c2ab0260 100644 --- a/InvenTree/locale/ja/LC_MESSAGES/django.po +++ b/InvenTree/locale/ja/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Japanese\n" "Language: ja_JP\n" @@ -33,42 +33,42 @@ msgstr "" msgid "Enter date" msgstr "" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "" @@ -122,9 +122,9 @@ msgstr "" msgid "File comment" msgstr "" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "" msgid "parent" msgstr "" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -540,14 +542,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -691,7 +693,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -921,8 +923,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4638,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4835,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5175,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5325,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5460,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6115,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6156,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6263,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6316,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6489,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6574,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6837,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7035,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7565,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/pl/LC_MESSAGES/django.po b/InvenTree/locale/pl/LC_MESSAGES/django.po index c9c9975b16..9f34636319 100644 --- a/InvenTree/locale/pl/LC_MESSAGES/django.po +++ b/InvenTree/locale/pl/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Polish\n" "Language: pl_PL\n" @@ -33,42 +33,42 @@ msgstr "Nie znaleziono pasującej akcji" msgid "Enter date" msgstr "Wprowadź dane" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "Potwierdź" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "Potwierdź usunięcie" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "Potwierdź usuwanie elementu" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "Wprowadź hasło" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "Wprowadź nowe hasło" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "Potwierdź hasło" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "Potwierdź nowe hasło" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "Zastosuj motyw" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "Wybierz kategorię" @@ -122,9 +122,9 @@ msgstr "Komentarz" msgid "File comment" msgstr "Komentarz pliku" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "Użytkownik" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "data przesłania" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "Opis (opcjonalny)" msgid "parent" msgstr "nadrzędny" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "Angielski" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "Francuski" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "Niemiecki" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "Polski" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "Turecki" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "Zwrócone" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "Wysłane" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "Usuń element" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "Zaznacz pole aby potwierdzić usunięcie elementu" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "Edytuj informacje użytkownika" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "Ustaw hasło" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "Hasła muszą być zgodne" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "Informacja systemowa" @@ -444,10 +444,10 @@ msgstr "Numer Zlecenia Budowy" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "Ilość" @@ -528,11 +530,11 @@ msgstr "Oznacz budowę jako ukończoną" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "Lokalizacja" @@ -540,14 +542,14 @@ msgstr "Lokalizacja" msgid "Location of completed parts" msgstr "Lokalizacja ukończonych części" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "Status" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "Zlecenie Budowy" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "Zlecenia budowy" @@ -602,7 +604,7 @@ msgstr "Odwołanie do zamówienia wykonania" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "Referencja" msgid "Brief description of the build" msgstr "Krótki opis budowy" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "Budowa nadrzędna" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "Zamówienie budowy, do którego budowa jest przypisana" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "Zamówienie budowy, do którego budowa jest przypisana" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "Część" @@ -691,7 +693,7 @@ msgstr "Ukończone elementy" msgid "Number of stock items which have been completed" msgstr "Ilość produktów magazynowych które zostały ukończone" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "Status budowania" @@ -732,10 +734,10 @@ msgstr "Wydany przez" msgid "User who issued this build order" msgstr "Użytkownik, który wydał to zamówienie" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "Odpowiedzialny" @@ -749,8 +751,8 @@ msgstr "Użytkownik odpowiedzialny za to zamówienie budowy" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "Link Zewnętrzny" @@ -768,12 +770,12 @@ msgstr "Link do zewnętrznego adresu URL" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "Uwagi" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "Element magazynowy" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "Numer Seryjny" @@ -921,8 +923,8 @@ msgstr "Numer Seryjny" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "Załączniki" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "Widok administratora" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "Zaległe" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "Akcje druku" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "Wydrukuj Numer Zlecenia Budowy" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "Edytuj Budowę" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "Anuluj Budowę" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "Szczegóły budowy" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "Postęp" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "Zamówienie zakupu" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "Dodane przez" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "Nie określono lokalizacji docelowej" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "Partia" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "Utworzony" @@ -1282,8 +1284,8 @@ msgstr "Edytuj uwagi" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "Zapisz" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "Dodano załącznik" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "Nazwa instancji InvenTree" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "Nazwa firmy" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "Bazowy URL" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "Bazowy adres URL dla instancji serwera" -#: common/models.py:84 -msgid "Default Currency" -msgstr "Domyślna waluta" - #: common/models.py:85 -msgid "Default currency" -msgstr "Domyślna waluta" - -#: common/models.py:91 msgid "Download from URL" msgstr "Pobierz z adresu URL" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "Zezwól na pobieranie zewnętrznych obrazów i plików z zewnętrznego URL" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "Obsługa kodu kreskowego" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "Włącz obsługę skanera kodów" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "Wyrażenie regularne IPN" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "Zezwól na powtarzający się IPN" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "Zezwól na edycję IPN" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "Skopiuj BOM komponentu" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "Szablon" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "Złożenie" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "Komponent" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "Możliwość zakupu" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "Części są domyślnie z możliwością zakupu" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "Możliwość sprzedaży" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "Części są domyślnie z możliwością sprzedaży" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "Możliwość śledzenia" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "Części są domyślnie z możliwością śledzenia" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "Wirtualny" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "Części są domyślnie wirtualne" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "Tryb Debugowania" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "Rozmiar strony" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "Raporty testów" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "Włącz generowanie raportów testów" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "dni" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "Grupuj według komponentu" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "Ustawienia wartości" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "Cena" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "Domyślny" @@ -1882,7 +1876,7 @@ msgstr "URL" msgid "Image URL" msgstr "URL zdjęcia" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "Cena jednostkowa" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "Czy to przedsiębiorstwo produkuje części?" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "Część bazowa" @@ -2011,7 +2005,7 @@ msgstr "Wybierz część" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "Część producenta" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "Opakowanie" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "Klient" @@ -2220,7 +2215,7 @@ msgstr "Usuń części" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "Nowy komponent" @@ -2267,7 +2262,7 @@ msgstr "Utwórz nowego dostawcę części" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "Now dostawca części" @@ -2290,7 +2285,7 @@ msgstr "Lista dostawców" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "Zamów część" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "Dostawcy" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "Stan" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "Informacja cenowa" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "Edytuj przedział cenowy" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "Producenci" @@ -2537,20 +2532,20 @@ msgstr "Firmy" msgid "New Company" msgstr "Nowa firma" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "Pobierz obraz" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "Edytuj przedział cenowy" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "Oznacz zamówienie jako zakończone" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "Anuluj zamówienie" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "Wyślij zamówienie" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "Zamówienie" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "Odebrane" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "Cena zakupu" @@ -2888,8 +2883,9 @@ msgstr "Cena zakupu" msgid "Unit purchase price" msgstr "Cena zakupu jednostkowego" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "Cena sprzedaży" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "Status zamówienia" @@ -2981,7 +2977,7 @@ msgstr "Wydany" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "Nowa lokalizacja" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "Kod zamówienia" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "Usuń linie" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "Akcje" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "Domyślna lokalizacja" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "Dostępna ilość" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "Część nadrzędna" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "Podczęść" @@ -3727,7 +3723,7 @@ msgstr "Domyślne słowa kluczowe" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "Słowa kluczowe" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "Kategoria" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "IPN" @@ -3852,7 +3848,7 @@ msgstr "Minimalny stan magazynowy" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "Jednostki" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "Sprzedaj wiele" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "Nazwa testu" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "Wymagane" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "Dane" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "Wartość domyślna" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "Suma kontrolna" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "Część 1" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "Część 2" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "Wybierz powiązaną część" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "Wszystkie części" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "Stwórz nową kategorię komponentów" @@ -4367,7 +4363,7 @@ msgstr "Parametry" msgid "Part Parameters" msgstr "Parametry części" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "Duplikuj część" @@ -4504,27 +4500,122 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +#, fuzzy +#| msgid "Pricing Information" +msgid "Order Price Information" +msgstr "Informacja cenowa" + +#: part/templates/part/navbar.html:75 +#, fuzzy +#| msgid "Order Parts" +msgid "Order Price" +msgstr "Zamów części" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +#, fuzzy +#| msgid "Pricing Information" +msgid "Pricing ranges" +msgstr "Informacja cenowa" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +#, fuzzy +#| msgid "Pricing" +msgid "Stock Pricing" +msgstr "Cennik" + +#: part/templates/part/order_prices.html:121 +#, fuzzy +#| msgid "No stock available for %(part)s" +msgid "No stock pricing history is available for this part." +msgstr "Brak zapasów dla %(part)s" + +#: part/templates/part/order_prices.html:140 +#, fuzzy, python-format +#| msgid "Single Price" +msgid "Single Price - %(currency)s" +msgstr "Cena jednostkowa" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4649,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4846,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5186,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5336,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5471,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6126,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6167,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6274,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6327,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6500,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6585,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6848,12 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +#, fuzzy +#| msgid "Single Price" +msgid "Single Price Difference" +msgstr "Cena jednostkowa" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7048,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7578,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/ru/LC_MESSAGES/django.po b/InvenTree/locale/ru/LC_MESSAGES/django.po index df6f0336c7..963e03cbd8 100644 --- a/InvenTree/locale/ru/LC_MESSAGES/django.po +++ b/InvenTree/locale/ru/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Russian\n" "Language: ru_RU\n" @@ -33,42 +33,42 @@ msgstr "" msgid "Enter date" msgstr "" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "" @@ -122,9 +122,9 @@ msgstr "" msgid "File comment" msgstr "" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "" msgid "parent" msgstr "" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -540,14 +542,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -691,7 +693,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -921,8 +923,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4638,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4835,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5175,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5325,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5460,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6115,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6156,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6263,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6316,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6489,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6574,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6837,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7035,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7565,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/tr/LC_MESSAGES/django.po b/InvenTree/locale/tr/LC_MESSAGES/django.po index 9d3d99e1c6..bbd9a9e162 100644 --- a/InvenTree/locale/tr/LC_MESSAGES/django.po +++ b/InvenTree/locale/tr/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 10:47\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Turkish\n" "Language: tr_TR\n" @@ -33,42 +33,42 @@ msgstr "Eşleşen eylem bulunamadı" msgid "Enter date" msgstr "Tarih giriniz" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "Onay" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "Silmeyi Onayla" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "Silmeyi onayla" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "Şifrenizi girin" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "Lütfen Yeni Parolayı Girin" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "Parolayı doğrulayın" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "Yeni parolayı doğrulayın" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "Temayı Uygula" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "Kategori Seçin" @@ -122,9 +122,9 @@ msgstr "Yorum" msgid "File comment" msgstr "Yorum" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "Kullanıcı" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "Yükleme tarihi" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "Açıklama(opsiyonel)" msgid "parent" msgstr "ebeveyn" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "İngilizce" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "Fransızca" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "Almanca" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "Polonyaca" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "Türkçe" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "İade" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "Sevk edildi" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -540,14 +542,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -691,7 +693,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -921,8 +923,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4638,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4835,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5175,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5325,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5460,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6115,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6156,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6263,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6316,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6489,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6574,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6837,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7035,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7565,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - diff --git a/InvenTree/locale/zh/LC_MESSAGES/django.po b/InvenTree/locale/zh/LC_MESSAGES/django.po index c897b54b5a..71294a33f5 100644 --- a/InvenTree/locale/zh/LC_MESSAGES/django.po +++ b/InvenTree/locale/zh/LC_MESSAGES/django.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: inventree\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-17 10:46+0000\n" -"PO-Revision-Date: 2021-05-17 14:58\n" +"POT-Creation-Date: 2021-05-29 07:28+0000\n" +"PO-Revision-Date: 2021-05-28 04:02\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" @@ -33,42 +33,42 @@ msgstr "未找到指定操作" msgid "Enter date" msgstr "输入日期" -#: InvenTree/forms.py:110 build/forms.py:102 build/forms.py:123 +#: InvenTree/forms.py:112 build/forms.py:102 build/forms.py:123 #: build/forms.py:145 build/forms.py:169 build/forms.py:185 build/forms.py:227 #: order/forms.py:27 order/forms.py:38 order/forms.py:49 order/forms.py:60 #: order/forms.py:71 part/forms.py:134 msgid "Confirm" msgstr "确认" -#: InvenTree/forms.py:126 +#: InvenTree/forms.py:128 msgid "Confirm delete" msgstr "确认删除" -#: InvenTree/forms.py:127 +#: InvenTree/forms.py:129 msgid "Confirm item deletion" msgstr "" -#: InvenTree/forms.py:159 templates/registration/login.html:77 +#: InvenTree/forms.py:161 templates/registration/login.html:77 msgid "Enter password" msgstr "输入密码" -#: InvenTree/forms.py:160 +#: InvenTree/forms.py:162 msgid "Enter new password" msgstr "输入新密码" -#: InvenTree/forms.py:167 +#: InvenTree/forms.py:169 msgid "Confirm password" msgstr "确认密码" -#: InvenTree/forms.py:168 +#: InvenTree/forms.py:170 msgid "Confirm new password" msgstr "确认新密码" -#: InvenTree/forms.py:203 +#: InvenTree/forms.py:205 msgid "Apply Theme" msgstr "应用主题" -#: InvenTree/forms.py:233 +#: InvenTree/forms.py:235 msgid "Select Category" msgstr "选择分类" @@ -122,9 +122,9 @@ msgstr "注释" msgid "File comment" msgstr "文件注释" -#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1946 +#: InvenTree/models.py:68 InvenTree/models.py:69 part/models.py:1999 #: report/templates/report/inventree_test_report_base.html:91 -#: templates/js/stock.js:1146 +#: templates/js/stock.js:1151 msgid "User" msgstr "用户" @@ -133,7 +133,7 @@ msgid "upload date" msgstr "上传日期" #: InvenTree/models.py:107 InvenTree/models.py:108 label/models.py:102 -#: part/models.py:686 part/models.py:2087 part/templates/part/params.html:27 +#: part/models.py:686 part/models.py:2140 part/templates/part/params.html:27 #: report/models.py:179 templates/InvenTree/search.html:137 #: templates/InvenTree/search.html:289 templates/js/part.js:110 #: templates/js/part.js:553 templates/js/stock.js:944 @@ -171,23 +171,23 @@ msgstr "" msgid "parent" msgstr "" -#: InvenTree/settings.py:501 +#: InvenTree/settings.py:503 msgid "English" msgstr "" -#: InvenTree/settings.py:502 +#: InvenTree/settings.py:504 msgid "French" msgstr "" -#: InvenTree/settings.py:503 +#: InvenTree/settings.py:505 msgid "German" msgstr "" -#: InvenTree/settings.py:504 +#: InvenTree/settings.py:506 msgid "Polish" msgstr "" -#: InvenTree/settings.py:505 +#: InvenTree/settings.py:507 msgid "Turkish" msgstr "" @@ -232,7 +232,7 @@ msgid "Returned" msgstr "" #: InvenTree/status_codes.py:146 -#: order/templates/order/sales_order_base.html:124 +#: order/templates/order/sales_order_base.html:126 msgid "Shipped" msgstr "" @@ -372,27 +372,27 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:587 +#: InvenTree/views.py:592 msgid "Delete Item" msgstr "" -#: InvenTree/views.py:636 +#: InvenTree/views.py:641 msgid "Check box to confirm item deletion" msgstr "" -#: InvenTree/views.py:651 templates/InvenTree/settings/user.html:18 +#: InvenTree/views.py:656 templates/InvenTree/settings/user.html:18 msgid "Edit User Information" msgstr "" -#: InvenTree/views.py:662 templates/InvenTree/settings/user.html:22 +#: InvenTree/views.py:667 templates/InvenTree/settings/user.html:22 msgid "Set Password" msgstr "" -#: InvenTree/views.py:681 +#: InvenTree/views.py:686 msgid "Password fields must match" msgstr "" -#: InvenTree/views.py:887 templates/navbar.html:95 +#: InvenTree/views.py:937 templates/navbar.html:95 msgid "System Information" msgstr "" @@ -444,10 +444,10 @@ msgstr "" msgid "Order target date" msgstr "" -#: build/forms.py:42 build/templates/build/build_base.html:136 +#: build/forms.py:42 build/templates/build/build_base.html:146 #: build/templates/build/detail.html:121 order/forms.py:109 order/forms.py:144 #: order/templates/order/order_base.html:124 -#: order/templates/order/sales_order_base.html:117 +#: order/templates/order/sales_order_base.html:119 #: report/templates/report/inventree_build_order_base.html:126 #: templates/js/build.js:783 templates/js/order.js:200 #: templates/js/order.js:298 @@ -461,8 +461,8 @@ msgstr "" #: build/forms.py:48 build/forms.py:90 build/forms.py:266 build/models.py:1245 #: build/templates/build/allocation_card.html:23 #: build/templates/build/auto_allocate.html:17 -#: build/templates/build/build_base.html:123 -#: build/templates/build/detail.html:31 common/models.py:705 +#: build/templates/build/build_base.html:133 +#: build/templates/build/detail.html:31 common/models.py:699 #: company/forms.py:176 company/templates/company/supplier_part_pricing.html:77 #: order/forms.py:188 order/forms.py:205 order/forms.py:240 order/forms.py:262 #: order/forms.py:279 order/models.py:614 order/models.py:815 @@ -473,20 +473,22 @@ msgstr "" #: order/templates/order/sales_order_detail.html:77 #: order/templates/order/sales_order_detail.html:162 #: order/templates/order/sales_order_detail.html:230 part/forms.py:342 -#: part/forms.py:371 part/forms.py:387 part/models.py:2216 +#: part/forms.py:371 part/forms.py:387 part/models.py:2269 #: part/templates/part/allocation.html:19 #: part/templates/part/allocation.html:53 -#: part/templates/part/part_pricing.html:13 +#: part/templates/part/order_prices.html:175 +#: part/templates/part/part_pricing.html:12 #: part/templates/part/sale_prices.html:85 #: report/templates/report/inventree_build_order_base.html:114 #: report/templates/report/inventree_po_report.html:91 #: report/templates/report/inventree_so_report.html:91 #: report/templates/report/inventree_test_report_base.html:77 #: stock/forms.py:175 stock/forms.py:308 -#: stock/templates/stock/item_base.html:250 +#: stock/templates/stock/item_base.html:255 #: stock/templates/stock/stock_adjust.html:18 templates/js/barcode.js:364 #: templates/js/bom.js:205 templates/js/build.js:476 templates/js/build.js:1014 -#: templates/js/stock.js:1131 templates/js/stock.js:1393 +#: templates/js/part.js:717 templates/js/stock.js:1136 +#: templates/js/stock.js:1398 msgid "Quantity" msgstr "" @@ -528,11 +530,11 @@ msgstr "" #: build/forms.py:210 build/templates/build/auto_allocate.html:18 #: order/forms.py:82 stock/forms.py:347 -#: stock/templates/stock/item_base.html:280 +#: stock/templates/stock/item_base.html:285 #: stock/templates/stock/stock_adjust.html:17 #: templates/InvenTree/search.html:260 templates/js/barcode.js:363 #: templates/js/barcode.js:531 templates/js/build.js:490 -#: templates/js/stock.js:641 templates/js/stock.js:1023 +#: templates/js/stock.js:641 templates/js/stock.js:1028 msgid "Location" msgstr "" @@ -540,14 +542,14 @@ msgstr "" msgid "Location of completed parts" msgstr "" -#: build/forms.py:215 build/templates/build/build_base.html:128 +#: build/forms.py:215 build/templates/build/build_base.html:138 #: build/templates/build/detail.html:59 order/models.py:466 #: order/templates/order/receive_parts.html:24 -#: stock/templates/stock/item_base.html:398 templates/InvenTree/search.html:252 +#: stock/templates/stock/item_base.html:403 templates/InvenTree/search.html:252 #: templates/js/barcode.js:119 templates/js/build.js:770 #: templates/js/order.js:187 templates/js/order.js:285 -#: templates/js/stock.js:628 templates/js/stock.js:1100 -#: templates/js/stock.js:1401 +#: templates/js/stock.js:628 templates/js/stock.js:1105 +#: templates/js/stock.js:1406 msgid "Status" msgstr "" @@ -580,7 +582,7 @@ msgid "Select quantity of stock to allocate" msgstr "" #: build/models.py:65 build/templates/build/build_base.html:9 -#: build/templates/build/build_base.html:63 +#: build/templates/build/build_base.html:73 #: part/templates/part/allocation.html:23 #: report/templates/report/inventree_build_order_base.html:106 msgid "Build Order" @@ -592,7 +594,7 @@ msgstr "" #: order/templates/order/so_navbar.html:22 part/templates/part/navbar.html:55 #: part/templates/part/navbar.html:58 templates/InvenTree/index.html:183 #: templates/InvenTree/search.html:185 -#: templates/InvenTree/settings/tabs.html:31 users/models.py:43 +#: templates/InvenTree/settings/tabs.html:34 users/models.py:43 msgid "Build Orders" msgstr "" @@ -602,7 +604,7 @@ msgstr "" #: build/models.py:127 order/models.py:99 order/models.py:616 #: order/templates/order/purchase_order_detail.html:170 -#: order/templates/order/sales_order_detail.html:225 part/models.py:2225 +#: order/templates/order/sales_order_detail.html:225 part/models.py:2278 #: report/templates/report/inventree_po_report.html:92 #: report/templates/report/inventree_so_report.html:92 templates/js/bom.js:197 #: templates/js/build.js:565 templates/js/build.js:1008 @@ -613,7 +615,7 @@ msgstr "" msgid "Brief description of the build" msgstr "" -#: build/models.py:146 build/templates/build/build_base.html:153 +#: build/models.py:146 build/templates/build/build_base.html:163 #: build/templates/build/detail.html:77 msgid "Parent Build" msgstr "" @@ -623,17 +625,17 @@ msgid "BuildOrder to which this build is allocated" msgstr "" #: build/models.py:152 build/templates/build/auto_allocate.html:16 -#: build/templates/build/build_base.html:118 +#: build/templates/build/build_base.html:128 #: build/templates/build/detail.html:26 company/models.py:622 #: order/models.py:658 order/models.py:691 #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:131 #: order/templates/order/receive_parts.html:19 #: order/templates/order/sales_order_detail.html:213 part/models.py:321 -#: part/models.py:1914 part/models.py:1926 part/models.py:1944 -#: part/models.py:2019 part/models.py:2115 part/models.py:2200 +#: part/models.py:1967 part/models.py:1979 part/models.py:1997 +#: part/models.py:2072 part/models.py:2168 part/models.py:2253 #: part/templates/part/part_app_base.html:8 -#: part/templates/part/part_pricing.html:9 part/templates/part/related.html:29 +#: part/templates/part/part_pricing.html:8 part/templates/part/related.html:29 #: part/templates/part/set_category.html:13 #: report/templates/report/inventree_build_order_base.html:110 #: report/templates/report/inventree_po_report.html:90 @@ -643,7 +645,7 @@ msgstr "" #: templates/js/build.js:741 templates/js/build.js:981 #: templates/js/company.js:140 templates/js/company.js:238 #: templates/js/part.js:233 templates/js/part.js:338 templates/js/stock.js:523 -#: templates/js/stock.js:1465 +#: templates/js/stock.js:1470 msgid "Part" msgstr "" @@ -691,7 +693,7 @@ msgstr "" msgid "Number of stock items which have been completed" msgstr "" -#: build/models.py:204 part/templates/part/part_base.html:160 +#: build/models.py:204 part/templates/part/part_base.html:167 msgid "Build Status" msgstr "" @@ -732,10 +734,10 @@ msgstr "" msgid "User who issued this build order" msgstr "" -#: build/models.py:250 build/templates/build/build_base.html:174 +#: build/models.py:250 build/templates/build/build_base.html:184 #: build/templates/build/detail.html:105 order/models.py:119 #: order/templates/order/order_base.html:138 -#: order/templates/order/sales_order_base.html:138 part/models.py:886 +#: order/templates/order/sales_order_base.html:140 part/models.py:886 #: report/templates/report/inventree_build_order_base.html:159 msgid "Responsible" msgstr "" @@ -749,8 +751,8 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:28 #: company/templates/company/supplier_part_base.html:78 #: company/templates/company/supplier_part_detail.html:28 -#: part/templates/part/detail.html:83 part/templates/part/part_base.html:101 -#: stock/models.py:458 stock/templates/stock/item_base.html:340 +#: part/templates/part/detail.html:83 part/templates/part/part_base.html:94 +#: stock/models.py:458 stock/templates/stock/item_base.html:345 msgid "External Link" msgstr "" @@ -768,12 +770,12 @@ msgstr "" #: order/templates/order/sales_order_detail.html:278 #: order/templates/order/so_navbar.html:33 #: order/templates/order/so_navbar.html:36 part/models.py:871 -#: part/templates/part/navbar.html:128 +#: part/templates/part/navbar.html:134 #: report/templates/report/inventree_build_order_base.html:173 #: stock/forms.py:173 stock/forms.py:317 stock/forms.py:349 stock/forms.py:377 #: stock/models.py:530 stock/models.py:1665 stock/models.py:1767 #: stock/templates/stock/navbar.html:57 templates/js/barcode.js:37 -#: templates/js/bom.js:333 templates/js/stock.js:128 templates/js/stock.js:671 +#: templates/js/bom.js:349 templates/js/stock.js:128 templates/js/stock.js:671 msgid "Notes" msgstr "" @@ -823,7 +825,7 @@ msgstr "" msgid "Quantity must be 1 for serialized stock" msgstr "" -#: build/models.py:1224 stock/templates/stock/item_base.html:312 +#: build/models.py:1224 stock/templates/stock/item_base.html:317 #: templates/InvenTree/search.html:183 templates/js/build.js:714 #: templates/navbar.html:29 msgid "Build" @@ -838,10 +840,10 @@ msgstr "" #: part/templates/part/allocation.html:31 #: part/templates/part/allocation.html:49 #: stock/templates/stock/item_base.html:8 -#: stock/templates/stock/item_base.html:93 -#: stock/templates/stock/item_base.html:334 +#: stock/templates/stock/item_base.html:31 +#: stock/templates/stock/item_base.html:339 #: stock/templates/stock/stock_adjust.html:16 templates/js/build.js:831 -#: templates/js/stock.js:1082 templates/js/stock.js:1384 +#: templates/js/stock.js:1087 templates/js/stock.js:1389 msgid "Stock Item" msgstr "" @@ -913,7 +915,7 @@ msgstr "" #: order/templates/order/sales_order_detail.html:75 #: order/templates/order/sales_order_detail.html:160 #: report/templates/report/inventree_test_report_base.html:75 -#: stock/models.py:452 stock/templates/stock/item_base.html:244 +#: stock/models.py:452 stock/templates/stock/item_base.html:249 #: templates/js/build.js:474 msgid "Serial Number" msgstr "" @@ -921,8 +923,8 @@ msgstr "" #: build/templates/build/attachments.html:12 #: build/templates/build/navbar.html:43 build/templates/build/navbar.html:46 #: order/templates/order/po_navbar.html:26 -#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:119 -#: part/templates/part/navbar.html:122 stock/templates/stock/navbar.html:47 +#: order/templates/order/so_navbar.html:29 part/templates/part/navbar.html:125 +#: part/templates/part/navbar.html:128 stock/templates/stock/navbar.html:47 #: stock/templates/stock/navbar.html:50 msgid "Attachments" msgstr "" @@ -943,119 +945,119 @@ msgstr "" msgid "Stock items will have to be manually allocated" msgstr "" -#: build/templates/build/build_base.html:16 +#: build/templates/build/build_base.html:18 #, python-format msgid "This Build Order is allocated to Sales Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:22 +#: build/templates/build/build_base.html:25 #, python-format msgid "This Build Order is a child of Build Order %(link)s" msgstr "" -#: build/templates/build/build_base.html:31 +#: build/templates/build/build_base.html:32 msgid "Build Order is ready to mark as completed" msgstr "" -#: build/templates/build/build_base.html:36 +#: build/templates/build/build_base.html:37 msgid "Build Order cannot be completed as outstanding outputs remain" msgstr "" -#: build/templates/build/build_base.html:41 +#: build/templates/build/build_base.html:42 msgid "Required build quantity has not yet been completed" msgstr "" -#: build/templates/build/build_base.html:46 +#: build/templates/build/build_base.html:47 msgid "Stock has not been fully allocated to this Build Order" msgstr "" -#: build/templates/build/build_base.html:65 +#: build/templates/build/build_base.html:75 #: company/templates/company/company_base.html:40 #: company/templates/company/manufacturer_part_base.html:25 #: company/templates/company/supplier_part_base.html:26 #: order/templates/order/order_base.html:26 -#: order/templates/order/sales_order_base.html:35 -#: part/templates/part/category.html:18 part/templates/part/part_base.html:29 -#: stock/templates/stock/item_base.html:124 +#: order/templates/order/sales_order_base.html:37 +#: part/templates/part/category.html:18 part/templates/part/part_base.html:22 +#: stock/templates/stock/item_base.html:62 #: stock/templates/stock/location.html:31 msgid "Admin view" msgstr "" -#: build/templates/build/build_base.html:71 -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:81 +#: build/templates/build/build_base.html:150 #: order/templates/order/order_base.html:32 #: order/templates/order/order_base.html:86 -#: order/templates/order/sales_order_base.html:41 -#: order/templates/order/sales_order_base.html:86 +#: order/templates/order/sales_order_base.html:43 +#: order/templates/order/sales_order_base.html:88 #: templates/js/table_filters.js:241 templates/js/table_filters.js:260 #: templates/js/table_filters.js:277 msgid "Overdue" msgstr "" -#: build/templates/build/build_base.html:80 +#: build/templates/build/build_base.html:90 msgid "Print actions" msgstr "" -#: build/templates/build/build_base.html:84 +#: build/templates/build/build_base.html:94 msgid "Print Build Order" msgstr "" -#: build/templates/build/build_base.html:90 -#: build/templates/build/build_base.html:215 +#: build/templates/build/build_base.html:100 +#: build/templates/build/build_base.html:225 msgid "Complete Build" msgstr "" -#: build/templates/build/build_base.html:95 +#: build/templates/build/build_base.html:105 msgid "Build actions" msgstr "" -#: build/templates/build/build_base.html:99 +#: build/templates/build/build_base.html:109 msgid "Edit Build" msgstr "" -#: build/templates/build/build_base.html:101 -#: build/templates/build/build_base.html:199 build/views.py:57 +#: build/templates/build/build_base.html:111 +#: build/templates/build/build_base.html:209 build/views.py:57 msgid "Cancel Build" msgstr "" -#: build/templates/build/build_base.html:114 +#: build/templates/build/build_base.html:124 #: build/templates/build/detail.html:11 msgid "Build Details" msgstr "" -#: build/templates/build/build_base.html:140 +#: build/templates/build/build_base.html:150 #, python-format msgid "This build was due on %(target)s" msgstr "" -#: build/templates/build/build_base.html:147 +#: build/templates/build/build_base.html:157 #: build/templates/build/detail.html:64 msgid "Progress" msgstr "" -#: build/templates/build/build_base.html:160 +#: build/templates/build/build_base.html:170 #: build/templates/build/detail.html:84 order/models.py:689 #: order/templates/order/sales_order_base.html:9 -#: order/templates/order/sales_order_base.html:33 +#: order/templates/order/sales_order_base.html:35 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:30 #: report/templates/report/inventree_build_order_base.html:136 #: report/templates/report/inventree_so_report.html:77 -#: stock/templates/stock/item_base.html:274 templates/js/order.js:245 +#: stock/templates/stock/item_base.html:279 templates/js/order.js:245 msgid "Sales Order" msgstr "" -#: build/templates/build/build_base.html:167 +#: build/templates/build/build_base.html:177 #: build/templates/build/detail.html:98 #: report/templates/report/inventree_build_order_base.html:153 msgid "Issued By" msgstr "" -#: build/templates/build/build_base.html:207 +#: build/templates/build/build_base.html:217 msgid "Incomplete Outputs" msgstr "" -#: build/templates/build/build_base.html:208 +#: build/templates/build/build_base.html:218 msgid "Build Order cannot be completed as incomplete build outputs remain" msgstr "" @@ -1191,15 +1193,15 @@ msgid "Destination location not specified" msgstr "" #: build/templates/build/detail.html:70 -#: stock/templates/stock/item_base.html:298 templates/js/stock.js:636 -#: templates/js/stock.js:1408 templates/js/table_filters.js:108 +#: stock/templates/stock/item_base.html:303 templates/js/stock.js:636 +#: templates/js/stock.js:1413 templates/js/table_filters.js:108 #: templates/js/table_filters.js:202 msgid "Batch" msgstr "" #: build/templates/build/detail.html:116 #: order/templates/order/order_base.html:111 -#: order/templates/order/sales_order_base.html:111 templates/js/build.js:778 +#: order/templates/order/sales_order_base.html:113 templates/js/build.js:778 msgid "Created" msgstr "" @@ -1282,8 +1284,8 @@ msgstr "" #: build/templates/build/notes.html:26 company/templates/company/notes.html:24 #: order/templates/order/order_notes.html:27 #: order/templates/order/sales_order_notes.html:29 -#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:477 -#: stock/templates/stock/item_base.html:487 +#: part/templates/part/notes.html:27 stock/templates/stock/item_base.html:482 +#: stock/templates/stock/item_base.html:492 #: stock/templates/stock/item_notes.html:26 msgid "Save" msgstr "" @@ -1429,7 +1431,7 @@ msgstr "" msgid "Add Build Order Attachment" msgstr "" -#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:172 +#: build/views.py:1083 order/views.py:115 order/views.py:167 part/views.py:173 #: stock/views.py:277 msgid "Added attachment" msgstr "" @@ -1466,368 +1468,360 @@ msgstr "" msgid "Error reading file (data could be corrupted)" msgstr "" -#: common/forms.py:38 templates/attachment_table.html:15 +#: common/forms.py:39 templates/attachment_table.html:15 msgid "File" msgstr "" -#: common/forms.py:39 +#: common/forms.py:40 msgid "Select file to upload" msgstr "" -#: common/forms.py:54 +#: common/forms.py:55 msgid "{name.title()} File" msgstr "" -#: common/forms.py:55 +#: common/forms.py:56 #, python-brace-format msgid "Select {name} file to upload" msgstr "" -#: common/models.py:58 +#: common/models.py:59 msgid "InvenTree Instance Name" msgstr "" -#: common/models.py:60 +#: common/models.py:61 msgid "String descriptor for the server instance" msgstr "" -#: common/models.py:64 +#: common/models.py:65 msgid "Use instance name" msgstr "" -#: common/models.py:65 +#: common/models.py:66 msgid "Use the instance name in the title-bar" msgstr "" -#: common/models.py:71 company/models.py:94 company/models.py:95 +#: common/models.py:72 company/models.py:94 company/models.py:95 msgid "Company name" msgstr "" -#: common/models.py:72 +#: common/models.py:73 msgid "Internal company name" msgstr "" -#: common/models.py:77 +#: common/models.py:78 msgid "Base URL" msgstr "" -#: common/models.py:78 +#: common/models.py:79 msgid "Base URL for server instance" msgstr "" -#: common/models.py:84 -msgid "Default Currency" -msgstr "" - #: common/models.py:85 -msgid "Default currency" -msgstr "" - -#: common/models.py:91 msgid "Download from URL" msgstr "" -#: common/models.py:92 +#: common/models.py:86 msgid "Allow download of remote images and files from external URL" msgstr "" -#: common/models.py:98 +#: common/models.py:92 msgid "Barcode Support" msgstr "" -#: common/models.py:99 +#: common/models.py:93 msgid "Enable barcode scanner support" msgstr "" -#: common/models.py:105 +#: common/models.py:99 msgid "IPN Regex" msgstr "" -#: common/models.py:106 +#: common/models.py:100 msgid "Regular expression pattern for matching Part IPN" msgstr "" -#: common/models.py:110 +#: common/models.py:104 msgid "Allow Duplicate IPN" msgstr "" -#: common/models.py:111 +#: common/models.py:105 msgid "Allow multiple parts to share the same IPN" msgstr "" -#: common/models.py:117 +#: common/models.py:111 msgid "Allow Editing IPN" msgstr "" -#: common/models.py:118 +#: common/models.py:112 msgid "Allow changing the IPN value while editing a part" msgstr "" -#: common/models.py:124 +#: common/models.py:118 msgid "Copy Part BOM Data" msgstr "" -#: common/models.py:125 +#: common/models.py:119 msgid "Copy BOM data by default when duplicating a part" msgstr "" -#: common/models.py:131 +#: common/models.py:125 msgid "Copy Part Parameter Data" msgstr "" -#: common/models.py:132 +#: common/models.py:126 msgid "Copy parameter data by default when duplicating a part" msgstr "" -#: common/models.py:138 +#: common/models.py:132 msgid "Copy Part Test Data" msgstr "" -#: common/models.py:139 +#: common/models.py:133 msgid "Copy test data by default when duplicating a part" msgstr "" -#: common/models.py:145 +#: common/models.py:139 msgid "Copy Category Parameter Templates" msgstr "" -#: common/models.py:146 +#: common/models.py:140 msgid "Copy category parameter templates when creating a part" msgstr "" -#: common/models.py:152 +#: common/models.py:146 msgid "Recent Part Count" msgstr "" -#: common/models.py:153 +#: common/models.py:147 msgid "Number of recent parts to display on index page" msgstr "" -#: common/models.py:159 part/models.py:2117 part/templates/part/detail.html:160 +#: common/models.py:153 part/models.py:2170 part/templates/part/detail.html:160 #: report/models.py:185 stock/forms.py:259 templates/js/table_filters.js:25 #: templates/js/table_filters.js:311 msgid "Template" msgstr "" -#: common/models.py:160 +#: common/models.py:154 msgid "Parts are templates by default" msgstr "" -#: common/models.py:166 part/models.py:834 part/templates/part/detail.html:170 +#: common/models.py:160 part/models.py:834 part/templates/part/detail.html:170 #: templates/js/table_filters.js:124 templates/js/table_filters.js:323 msgid "Assembly" msgstr "" -#: common/models.py:167 +#: common/models.py:161 msgid "Parts can be assembled from other components by default" msgstr "" -#: common/models.py:173 part/models.py:840 part/templates/part/detail.html:180 +#: common/models.py:167 part/models.py:840 part/templates/part/detail.html:180 #: templates/js/table_filters.js:327 msgid "Component" msgstr "" -#: common/models.py:174 +#: common/models.py:168 msgid "Parts can be used as sub-components by default" msgstr "" -#: common/models.py:180 part/models.py:851 part/templates/part/detail.html:200 +#: common/models.py:174 part/models.py:851 part/templates/part/detail.html:200 msgid "Purchaseable" msgstr "" -#: common/models.py:181 +#: common/models.py:175 msgid "Parts are purchaseable by default" msgstr "" -#: common/models.py:187 part/models.py:856 part/templates/part/detail.html:210 +#: common/models.py:181 part/models.py:856 part/templates/part/detail.html:210 #: templates/js/table_filters.js:335 msgid "Salable" msgstr "" -#: common/models.py:188 +#: common/models.py:182 msgid "Parts are salable by default" msgstr "" -#: common/models.py:194 part/models.py:846 part/templates/part/detail.html:190 +#: common/models.py:188 part/models.py:846 part/templates/part/detail.html:190 #: templates/js/table_filters.js:33 templates/js/table_filters.js:339 msgid "Trackable" msgstr "" -#: common/models.py:195 +#: common/models.py:189 msgid "Parts are trackable by default" msgstr "" -#: common/models.py:201 part/models.py:866 part/templates/part/detail.html:150 +#: common/models.py:195 part/models.py:866 part/templates/part/detail.html:150 #: templates/js/table_filters.js:29 msgid "Virtual" msgstr "" -#: common/models.py:202 +#: common/models.py:196 msgid "Parts are virtual by default" msgstr "" -#: common/models.py:208 +#: common/models.py:202 msgid "Show Quantity in Forms" msgstr "" -#: common/models.py:209 +#: common/models.py:203 msgid "Display available part quantity in some forms" msgstr "" -#: common/models.py:215 templates/stats.html:25 +#: common/models.py:209 templates/stats.html:25 msgid "Debug Mode" msgstr "" -#: common/models.py:216 +#: common/models.py:210 msgid "Generate reports in debug mode (HTML output)" msgstr "" -#: common/models.py:222 +#: common/models.py:216 msgid "Page Size" msgstr "" -#: common/models.py:223 +#: common/models.py:217 msgid "Default page size for PDF reports" msgstr "" -#: common/models.py:233 +#: common/models.py:227 msgid "Test Reports" msgstr "" -#: common/models.py:234 +#: common/models.py:228 msgid "Enable generation of test reports" msgstr "" -#: common/models.py:240 +#: common/models.py:234 msgid "Stock Expiry" msgstr "" -#: common/models.py:241 +#: common/models.py:235 msgid "Enable stock expiry functionality" msgstr "" -#: common/models.py:247 +#: common/models.py:241 msgid "Sell Expired Stock" msgstr "" -#: common/models.py:248 +#: common/models.py:242 msgid "Allow sale of expired stock" msgstr "" -#: common/models.py:254 +#: common/models.py:248 msgid "Stock Stale Time" msgstr "" -#: common/models.py:255 +#: common/models.py:249 msgid "Number of days stock items are considered stale before expiring" msgstr "" -#: common/models.py:257 part/templates/part/detail.html:121 +#: common/models.py:251 part/templates/part/detail.html:121 msgid "days" msgstr "" -#: common/models.py:262 +#: common/models.py:256 msgid "Build Expired Stock" msgstr "" -#: common/models.py:263 +#: common/models.py:257 msgid "Allow building with expired stock" msgstr "" -#: common/models.py:269 +#: common/models.py:263 msgid "Stock Ownership Control" msgstr "" -#: common/models.py:270 +#: common/models.py:264 msgid "Enable ownership control over stock locations and items" msgstr "" -#: common/models.py:276 +#: common/models.py:270 msgid "Group by Part" msgstr "" -#: common/models.py:277 +#: common/models.py:271 msgid "Group stock items by part reference in table views" msgstr "" -#: common/models.py:283 +#: common/models.py:277 msgid "Recent Stock Count" msgstr "" -#: common/models.py:284 +#: common/models.py:278 msgid "Number of recent stock items to display on index page" msgstr "" -#: common/models.py:290 +#: common/models.py:284 msgid "Build Order Reference Prefix" msgstr "" -#: common/models.py:291 +#: common/models.py:285 msgid "Prefix value for build order reference" msgstr "" -#: common/models.py:296 +#: common/models.py:290 msgid "Build Order Reference Regex" msgstr "" -#: common/models.py:297 +#: common/models.py:291 msgid "Regular expression pattern for matching build order reference" msgstr "" -#: common/models.py:301 +#: common/models.py:295 msgid "Sales Order Reference Prefix" msgstr "" -#: common/models.py:302 +#: common/models.py:296 msgid "Prefix value for sales order reference" msgstr "" -#: common/models.py:307 +#: common/models.py:301 msgid "Purchase Order Reference Prefix" msgstr "" -#: common/models.py:308 +#: common/models.py:302 msgid "Prefix value for purchase order reference" msgstr "" -#: common/models.py:531 +#: common/models.py:525 msgid "Settings key (must be unique - case insensitive" msgstr "" -#: common/models.py:533 +#: common/models.py:527 msgid "Settings value" msgstr "" -#: common/models.py:568 +#: common/models.py:562 msgid "Must be an integer value" msgstr "" -#: common/models.py:591 +#: common/models.py:585 msgid "Value must be a boolean value" msgstr "" -#: common/models.py:602 +#: common/models.py:596 msgid "Value must be an integer value" msgstr "" -#: common/models.py:625 +#: common/models.py:619 msgid "Key string must be unique" msgstr "" -#: common/models.py:706 company/forms.py:177 +#: common/models.py:700 company/forms.py:177 msgid "Price break quantity" msgstr "" -#: common/models.py:714 company/templates/company/supplier_part_pricing.html:82 -#: part/templates/part/sale_prices.html:90 templates/js/bom.js:255 +#: common/models.py:708 company/templates/company/supplier_part_pricing.html:82 +#: part/templates/part/sale_prices.html:90 templates/js/bom.js:271 msgid "Price" msgstr "" -#: common/models.py:715 +#: common/models.py:709 msgid "Unit price at specified quantity" msgstr "" -#: common/models.py:804 +#: common/models.py:798 msgid "Default" msgstr "" @@ -1882,7 +1876,7 @@ msgstr "" msgid "Image URL" msgstr "" -#: company/forms.py:118 +#: company/forms.py:118 templates/js/part.js:708 msgid "Single Price" msgstr "" @@ -1998,7 +1992,7 @@ msgid "Does this company manufacture parts?" msgstr "" #: company/models.py:305 company/models.py:456 stock/models.py:405 -#: stock/templates/stock/item_base.html:230 +#: stock/templates/stock/item_base.html:235 msgid "Base Part" msgstr "" @@ -2011,7 +2005,7 @@ msgstr "" #: company/templates/company/manufacturer_part_detail.html:25 #: company/templates/company/supplier_part_base.html:94 #: company/templates/company/supplier_part_detail.html:34 part/bom.py:170 -#: part/bom.py:241 stock/templates/stock/item_base.html:347 +#: part/bom.py:241 stock/templates/stock/item_base.html:352 #: templates/js/company.js:44 templates/js/company.js:165 #: templates/js/company.js:289 msgid "Manufacturer" @@ -2030,7 +2024,7 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:25 order/models.py:190 #: order/templates/order/order_base.html:92 #: order/templates/order/order_wizard/select_pos.html:30 part/bom.py:175 -#: part/bom.py:286 stock/templates/stock/item_base.html:359 +#: part/bom.py:286 stock/templates/stock/item_base.html:364 #: templates/js/company.js:48 templates/js/company.js:263 #: templates/js/order.js:170 msgid "Supplier" @@ -2054,7 +2048,7 @@ msgstr "" #: company/models.py:479 #: company/templates/company/manufacturer_part_base.html:6 #: company/templates/company/manufacturer_part_base.html:19 -#: stock/templates/stock/item_base.html:352 +#: stock/templates/stock/item_base.html:357 msgid "Manufacturer Part" msgstr "" @@ -2071,7 +2065,7 @@ msgid "Supplier part description" msgstr "" #: company/models.py:497 company/templates/company/supplier_part_base.html:116 -#: company/templates/company/supplier_part_detail.html:38 part/models.py:2228 +#: company/templates/company/supplier_part_detail.html:38 part/models.py:2281 #: report/templates/report/inventree_po_report.html:93 #: report/templates/report/inventree_so_report.html:93 msgid "Note" @@ -2086,7 +2080,7 @@ msgid "Minimum charge (e.g. stocking fee)" msgstr "" #: company/models.py:503 company/templates/company/supplier_part_base.html:109 -#: stock/models.py:429 stock/templates/stock/item_base.html:305 +#: stock/models.py:429 stock/templates/stock/item_base.html:310 #: templates/js/stock.js:667 msgid "Packaging" msgstr "" @@ -2154,7 +2148,8 @@ msgstr "" #: company/templates/company/delete.html:12 #, python-format -msgid "There are %(count)s parts sourced from this company.
    \n" +msgid "" +"There are %(count)s parts sourced from this company.
    \n" "If this supplier is deleted, these supplier part entries will also be deleted." msgstr "" @@ -2171,10 +2166,10 @@ msgid "Uses default currency" msgstr "" #: company/templates/company/detail.html:67 order/models.py:461 -#: order/templates/order/sales_order_base.html:92 stock/models.py:447 -#: stock/models.py:448 stock/templates/stock/item_base.html:257 +#: order/templates/order/sales_order_base.html:94 stock/models.py:447 +#: stock/models.py:448 stock/templates/stock/item_base.html:262 #: templates/js/company.js:40 templates/js/order.js:267 -#: templates/js/stock.js:1064 +#: templates/js/stock.js:1069 msgid "Customer" msgstr "" @@ -2220,7 +2215,7 @@ msgstr "" #: company/templates/company/detail_manufacturer_part.html:66 #: company/templates/company/detail_supplier_part.html:66 #: part/templates/part/bom.html:159 part/templates/part/category.html:118 -#: templates/js/stock.js:1279 +#: templates/js/stock.js:1284 msgid "New Part" msgstr "" @@ -2267,7 +2262,7 @@ msgstr "" #: company/templates/company/detail_supplier_part.html:22 #: company/templates/company/manufacturer_part_suppliers.html:17 #: order/templates/order/purchase_order_detail.html:49 -#: part/templates/part/supplier.html:17 templates/js/stock.js:1285 +#: part/templates/part/supplier.html:17 templates/js/stock.js:1290 msgid "New Supplier Part" msgstr "" @@ -2290,7 +2285,7 @@ msgstr "" #: company/templates/company/manufacturer_part_base.html:36 #: company/templates/company/supplier_part_base.html:36 #: company/templates/company/supplier_part_orders.html:17 -#: part/templates/part/orders.html:17 part/templates/part/part_base.html:65 +#: part/templates/part/orders.html:17 part/templates/part/part_base.html:58 msgid "Order part" msgstr "" @@ -2324,8 +2319,8 @@ msgid "There are %(count)s suppliers defined for this manufacturer part. If you msgstr "" #: company/templates/company/manufacturer_part_navbar.html:14 -#: company/views.py:63 part/templates/part/navbar.html:78 -#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:316 +#: company/views.py:63 part/templates/part/navbar.html:84 +#: part/templates/part/navbar.html:87 templates/InvenTree/search.html:316 #: templates/navbar.html:35 msgid "Suppliers" msgstr "" @@ -2342,7 +2337,7 @@ msgstr "" #: stock/templates/stock/stock_app_base.html:10 #: templates/InvenTree/index.html:128 templates/InvenTree/search.html:196 #: templates/InvenTree/search.html:232 -#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:173 +#: templates/InvenTree/settings/tabs.html:31 templates/js/part.js:173 #: templates/js/part.js:398 templates/js/stock.js:563 templates/navbar.html:26 msgid "Stock" msgstr "" @@ -2400,10 +2395,10 @@ msgstr "" #: company/templates/company/sales_orders.html:11 #: order/templates/order/sales_orders.html:8 #: order/templates/order/sales_orders.html:13 -#: part/templates/part/navbar.html:98 part/templates/part/navbar.html:101 +#: part/templates/part/navbar.html:104 part/templates/part/navbar.html:107 #: part/templates/part/sales_orders.html:10 templates/InvenTree/index.html:228 #: templates/InvenTree/search.html:345 -#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:46 +#: templates/InvenTree/settings/tabs.html:40 templates/navbar.html:46 #: users/models.py:45 msgid "Sales Orders" msgstr "" @@ -2412,10 +2407,10 @@ msgstr "" #: company/templates/company/purchase_orders.html:10 #: order/templates/order/purchase_orders.html:8 #: order/templates/order/purchase_orders.html:13 -#: part/templates/part/navbar.html:84 part/templates/part/navbar.html:87 +#: part/templates/part/navbar.html:90 part/templates/part/navbar.html:93 #: part/templates/part/orders.html:10 templates/InvenTree/index.html:205 #: templates/InvenTree/search.html:325 -#: templates/InvenTree/settings/tabs.html:34 templates/navbar.html:37 +#: templates/InvenTree/settings/tabs.html:37 templates/navbar.html:37 #: users/models.py:44 msgid "Purchase Orders" msgstr "" @@ -2446,7 +2441,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:7 #: company/templates/company/supplier_part_base.html:20 stock/models.py:414 -#: stock/templates/stock/item_base.html:364 templates/js/company.js:279 +#: stock/templates/stock/item_base.html:369 templates/js/company.js:279 msgid "Supplier Part" msgstr "" @@ -2495,7 +2490,7 @@ msgid "Pricing Information" msgstr "" #: company/templates/company/supplier_part_pricing.html:19 company/views.py:794 -#: part/templates/part/sale_prices.html:17 part/views.py:2644 +#: part/templates/part/sale_prices.html:17 part/views.py:2733 msgid "Add Price Break" msgstr "" @@ -2514,8 +2509,8 @@ msgstr "" msgid "Delete price break" msgstr "" -#: company/views.py:70 part/templates/part/navbar.html:72 -#: part/templates/part/navbar.html:75 templates/InvenTree/search.html:306 +#: company/views.py:70 part/templates/part/navbar.html:78 +#: part/templates/part/navbar.html:81 templates/InvenTree/search.html:306 #: templates/navbar.html:36 msgid "Manufacturers" msgstr "" @@ -2537,20 +2532,20 @@ msgstr "" msgid "New Company" msgstr "" -#: company/views.py:169 part/views.py:848 +#: company/views.py:169 part/views.py:937 msgid "Download Image" msgstr "" -#: company/views.py:198 part/views.py:880 +#: company/views.py:198 part/views.py:969 msgid "Image size exceeds maximum allowable size for download" msgstr "" -#: company/views.py:205 part/views.py:887 +#: company/views.py:205 part/views.py:976 #, python-brace-format msgid "Invalid response: {code}" msgstr "" -#: company/views.py:214 part/views.py:896 +#: company/views.py:214 part/views.py:985 msgid "Supplied URL is not a valid image file" msgstr "" @@ -2602,7 +2597,7 @@ msgstr "" msgid "Edit Supplier Part" msgstr "" -#: company/views.py:578 templates/js/stock.js:1286 +#: company/views.py:578 templates/js/stock.js:1291 msgid "Create new Supplier Part" msgstr "" @@ -2610,15 +2605,15 @@ msgstr "" msgid "Delete Supplier Part" msgstr "" -#: company/views.py:799 part/views.py:2648 +#: company/views.py:799 part/views.py:2737 msgid "Added new price break" msgstr "" -#: company/views.py:855 part/views.py:2692 +#: company/views.py:855 part/views.py:2781 msgid "Edit Price Break" msgstr "" -#: company/views.py:870 part/views.py:2706 +#: company/views.py:870 part/views.py:2795 msgid "Delete Price Break" msgstr "" @@ -2692,11 +2687,11 @@ msgid "Mark order as complete" msgstr "" #: order/forms.py:49 order/forms.py:60 order/templates/order/order_base.html:59 -#: order/templates/order/sales_order_base.html:59 +#: order/templates/order/sales_order_base.html:61 msgid "Cancel order" msgstr "" -#: order/forms.py:71 order/templates/order/sales_order_base.html:56 +#: order/forms.py:71 order/templates/order/sales_order_base.html:58 msgid "Ship order" msgstr "" @@ -2793,7 +2788,7 @@ msgstr "" msgid "Date order was completed" msgstr "" -#: order/models.py:243 part/views.py:1586 stock/models.py:302 +#: order/models.py:243 part/views.py:1675 stock/models.py:302 #: stock/models.py:1018 msgid "Quantity must be greater than zero" msgstr "" @@ -2859,8 +2854,8 @@ msgstr "" #: order/models.py:645 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:24 #: report/templates/report/inventree_po_report.html:77 -#: stock/templates/stock/item_base.html:319 templates/js/order.js:148 -#: templates/js/stock.js:1045 +#: stock/templates/stock/item_base.html:324 templates/js/order.js:148 +#: templates/js/stock.js:1050 msgid "Purchase Order" msgstr "" @@ -2871,7 +2866,7 @@ msgstr "" #: order/models.py:662 order/templates/order/order_base.html:131 #: order/templates/order/purchase_order_detail.html:189 #: order/templates/order/receive_parts.html:22 -#: order/templates/order/sales_order_base.html:131 +#: order/templates/order/sales_order_base.html:133 msgid "Received" msgstr "" @@ -2880,7 +2875,7 @@ msgid "Number of items received" msgstr "" #: order/models.py:669 stock/models.py:540 -#: stock/templates/stock/item_base.html:326 +#: stock/templates/stock/item_base.html:331 msgid "Purchase Price" msgstr "" @@ -2888,8 +2883,9 @@ msgstr "" msgid "Unit purchase price" msgstr "" -#: order/models.py:698 part/templates/part/navbar.html:95 -#: part/templates/part/part_pricing.html:78 +#: order/models.py:698 part/templates/part/navbar.html:101 +#: part/templates/part/order_prices.html:82 +#: part/templates/part/part_pricing.html:77 msgid "Sale Price" msgstr "" @@ -2940,12 +2936,12 @@ msgid "Are you sure you want to delete this attachment?" msgstr "" #: order/templates/order/order_base.html:39 -#: order/templates/order/sales_order_base.html:48 +#: order/templates/order/sales_order_base.html:50 msgid "Print" msgstr "" #: order/templates/order/order_base.html:43 -#: order/templates/order/sales_order_base.html:52 +#: order/templates/order/sales_order_base.html:54 msgid "Edit order information" msgstr "" @@ -2963,12 +2959,12 @@ msgid "Purchase Order Details" msgstr "" #: order/templates/order/order_base.html:77 -#: order/templates/order/sales_order_base.html:77 +#: order/templates/order/sales_order_base.html:79 msgid "Order Reference" msgstr "" #: order/templates/order/order_base.html:82 -#: order/templates/order/sales_order_base.html:82 +#: order/templates/order/sales_order_base.html:84 msgid "Order Status" msgstr "" @@ -2981,7 +2977,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:100 #: part/templates/part/category.html:185 part/templates/part/category.html:227 #: stock/templates/stock/location.html:191 templates/js/stock.js:708 -#: templates/js/stock.js:1291 +#: templates/js/stock.js:1296 msgid "New Location" msgstr "" @@ -3193,14 +3189,14 @@ msgstr "" msgid "Receive outstanding parts for %(order)s - %(desc)s" msgstr "" -#: order/templates/order/receive_parts.html:14 part/api.py:40 +#: order/templates/order/receive_parts.html:14 part/api.py:45 #: part/models.py:322 part/templates/part/cat_link.html:7 #: part/templates/part/category.html:99 #: part/templates/part/category_navbar.html:22 #: part/templates/part/category_navbar.html:29 #: part/templates/part/category_partlist.html:10 #: templates/InvenTree/index.html:97 templates/InvenTree/search.html:114 -#: templates/InvenTree/settings/tabs.html:25 templates/js/part.js:577 +#: templates/InvenTree/settings/tabs.html:28 templates/js/part.js:577 #: templates/navbar.html:23 templates/stats.html:80 templates/stats.html:89 #: users/models.py:40 msgid "Parts" @@ -3215,7 +3211,7 @@ msgid "Order Code" msgstr "" #: order/templates/order/receive_parts.html:21 -#: part/templates/part/part_base.html:129 templates/js/part.js:414 +#: part/templates/part/part_base.html:136 templates/js/part.js:414 msgid "On Order" msgstr "" @@ -3231,20 +3227,20 @@ msgstr "" msgid "Remove line" msgstr "" -#: order/templates/order/sales_order_base.html:15 -msgid "This SalesOrder has not been fully allocated" +#: order/templates/order/sales_order_base.html:16 +msgid "This Sales Order has not been fully allocated" msgstr "" -#: order/templates/order/sales_order_base.html:64 +#: order/templates/order/sales_order_base.html:66 msgid "Packing List" msgstr "" -#: order/templates/order/sales_order_base.html:72 +#: order/templates/order/sales_order_base.html:74 #: order/templates/order/so_navbar.html:12 msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:98 templates/js/order.js:275 +#: order/templates/order/sales_order_base.html:100 templates/js/order.js:275 msgid "Customer Reference" msgstr "" @@ -3263,7 +3259,7 @@ msgstr "" msgid "Sales Order Items" msgstr "" -#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:342 +#: order/templates/order/sales_order_detail.html:95 templates/js/bom.js:358 #: templates/js/build.js:627 templates/js/build.js:1044 msgid "Actions" msgstr "" @@ -3558,7 +3554,7 @@ msgstr "" msgid "Default Location" msgstr "" -#: part/bom.py:139 part/templates/part/part_base.html:117 +#: part/bom.py:139 part/templates/part/part_base.html:124 msgid "Available Stock" msgstr "" @@ -3631,7 +3627,7 @@ msgstr "" msgid "Include part supplier data in exported BOM" msgstr "" -#: part/forms.py:122 part/models.py:2115 +#: part/forms.py:122 part/models.py:2168 msgid "Parent Part" msgstr "" @@ -3707,7 +3703,7 @@ msgstr "" msgid "Add parameter template to all categories" msgstr "" -#: part/forms.py:344 part/models.py:2209 +#: part/forms.py:344 part/models.py:2262 msgid "Sub part" msgstr "" @@ -3727,7 +3723,7 @@ msgstr "" msgid "Default keywords for parts in this category" msgstr "" -#: part/models.py:82 part/models.py:2161 +#: part/models.py:82 part/models.py:2214 #: part/templates/part/part_app_base.html:10 msgid "Part Category" msgstr "" @@ -3797,7 +3793,7 @@ msgstr "" msgid "Part keywords to improve visibility in search results" msgstr "" -#: part/models.py:724 part/models.py:2160 part/templates/part/detail.html:73 +#: part/models.py:724 part/models.py:2213 part/templates/part/detail.html:73 #: part/templates/part/set_category.html:15 templates/js/part.js:385 msgid "Category" msgstr "" @@ -3807,7 +3803,7 @@ msgid "Part category" msgstr "" #: part/models.py:730 part/templates/part/detail.html:28 -#: part/templates/part/part_base.html:94 templates/js/part.js:161 +#: part/templates/part/part_base.html:87 templates/js/part.js:161 msgid "IPN" msgstr "" @@ -3852,7 +3848,7 @@ msgstr "" msgid "Minimum allowed stock level" msgstr "" -#: part/models.py:828 part/models.py:2089 part/templates/part/detail.html:106 +#: part/models.py:828 part/models.py:2142 part/templates/part/detail.html:106 #: part/templates/part/params.html:29 msgid "Units" msgstr "" @@ -3923,167 +3919,167 @@ msgstr "" msgid "Sell multiple" msgstr "" -#: part/models.py:1987 +#: part/models.py:2040 msgid "Test templates can only be created for trackable parts" msgstr "" -#: part/models.py:2004 +#: part/models.py:2057 msgid "Test with this name already exists for this part" msgstr "" -#: part/models.py:2024 templates/js/part.js:638 templates/js/stock.js:104 +#: part/models.py:2077 templates/js/part.js:638 templates/js/stock.js:104 msgid "Test Name" msgstr "" -#: part/models.py:2025 +#: part/models.py:2078 msgid "Enter a name for the test" msgstr "" -#: part/models.py:2030 +#: part/models.py:2083 msgid "Test Description" msgstr "" -#: part/models.py:2031 +#: part/models.py:2084 msgid "Enter description for this test" msgstr "" -#: part/models.py:2036 templates/js/part.js:647 +#: part/models.py:2089 templates/js/part.js:647 #: templates/js/table_filters.js:223 msgid "Required" msgstr "" -#: part/models.py:2037 +#: part/models.py:2090 msgid "Is this test required to pass?" msgstr "" -#: part/models.py:2042 templates/js/part.js:655 +#: part/models.py:2095 templates/js/part.js:655 msgid "Requires Value" msgstr "" -#: part/models.py:2043 +#: part/models.py:2096 msgid "Does this test require a value when adding a test result?" msgstr "" -#: part/models.py:2048 templates/js/part.js:662 +#: part/models.py:2101 templates/js/part.js:662 msgid "Requires Attachment" msgstr "" -#: part/models.py:2049 +#: part/models.py:2102 msgid "Does this test require a file attachment when adding a test result?" msgstr "" -#: part/models.py:2082 +#: part/models.py:2135 msgid "Parameter template name must be unique" msgstr "" -#: part/models.py:2087 +#: part/models.py:2140 msgid "Parameter Name" msgstr "" -#: part/models.py:2089 +#: part/models.py:2142 msgid "Parameter Units" msgstr "" -#: part/models.py:2117 part/models.py:2166 part/models.py:2167 +#: part/models.py:2170 part/models.py:2219 part/models.py:2220 #: templates/InvenTree/settings/category.html:62 msgid "Parameter Template" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Data" msgstr "" -#: part/models.py:2119 +#: part/models.py:2172 msgid "Parameter Value" msgstr "" -#: part/models.py:2171 templates/InvenTree/settings/category.html:67 +#: part/models.py:2224 templates/InvenTree/settings/category.html:67 msgid "Default Value" msgstr "" -#: part/models.py:2172 +#: part/models.py:2225 msgid "Default Parameter Value" msgstr "" -#: part/models.py:2201 +#: part/models.py:2254 msgid "Select parent part" msgstr "" -#: part/models.py:2210 +#: part/models.py:2263 msgid "Select part to be used in BOM" msgstr "" -#: part/models.py:2216 +#: part/models.py:2269 msgid "BOM quantity for this BOM item" msgstr "" -#: part/models.py:2218 templates/js/bom.js:216 templates/js/bom.js:269 +#: part/models.py:2271 templates/js/bom.js:216 templates/js/bom.js:285 msgid "Optional" msgstr "" -#: part/models.py:2218 +#: part/models.py:2271 msgid "This BOM item is optional" msgstr "" -#: part/models.py:2221 +#: part/models.py:2274 msgid "Overage" msgstr "" -#: part/models.py:2222 +#: part/models.py:2275 msgid "Estimated build wastage quantity (absolute or percentage)" msgstr "" -#: part/models.py:2225 +#: part/models.py:2278 msgid "BOM item reference" msgstr "" -#: part/models.py:2228 +#: part/models.py:2281 msgid "BOM item notes" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "Checksum" msgstr "" -#: part/models.py:2230 +#: part/models.py:2283 msgid "BOM line checksum" msgstr "" -#: part/models.py:2234 templates/js/bom.js:279 templates/js/bom.js:286 +#: part/models.py:2287 templates/js/bom.js:295 templates/js/bom.js:302 #: templates/js/table_filters.js:51 msgid "Inherited" msgstr "" -#: part/models.py:2235 +#: part/models.py:2288 msgid "This BOM item is inherited by BOMs for variant parts" msgstr "" -#: part/models.py:2311 part/views.py:1592 part/views.py:1644 +#: part/models.py:2364 part/views.py:1681 part/views.py:1733 #: stock/models.py:292 msgid "Quantity must be integer value for trackable parts" msgstr "" -#: part/models.py:2320 part/models.py:2322 +#: part/models.py:2373 part/models.py:2375 msgid "Sub part must be specified" msgstr "" -#: part/models.py:2325 +#: part/models.py:2378 msgid "BOM Item" msgstr "" -#: part/models.py:2442 +#: part/models.py:2495 msgid "Part 1" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Part 2" msgstr "" -#: part/models.py:2446 +#: part/models.py:2499 msgid "Select Related Part" msgstr "" -#: part/models.py:2478 +#: part/models.py:2531 msgid "Error creating relationship: check that the part is not related to itself and that the relationship is unique" msgstr "" @@ -4151,7 +4147,7 @@ msgstr "" msgid "Validate Bill of Materials" msgstr "" -#: part/templates/part/bom.html:61 part/views.py:1887 +#: part/templates/part/bom.html:61 part/views.py:1976 msgid "Export Bill of Materials" msgstr "" @@ -4167,8 +4163,8 @@ msgstr "" msgid "All selected BOM items will be deleted" msgstr "" -#: part/templates/part/bom.html:160 part/views.py:584 -#: templates/js/stock.js:1280 +#: part/templates/part/bom.html:160 part/views.py:585 +#: templates/js/stock.js:1285 msgid "Create New Part" msgstr "" @@ -4249,7 +4245,7 @@ msgstr "" msgid "All parts" msgstr "" -#: part/templates/part/category.html:29 part/views.py:2290 +#: part/templates/part/category.html:29 part/views.py:2379 msgid "Create new part category" msgstr "" @@ -4367,7 +4363,7 @@ msgstr "" msgid "Part Parameters" msgstr "" -#: part/templates/part/copy_part.html:9 part/views.py:460 +#: part/templates/part/copy_part.html:9 part/views.py:461 msgid "Duplicate Part" msgstr "" @@ -4504,27 +4500,111 @@ msgstr "" msgid "Used In" msgstr "" -#: part/templates/part/navbar.html:92 +#: part/templates/part/navbar.html:72 part/templates/part/order_prices.html:12 +msgid "Order Price Information" +msgstr "" + +#: part/templates/part/navbar.html:75 +msgid "Order Price" +msgstr "" + +#: part/templates/part/navbar.html:98 msgid "Sales Price Information" msgstr "" -#: part/templates/part/navbar.html:106 part/templates/part/part_tests.html:10 +#: part/templates/part/navbar.html:112 part/templates/part/part_tests.html:10 msgid "Part Test Templates" msgstr "" -#: part/templates/part/navbar.html:109 stock/templates/stock/item_base.html:404 +#: part/templates/part/navbar.html:115 stock/templates/stock/item_base.html:409 msgid "Tests" msgstr "" -#: part/templates/part/navbar.html:113 part/templates/part/navbar.html:116 +#: part/templates/part/navbar.html:119 part/templates/part/navbar.html:122 #: part/templates/part/related.html:10 msgid "Related Parts" msgstr "" -#: part/templates/part/navbar.html:125 part/templates/part/notes.html:12 +#: part/templates/part/navbar.html:131 part/templates/part/notes.html:12 msgid "Part Notes" msgstr "" +#: part/templates/part/order_prices.html:21 +msgid "Pricing ranges" +msgstr "" + +#: part/templates/part/order_prices.html:26 +#: part/templates/part/part_pricing.html:18 +msgid "Supplier Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:27 +#: part/templates/part/order_prices.html:52 +#: part/templates/part/order_prices.html:83 +#: part/templates/part/part_pricing.html:22 +#: part/templates/part/part_pricing.html:48 +#: part/templates/part/part_pricing.html:80 +msgid "Unit Cost" +msgstr "" + +#: part/templates/part/order_prices.html:34 +#: part/templates/part/order_prices.html:59 +#: part/templates/part/order_prices.html:88 +#: part/templates/part/part_pricing.html:28 +#: part/templates/part/part_pricing.html:54 +#: part/templates/part/part_pricing.html:84 +msgid "Total Cost" +msgstr "" + +#: part/templates/part/order_prices.html:42 +#: part/templates/part/part_pricing.html:36 +msgid "No supplier pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:51 +#: part/templates/part/order_prices.html:103 +#: part/templates/part/part_pricing.html:44 +msgid "BOM Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:67 +#: part/templates/part/part_pricing.html:62 +msgid "Note: BOM pricing is incomplete for this part" +msgstr "" + +#: part/templates/part/order_prices.html:74 +#: part/templates/part/part_pricing.html:69 +msgid "No BOM pricing available" +msgstr "" + +#: part/templates/part/order_prices.html:97 +#: part/templates/part/part_pricing.html:93 +msgid "No pricing information is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:113 +msgid "Stock Pricing" +msgstr "" + +#: part/templates/part/order_prices.html:121 +msgid "No stock pricing history is available for this part." +msgstr "" + +#: part/templates/part/order_prices.html:140 +#, python-format +msgid "Single Price - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:152 +#, python-format +msgid "Single Price Difference - %(currency)s" +msgstr "" + +#: part/templates/part/order_prices.html:163 +#, python-format +msgid "Part Single Price - %(currency)s" +msgstr "" + #: part/templates/part/params.html:17 msgid "Add new parameter" msgstr "" @@ -4558,126 +4638,94 @@ msgstr "" msgid "Part List" msgstr "" -#: part/templates/part/part_base.html:18 -#, python-format -msgid "This part is a variant of %(link)s" -msgstr "" - -#: part/templates/part/part_base.html:33 templates/js/company.js:156 +#: part/templates/part/part_base.html:26 templates/js/company.js:156 #: templates/js/company.js:254 templates/js/part.js:76 templates/js/part.js:153 msgid "Inactive" msgstr "" -#: part/templates/part/part_base.html:40 +#: part/templates/part/part_base.html:33 msgid "Star this part" msgstr "" -#: part/templates/part/part_base.html:47 -#: stock/templates/stock/item_base.html:137 +#: part/templates/part/part_base.html:40 +#: stock/templates/stock/item_base.html:75 #: stock/templates/stock/location.html:51 msgid "Barcode actions" msgstr "" -#: part/templates/part/part_base.html:49 -#: stock/templates/stock/item_base.html:139 +#: part/templates/part/part_base.html:42 +#: stock/templates/stock/item_base.html:77 #: stock/templates/stock/location.html:53 templates/qr_button.html:1 msgid "Show QR Code" msgstr "" -#: part/templates/part/part_base.html:50 -#: stock/templates/stock/item_base.html:155 +#: part/templates/part/part_base.html:43 +#: stock/templates/stock/item_base.html:93 #: stock/templates/stock/location.html:54 msgid "Print Label" msgstr "" -#: part/templates/part/part_base.html:55 +#: part/templates/part/part_base.html:48 msgid "Show pricing information" msgstr "" -#: part/templates/part/part_base.html:59 +#: part/templates/part/part_base.html:52 msgid "Count part stock" msgstr "" -#: part/templates/part/part_base.html:74 +#: part/templates/part/part_base.html:67 msgid "Part actions" msgstr "" -#: part/templates/part/part_base.html:77 +#: part/templates/part/part_base.html:70 msgid "Duplicate part" msgstr "" -#: part/templates/part/part_base.html:80 +#: part/templates/part/part_base.html:73 msgid "Edit part" msgstr "" -#: part/templates/part/part_base.html:83 +#: part/templates/part/part_base.html:76 msgid "Delete part" msgstr "" -#: part/templates/part/part_base.html:123 templates/js/table_filters.js:157 +#: part/templates/part/part_base.html:107 +msgid "This is a virtual part" +msgstr "" + +#: part/templates/part/part_base.html:113 +#, python-format +msgid "This part is a variant of %(link)s" +msgstr "" + +#: part/templates/part/part_base.html:130 templates/js/table_filters.js:157 msgid "In Stock" msgstr "" -#: part/templates/part/part_base.html:136 templates/InvenTree/index.html:131 +#: part/templates/part/part_base.html:143 templates/InvenTree/index.html:131 msgid "Required for Build Orders" msgstr "" -#: part/templates/part/part_base.html:143 +#: part/templates/part/part_base.html:150 msgid "Required for Sales Orders" msgstr "" -#: part/templates/part/part_base.html:150 +#: part/templates/part/part_base.html:157 msgid "Allocated to Orders" msgstr "" -#: part/templates/part/part_base.html:165 templates/js/bom.js:300 +#: part/templates/part/part_base.html:172 templates/js/bom.js:316 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:171 templates/js/part.js:418 +#: part/templates/part/part_base.html:178 templates/js/part.js:418 msgid "Building" msgstr "" -#: part/templates/part/part_base.html:250 +#: part/templates/part/part_base.html:257 msgid "Calculate" msgstr "" -#: part/templates/part/part_pricing.html:19 -msgid "Supplier Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:23 -#: part/templates/part/part_pricing.html:49 -#: part/templates/part/part_pricing.html:81 -msgid "Unit Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:29 -#: part/templates/part/part_pricing.html:55 -#: part/templates/part/part_pricing.html:85 -msgid "Total Cost" -msgstr "" - -#: part/templates/part/part_pricing.html:37 -msgid "No supplier pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:45 -msgid "BOM Pricing" -msgstr "" - -#: part/templates/part/part_pricing.html:63 -msgid "Note: BOM pricing is incomplete for this part" -msgstr "" - -#: part/templates/part/part_pricing.html:70 -msgid "No BOM pricing available" -msgstr "" - -#: part/templates/part/part_pricing.html:94 -msgid "No pricing information is available for this part." -msgstr "" - #: part/templates/part/part_tests.html:17 msgid "Add Test Template" msgstr "" @@ -4787,212 +4835,212 @@ msgstr "" msgid "Unknown database" msgstr "" -#: part/views.py:89 +#: part/views.py:90 msgid "Add Related Part" msgstr "" -#: part/views.py:144 +#: part/views.py:145 msgid "Delete Related Part" msgstr "" -#: part/views.py:158 +#: part/views.py:159 msgid "Add part attachment" msgstr "" -#: part/views.py:211 templates/attachment_table.html:32 +#: part/views.py:212 templates/attachment_table.html:32 msgid "Edit attachment" msgstr "" -#: part/views.py:215 +#: part/views.py:216 msgid "Part attachment updated" msgstr "" -#: part/views.py:230 +#: part/views.py:231 msgid "Delete Part Attachment" msgstr "" -#: part/views.py:238 +#: part/views.py:239 msgid "Deleted part attachment" msgstr "" -#: part/views.py:247 +#: part/views.py:248 msgid "Create Test Template" msgstr "" -#: part/views.py:274 +#: part/views.py:275 msgid "Edit Test Template" msgstr "" -#: part/views.py:288 +#: part/views.py:289 msgid "Delete Test Template" msgstr "" -#: part/views.py:295 +#: part/views.py:296 msgid "Set Part Category" msgstr "" -#: part/views.py:345 +#: part/views.py:346 #, python-brace-format msgid "Set category for {n} parts" msgstr "" -#: part/views.py:380 +#: part/views.py:381 msgid "Create Variant" msgstr "" -#: part/views.py:465 +#: part/views.py:466 msgid "Copied part" msgstr "" -#: part/views.py:519 part/views.py:657 +#: part/views.py:520 part/views.py:658 msgid "Possible matches exist - confirm creation of new part" msgstr "" -#: part/views.py:589 +#: part/views.py:590 msgid "Created new part" msgstr "" -#: part/views.py:825 +#: part/views.py:914 msgid "Part QR Code" msgstr "" -#: part/views.py:927 +#: part/views.py:1016 msgid "Upload Part Image" msgstr "" -#: part/views.py:933 part/views.py:968 +#: part/views.py:1022 part/views.py:1057 msgid "Updated part image" msgstr "" -#: part/views.py:942 +#: part/views.py:1031 msgid "Select Part Image" msgstr "" -#: part/views.py:971 +#: part/views.py:1060 msgid "Part image not found" msgstr "" -#: part/views.py:982 +#: part/views.py:1071 msgid "Edit Part Properties" msgstr "" -#: part/views.py:1017 +#: part/views.py:1106 msgid "Duplicate BOM" msgstr "" -#: part/views.py:1047 +#: part/views.py:1136 msgid "Confirm duplication of BOM from parent" msgstr "" -#: part/views.py:1068 +#: part/views.py:1157 msgid "Validate BOM" msgstr "" -#: part/views.py:1089 +#: part/views.py:1178 msgid "Confirm that the BOM is valid" msgstr "" -#: part/views.py:1100 +#: part/views.py:1189 msgid "Validated Bill of Materials" msgstr "" -#: part/views.py:1234 +#: part/views.py:1323 msgid "No BOM file provided" msgstr "" -#: part/views.py:1595 +#: part/views.py:1684 msgid "Enter a valid quantity" msgstr "" -#: part/views.py:1620 part/views.py:1623 +#: part/views.py:1709 part/views.py:1712 msgid "Select valid part" msgstr "" -#: part/views.py:1629 +#: part/views.py:1718 msgid "Duplicate part selected" msgstr "" -#: part/views.py:1667 +#: part/views.py:1756 msgid "Select a part" msgstr "" -#: part/views.py:1673 +#: part/views.py:1762 msgid "Selected part creates a circular BOM" msgstr "" -#: part/views.py:1677 +#: part/views.py:1766 msgid "Specify quantity" msgstr "" -#: part/views.py:1939 +#: part/views.py:2028 msgid "Confirm Part Deletion" msgstr "" -#: part/views.py:1946 +#: part/views.py:2035 msgid "Part was deleted" msgstr "" -#: part/views.py:1955 +#: part/views.py:2044 msgid "Part Pricing" msgstr "" -#: part/views.py:2089 +#: part/views.py:2178 msgid "Create Part Parameter Template" msgstr "" -#: part/views.py:2099 +#: part/views.py:2188 msgid "Edit Part Parameter Template" msgstr "" -#: part/views.py:2106 +#: part/views.py:2195 msgid "Delete Part Parameter Template" msgstr "" -#: part/views.py:2114 +#: part/views.py:2203 msgid "Create Part Parameter" msgstr "" -#: part/views.py:2164 +#: part/views.py:2253 msgid "Edit Part Parameter" msgstr "" -#: part/views.py:2178 +#: part/views.py:2267 msgid "Delete Part Parameter" msgstr "" -#: part/views.py:2238 +#: part/views.py:2327 msgid "Edit Part Category" msgstr "" -#: part/views.py:2276 +#: part/views.py:2365 msgid "Delete Part Category" msgstr "" -#: part/views.py:2282 +#: part/views.py:2371 msgid "Part category was deleted" msgstr "" -#: part/views.py:2334 +#: part/views.py:2423 msgid "Create Category Parameter Template" msgstr "" -#: part/views.py:2435 +#: part/views.py:2524 msgid "Edit Category Parameter Template" msgstr "" -#: part/views.py:2491 +#: part/views.py:2580 msgid "Delete Category Parameter Template" msgstr "" -#: part/views.py:2510 +#: part/views.py:2599 msgid "Create BOM Item" msgstr "" -#: part/views.py:2580 +#: part/views.py:2669 msgid "Edit BOM item" msgstr "" -#: part/views.py:2636 +#: part/views.py:2725 msgid "Confim BOM item deletion" msgstr "" @@ -5127,7 +5175,7 @@ msgid "Moved {n} parts to {loc}" msgstr "" #: stock/forms.py:114 stock/forms.py:418 stock/models.py:507 -#: stock/templates/stock/item_base.html:371 templates/js/stock.js:656 +#: stock/templates/stock/item_base.html:376 templates/js/stock.js:656 msgid "Expiry Date" msgstr "" @@ -5277,7 +5325,7 @@ msgstr "" msgid "Packaging this stock item is stored in" msgstr "" -#: stock/models.py:435 stock/templates/stock/item_base.html:265 +#: stock/models.py:435 stock/templates/stock/item_base.html:270 msgid "Installed In" msgstr "" @@ -5412,173 +5460,173 @@ msgstr "" msgid "Stock Item Attachments" msgstr "" -#: stock/templates/stock/item_base.html:24 -msgid "You are not in the list of owners of this item. This stock item cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:31 -msgid "This stock item is in production and cannot be edited." -msgstr "" - -#: stock/templates/stock/item_base.html:32 -msgid "Edit the stock item from the build view." -msgstr "" - -#: stock/templates/stock/item_base.html:45 -msgid "This stock item has not passed all required tests" -msgstr "" - -#: stock/templates/stock/item_base.html:53 -#, python-format -msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:61 -#, python-format -msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" -msgstr "" - -#: stock/templates/stock/item_base.html:67 -msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." -msgstr "" - -#: stock/templates/stock/item_base.html:71 -msgid "This stock item cannot be deleted as it has child items" -msgstr "" - -#: stock/templates/stock/item_base.html:75 -msgid "This stock item will be automatically deleted when all stock is depleted." -msgstr "" - -#: stock/templates/stock/item_base.html:95 -#: stock/templates/stock/item_base.html:375 templates/js/table_filters.js:146 +#: stock/templates/stock/item_base.html:33 +#: stock/templates/stock/item_base.html:380 templates/js/table_filters.js:146 msgid "Expired" msgstr "" -#: stock/templates/stock/item_base.html:105 -#: stock/templates/stock/item_base.html:377 templates/js/table_filters.js:151 +#: stock/templates/stock/item_base.html:43 +#: stock/templates/stock/item_base.html:382 templates/js/table_filters.js:151 msgid "Stale" msgstr "" -#: stock/templates/stock/item_base.html:142 templates/js/barcode.js:309 +#: stock/templates/stock/item_base.html:80 templates/js/barcode.js:309 #: templates/js/barcode.js:314 msgid "Unlink Barcode" msgstr "" -#: stock/templates/stock/item_base.html:144 +#: stock/templates/stock/item_base.html:82 msgid "Link Barcode" msgstr "" -#: stock/templates/stock/item_base.html:146 templates/stock_table.html:31 +#: stock/templates/stock/item_base.html:84 templates/stock_table.html:31 msgid "Scan to Location" msgstr "" -#: stock/templates/stock/item_base.html:153 +#: stock/templates/stock/item_base.html:91 msgid "Printing actions" msgstr "" -#: stock/templates/stock/item_base.html:157 +#: stock/templates/stock/item_base.html:95 #: stock/templates/stock/item_tests.html:27 msgid "Test Report" msgstr "" -#: stock/templates/stock/item_base.html:166 +#: stock/templates/stock/item_base.html:104 msgid "Stock adjustment actions" msgstr "" -#: stock/templates/stock/item_base.html:170 +#: stock/templates/stock/item_base.html:108 #: stock/templates/stock/location.html:65 templates/stock_table.html:57 msgid "Count stock" msgstr "" -#: stock/templates/stock/item_base.html:173 templates/stock_table.html:55 +#: stock/templates/stock/item_base.html:111 templates/stock_table.html:55 msgid "Add stock" msgstr "" -#: stock/templates/stock/item_base.html:176 templates/stock_table.html:56 +#: stock/templates/stock/item_base.html:114 templates/stock_table.html:56 msgid "Remove stock" msgstr "" -#: stock/templates/stock/item_base.html:179 +#: stock/templates/stock/item_base.html:117 msgid "Serialize stock" msgstr "" -#: stock/templates/stock/item_base.html:183 +#: stock/templates/stock/item_base.html:121 msgid "Transfer stock" msgstr "" -#: stock/templates/stock/item_base.html:186 +#: stock/templates/stock/item_base.html:124 msgid "Assign to customer" msgstr "" -#: stock/templates/stock/item_base.html:189 +#: stock/templates/stock/item_base.html:127 msgid "Return to stock" msgstr "" -#: stock/templates/stock/item_base.html:193 templates/js/stock.js:1421 +#: stock/templates/stock/item_base.html:131 templates/js/stock.js:1426 msgid "Uninstall stock item" msgstr "" -#: stock/templates/stock/item_base.html:193 +#: stock/templates/stock/item_base.html:131 msgid "Uninstall" msgstr "" -#: stock/templates/stock/item_base.html:202 +#: stock/templates/stock/item_base.html:140 #: stock/templates/stock/location.html:62 msgid "Stock actions" msgstr "" -#: stock/templates/stock/item_base.html:205 +#: stock/templates/stock/item_base.html:143 msgid "Convert to variant" msgstr "" -#: stock/templates/stock/item_base.html:208 +#: stock/templates/stock/item_base.html:146 msgid "Duplicate stock item" msgstr "" -#: stock/templates/stock/item_base.html:210 +#: stock/templates/stock/item_base.html:148 msgid "Edit stock item" msgstr "" -#: stock/templates/stock/item_base.html:213 +#: stock/templates/stock/item_base.html:151 msgid "Delete stock item" msgstr "" -#: stock/templates/stock/item_base.html:225 +#: stock/templates/stock/item_base.html:171 +msgid "You are not in the list of owners of this item. This stock item cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:178 +msgid "This stock item is in production and cannot be edited." +msgstr "" + +#: stock/templates/stock/item_base.html:179 +msgid "Edit the stock item from the build view." +msgstr "" + +#: stock/templates/stock/item_base.html:192 +msgid "This stock item has not passed all required tests" +msgstr "" + +#: stock/templates/stock/item_base.html:200 +#, python-format +msgid "This stock item is allocated to Sales Order %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:208 +#, python-format +msgid "This stock item is allocated to Build %(link)s (Quantity: %(qty)s)" +msgstr "" + +#: stock/templates/stock/item_base.html:214 +msgid "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." +msgstr "" + +#: stock/templates/stock/item_base.html:218 +msgid "This stock item cannot be deleted as it has child items" +msgstr "" + +#: stock/templates/stock/item_base.html:222 +msgid "This stock item will be automatically deleted when all stock is depleted." +msgstr "" + +#: stock/templates/stock/item_base.html:230 msgid "Stock Item Details" msgstr "" -#: stock/templates/stock/item_base.html:284 templates/js/build.js:498 +#: stock/templates/stock/item_base.html:289 templates/js/build.js:498 msgid "No location set" msgstr "" -#: stock/templates/stock/item_base.html:291 +#: stock/templates/stock/item_base.html:296 msgid "Barcode Identifier" msgstr "" -#: stock/templates/stock/item_base.html:333 +#: stock/templates/stock/item_base.html:338 msgid "Parent Item" msgstr "" -#: stock/templates/stock/item_base.html:375 +#: stock/templates/stock/item_base.html:380 #, python-format msgid "This StockItem expired on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:377 +#: stock/templates/stock/item_base.html:382 #, python-format msgid "This StockItem expires on %(item.expiry_date)s" msgstr "" -#: stock/templates/stock/item_base.html:384 templates/js/stock.js:662 +#: stock/templates/stock/item_base.html:389 templates/js/stock.js:662 msgid "Last Updated" msgstr "" -#: stock/templates/stock/item_base.html:389 +#: stock/templates/stock/item_base.html:394 msgid "Last Stocktake" msgstr "" -#: stock/templates/stock/item_base.html:393 +#: stock/templates/stock/item_base.html:398 msgid "No stocktake performed" msgstr "" @@ -6067,7 +6115,8 @@ msgstr "" #: templates/InvenTree/settings/appearance.html:29 #, python-format -msgid "\n" +msgid "" +"\n" " The CSS sheet \"%(invalid_color_theme)s.css\" for the currently selected color theme was not found.
    \n" " Please select another color theme :)\n" " " @@ -6107,11 +6156,35 @@ msgstr "" msgid "Delete Template" msgstr "" +#: templates/InvenTree/settings/currencies.html:10 +msgid "Currency Settings" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:18 +msgid "Base Currency" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:22 +msgid "Exchange Rates" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:32 +msgid "Last Update" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:38 +msgid "Never" +msgstr "" + +#: templates/InvenTree/settings/currencies.html:43 +msgid "Update Now" +msgstr "" + #: templates/InvenTree/settings/global.html:10 msgid "Global InvenTree Settings" msgstr "" -#: templates/InvenTree/settings/global.html:27 +#: templates/InvenTree/settings/global.html:26 msgid "Barcode Settings" msgstr "" @@ -6190,10 +6263,14 @@ msgid "Global" msgstr "" #: templates/InvenTree/settings/tabs.html:19 -msgid "Report" +msgid "Currencies" msgstr "" #: templates/InvenTree/settings/tabs.html:22 +msgid "Report" +msgstr "" + +#: templates/InvenTree/settings/tabs.html:25 msgid "Categories" msgstr "" @@ -6239,46 +6316,50 @@ msgid "Update Available" msgstr "" #: templates/about.html:34 +msgid "API Version" +msgstr "" + +#: templates/about.html:39 msgid "Django Version" msgstr "" -#: templates/about.html:41 +#: templates/about.html:46 msgid "Commit Hash" msgstr "" -#: templates/about.html:48 +#: templates/about.html:53 msgid "Commit Date" msgstr "" -#: templates/about.html:53 +#: templates/about.html:58 msgid "InvenTree Documentation" msgstr "" -#: templates/about.html:58 +#: templates/about.html:63 msgid "View Code on GitHub" msgstr "" -#: templates/about.html:63 +#: templates/about.html:68 msgid "Credits" msgstr "" -#: templates/about.html:68 +#: templates/about.html:73 msgid "Mobile App" msgstr "" -#: templates/about.html:73 +#: templates/about.html:78 msgid "Submit Bug Report" msgstr "" -#: templates/about.html:80 templates/clip.html:4 +#: templates/about.html:85 templates/clip.html:4 msgid "copy to clipboard" msgstr "" -#: templates/about.html:80 +#: templates/about.html:85 msgid "copy version information" msgstr "" -#: templates/about.html:90 templates/js/modals.js:568 +#: templates/about.html:95 templates/js/modals.js:568 #: templates/js/modals.js:846 templates/modals.html:29 templates/modals.html:54 #: templates/modals.html:97 msgid "Close" @@ -6408,41 +6489,49 @@ msgstr "" msgid "Open subassembly" msgstr "" -#: templates/js/bom.js:261 +#: templates/js/bom.js:249 +msgid "Purchase Price Range" +msgstr "" + +#: templates/js/bom.js:257 +msgid "Purchase Price Average" +msgstr "" + +#: templates/js/bom.js:277 msgid "No pricing available" msgstr "" -#: templates/js/bom.js:272 templates/js/filters.js:167 +#: templates/js/bom.js:288 templates/js/filters.js:167 #: templates/js/filters.js:397 msgid "true" msgstr "" -#: templates/js/bom.js:273 templates/js/filters.js:171 +#: templates/js/bom.js:289 templates/js/filters.js:171 #: templates/js/filters.js:398 msgid "false" msgstr "" -#: templates/js/bom.js:290 templates/js/bom.js:376 +#: templates/js/bom.js:306 templates/js/bom.js:392 msgid "View BOM" msgstr "" -#: templates/js/bom.js:350 +#: templates/js/bom.js:366 msgid "Validate BOM Item" msgstr "" -#: templates/js/bom.js:352 +#: templates/js/bom.js:368 msgid "This line has been validated" msgstr "" -#: templates/js/bom.js:354 +#: templates/js/bom.js:370 msgid "Edit BOM Item" msgstr "" -#: templates/js/bom.js:356 +#: templates/js/bom.js:372 msgid "Delete BOM Item" msgstr "" -#: templates/js/bom.js:447 templates/js/build.js:340 templates/js/build.js:1092 +#: templates/js/bom.js:463 templates/js/build.js:340 templates/js/build.js:1092 msgid "No BOM items found" msgstr "" @@ -6485,7 +6574,7 @@ msgstr "" #: templates/js/build.js:708 templates/js/part.js:324 templates/js/part.js:546 #: templates/js/stock.js:511 templates/js/stock.js:938 -#: templates/js/stock.js:1453 +#: templates/js/stock.js:1458 msgid "Select" msgstr "" @@ -6748,6 +6837,10 @@ msgstr "" msgid "This test is defined for a parent part" msgstr "" +#: templates/js/part.js:727 +msgid "Single Price Difference" +msgstr "" + #: templates/js/report.js:47 msgid "items selected" msgstr "" @@ -6942,55 +7035,55 @@ msgstr "" msgid "Invalid date" msgstr "" -#: templates/js/stock.js:1036 +#: templates/js/stock.js:1041 msgid "Location no longer exists" msgstr "" -#: templates/js/stock.js:1055 +#: templates/js/stock.js:1060 msgid "Purchase order no longer exists" msgstr "" -#: templates/js/stock.js:1074 +#: templates/js/stock.js:1079 msgid "Customer no longer exists" msgstr "" -#: templates/js/stock.js:1092 +#: templates/js/stock.js:1097 msgid "Stock item no longer exists" msgstr "" -#: templates/js/stock.js:1115 +#: templates/js/stock.js:1120 msgid "Added" msgstr "" -#: templates/js/stock.js:1123 +#: templates/js/stock.js:1128 msgid "Removed" msgstr "" -#: templates/js/stock.js:1155 +#: templates/js/stock.js:1160 msgid "No user information" msgstr "" -#: templates/js/stock.js:1167 +#: templates/js/stock.js:1172 msgid "Edit tracking entry" msgstr "" -#: templates/js/stock.js:1168 +#: templates/js/stock.js:1173 msgid "Delete tracking entry" msgstr "" -#: templates/js/stock.js:1292 +#: templates/js/stock.js:1297 msgid "Create New Location" msgstr "" -#: templates/js/stock.js:1391 +#: templates/js/stock.js:1396 msgid "Serial" msgstr "" -#: templates/js/stock.js:1484 templates/js/table_filters.js:172 +#: templates/js/stock.js:1489 templates/js/table_filters.js:172 msgid "Installed" msgstr "" -#: templates/js/stock.js:1509 +#: templates/js/stock.js:1514 msgid "Install item" msgstr "" @@ -7472,4 +7565,3 @@ msgstr "" #: users/models.py:187 msgid "Permission to delete items" msgstr "" - From 878e9c1e8a552e2fc185b015baf5107cbec23681 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 29 May 2021 17:35:05 +1000 Subject: [PATCH 47/68] Update version.py Bump to v2.2 --- InvenTree/InvenTree/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/version.py b/InvenTree/InvenTree/version.py index 67962c7859..709c5e3d77 100644 --- a/InvenTree/InvenTree/version.py +++ b/InvenTree/InvenTree/version.py @@ -8,7 +8,7 @@ import re import common.models -INVENTREE_SW_VERSION = "0.2.2 pre" +INVENTREE_SW_VERSION = "0.2.2" """ Increment thi API version number whenever there is a significant change to the API that any clients need to know about From 8d33dc579555958f4765d4a0ce5163e02ee9c350 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 29 May 2021 17:48:40 +1000 Subject: [PATCH 48/68] Tag with release tag --- .github/workflows/docker_publish.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker_publish.yaml b/.github/workflows/docker_publish.yaml index 4a8cef0952..c04f9a413d 100644 --- a/.github/workflows/docker_publish.yaml +++ b/.github/workflows/docker_publish.yaml @@ -17,16 +17,17 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: cd - run: | - cd docker - - name: Push to Docker Hub - uses: docker/build-push-action@v1 + - name: Login to Dockerhub + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - repository: inventree/inventree - tag_with_ref: true - dockerfile: ./Dockerfile - target: production + - name: Build and Push + uses: docker/build-push-action@v2 + with: + context: ./docker platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + target: production + repository: inventree/inventree + tags: inventree/inventree:{{ github.event.release.tag_name }} From 52ab8b8064a83ae19ed89c3b15ec26d823fe90e9 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 29 May 2021 18:28:07 +1000 Subject: [PATCH 49/68] Update docker_publish.yaml Add $ --- .github/workflows/docker_publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yaml b/.github/workflows/docker_publish.yaml index c04f9a413d..53ec505003 100644 --- a/.github/workflows/docker_publish.yaml +++ b/.github/workflows/docker_publish.yaml @@ -30,4 +30,4 @@ jobs: push: true target: production repository: inventree/inventree - tags: inventree/inventree:{{ github.event.release.tag_name }} + tags: inventree/inventree:${{ github.event.release.tag_name }} From f08c83d6e50802385b71ba39b5707ffe02a1ab03 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 29 May 2021 18:48:18 +1000 Subject: [PATCH 50/68] Fix part page heading --- InvenTree/part/templates/part/category.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index b79ee0ee60..2e6ebb7fca 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -138,7 +138,7 @@

    {% block heading %} - {% trans "Part Categories" %} + {% trans "Parts" %} {% endblock %}

    From dff367b0b0c957367d24cbeff41b5b923c6c067d Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 29 May 2021 19:05:41 +1000 Subject: [PATCH 51/68] Update version.py --- InvenTree/InvenTree/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/version.py b/InvenTree/InvenTree/version.py index 709c5e3d77..a736bfe6a1 100644 --- a/InvenTree/InvenTree/version.py +++ b/InvenTree/InvenTree/version.py @@ -8,7 +8,7 @@ import re import common.models -INVENTREE_SW_VERSION = "0.2.2" +INVENTREE_SW_VERSION = "0.2.3 pre" """ Increment thi API version number whenever there is a significant change to the API that any clients need to know about From 8450029c68d45a46fb4f079b27f1402904da4044 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 29 May 2021 23:59:07 +1000 Subject: [PATCH 52/68] Add custom-view plugin for bootstrap-table --- .../bootstrap-table-custom-view.js | 1256 ++ .../bootstrap/bootstrap-table-en-US.min.js | 17 +- .../script/bootstrap/bootstrap-table.js | 10392 +++++++++++----- 3 files changed, 8283 insertions(+), 3382 deletions(-) create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js diff --git a/InvenTree/InvenTree/static/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js b/InvenTree/InvenTree/static/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js new file mode 100644 index 0000000000..e4dc26de37 --- /dev/null +++ b/InvenTree/InvenTree/static/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js @@ -0,0 +1,1256 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : + typeof define === 'function' && define.amd ? define(['jquery'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); +}(this, (function ($) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var $__default = /*#__PURE__*/_interopDefaultLegacy($); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); + } + + function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; + } + + function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; + } + + function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var check = function (it) { + return it && it.Math == Math && it; + }; + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global_1 = + /* global globalThis -- safe */ + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + check(typeof self == 'object' && self) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + var fails = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + + // Detect IE8's incomplete defineProperty implementation + var descriptors = !fails(function () { + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; + }); + + var nativePropertyIsEnumerable = {}.propertyIsEnumerable; + var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; + + // Nashorn ~ JDK8 bug + var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + + // `Object.prototype.propertyIsEnumerable` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable + var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor$1(this, V); + return !!descriptor && descriptor.enumerable; + } : nativePropertyIsEnumerable; + + var objectPropertyIsEnumerable = { + f: f$4 + }; + + var createPropertyDescriptor = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var toString = {}.toString; + + var classofRaw = function (it) { + return toString.call(it).slice(8, -1); + }; + + var split = ''.split; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var indexedObject = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !Object('z').propertyIsEnumerable(0); + }) ? function (it) { + return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); + } : Object; + + // `RequireObjectCoercible` abstract operation + // https://tc39.es/ecma262/#sec-requireobjectcoercible + var requireObjectCoercible = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // toObject with fallback for non-array-like ES3 strings + + + + var toIndexedObject = function (it) { + return indexedObject(requireObjectCoercible(it)); + }; + + var isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + // `ToPrimitive` abstract operation + // https://tc39.es/ecma262/#sec-toprimitive + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var toPrimitive = function (input, PREFERRED_STRING) { + if (!isObject(input)) return input; + var fn, val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var hasOwnProperty = {}.hasOwnProperty; + + var has$1 = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var document$1 = global_1.document; + // typeof document.createElement is 'object' in old IE + var EXISTS = isObject(document$1) && isObject(document$1.createElement); + + var documentCreateElement = function (it) { + return EXISTS ? document$1.createElement(it) : {}; + }; + + // Thank's IE8 for his funny defineProperty + var ie8DomDefine = !descriptors && !fails(function () { + return Object.defineProperty(documentCreateElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; + }); + + var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor + var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (ie8DomDefine) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); + }; + + var objectGetOwnPropertyDescriptor = { + f: f$3 + }; + + var anObject = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; + }; + + var nativeDefineProperty = Object.defineProperty; + + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (ie8DomDefine) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var objectDefineProperty = { + f: f$2 + }; + + var createNonEnumerableProperty = descriptors ? function (object, key, value) { + return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var setGlobal = function (key, value) { + try { + createNonEnumerableProperty(global_1, key, value); + } catch (error) { + global_1[key] = value; + } return value; + }; + + var SHARED = '__core-js_shared__'; + var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); + + var sharedStore = store$1; + + var functionToString = Function.toString; + + // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper + if (typeof sharedStore.inspectSource != 'function') { + sharedStore.inspectSource = function (it) { + return functionToString.call(it); + }; + } + + var inspectSource = sharedStore.inspectSource; + + var WeakMap$1 = global_1.WeakMap; + + var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1)); + + var shared = createCommonjsModule(function (module) { + (module.exports = function (key, value) { + return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: '3.9.1', + mode: 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' + }); + }); + + var id = 0; + var postfix = Math.random(); + + var uid = function (key) { + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); + }; + + var keys = shared('keys'); + + var sharedKey = function (key) { + return keys[key] || (keys[key] = uid(key)); + }; + + var hiddenKeys$1 = {}; + + var WeakMap = global_1.WeakMap; + var set, get, has; + + var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); + }; + + var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; + }; + + if (nativeWeakMap) { + var store = sharedStore.state || (sharedStore.state = new WeakMap()); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function (it, metadata) { + metadata.facade = it; + wmset.call(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store, it) || {}; + }; + has = function (it) { + return wmhas.call(store, it); + }; + } else { + var STATE = sharedKey('state'); + hiddenKeys$1[STATE] = true; + set = function (it, metadata) { + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return has$1(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return has$1(it, STATE); + }; + } + + var internalState = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor + }; + + var redefine = createCommonjsModule(function (module) { + var getInternalState = internalState.get; + var enforceInternalState = internalState.enforce; + var TEMPLATE = String(String).split('String'); + + (module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var state; + if (typeof value == 'function') { + if (typeof key == 'string' && !has$1(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + } + if (O === global_1) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else createNonEnumerableProperty(O, key, value); + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || inspectSource(this); + }); + }); + + var path = global_1; + + var aFunction$1 = function (variable) { + return typeof variable == 'function' ? variable : undefined; + }; + + var getBuiltIn = function (namespace, method) { + return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace]) + : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; + }; + + var ceil = Math.ceil; + var floor = Math.floor; + + // `ToInteger` abstract operation + // https://tc39.es/ecma262/#sec-tointeger + var toInteger = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); + }; + + var min$1 = Math.min; + + // `ToLength` abstract operation + // https://tc39.es/ecma262/#sec-tolength + var toLength = function (argument) { + return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + }; + + var max$1 = Math.max; + var min = Math.min; + + // Helper for a popular repeating case of the spec: + // Let integer be ? ToInteger(index). + // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). + var toAbsoluteIndex = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max$1(integer + length, 0) : min(integer, length); + }; + + // `Array.prototype.{ indexOf, includes }` methods implementation + var createMethod$1 = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var arrayIncludes = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod$1(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod$1(false) + }; + + var indexOf = arrayIncludes.indexOf; + + + var objectKeysInternal = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has$1(O, key = names[i++])) { + ~indexOf(result, key) || result.push(key); + } + return result; + }; + + // IE8- don't enum bug keys + var enumBugKeys = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + + var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return objectKeysInternal(O, hiddenKeys); + }; + + var objectGetOwnPropertyNames = { + f: f$1 + }; + + var f = Object.getOwnPropertySymbols; + + var objectGetOwnPropertySymbols = { + f: f + }; + + // all object keys, includes non-enumerable and symbols + var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = objectGetOwnPropertyNames.f(anObject(it)); + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; + }; + + var copyConstructorProperties = function (target, source) { + var keys = ownKeys(source); + var defineProperty = objectDefineProperty.f; + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + }; + + var replacement = /#|\.prototype\./; + + var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; + }; + + var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); + }; + + var data = isForced.data = {}; + var NATIVE = isForced.NATIVE = 'N'; + var POLYFILL = isForced.POLYFILL = 'P'; + + var isForced_1 = isForced; + + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + + + + + + + /* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target + */ + var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global_1; + } else if (STATIC) { + target = global_1[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global_1[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } + }; + + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + var objectKeys = Object.keys || function keys(O) { + return objectKeysInternal(O, enumBugKeys); + }; + + // `ToObject` abstract operation + // https://tc39.es/ecma262/#sec-toobject + var toObject = function (argument) { + return Object(requireObjectCoercible(argument)); + }; + + var nativeAssign = Object.assign; + var defineProperty = Object.defineProperty; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + var objectAssign = !nativeAssign || fails(function () { + // should have correct order of operations (Edge bug) + if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', { + enumerable: true, + get: function () { + defineProperty(this, 'b', { + value: 3, + enumerable: false + }); + } + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + /* global Symbol -- required for testing */ + var symbol = Symbol(); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + var propertyIsEnumerable = objectPropertyIsEnumerable.f; + while (argumentsLength > index) { + var S = indexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; + } + } return T; + } : nativeAssign; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { + assign: objectAssign + }); + + // `IsArray` abstract operation + // https://tc39.es/ecma262/#sec-isarray + var isArray = Array.isArray || function isArray(arg) { + return classofRaw(arg) == 'Array'; + }; + + var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; + }; + + var engineIsNode = classofRaw(global_1.process) == 'process'; + + var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; + + var process = global_1.process; + var versions = process && process.versions; + var v8 = versions && versions.v8; + var match, version; + + if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; + } else if (engineUserAgent) { + match = engineUserAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = engineUserAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } + } + + var engineV8Version = version && +version; + + var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { + /* global Symbol -- required for testing */ + return !Symbol.sham && + // Chrome 38 Symbol has incorrect toString conversion + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41); + }); + + var useSymbolAsUid = nativeSymbol + /* global Symbol -- safe */ + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; + + var WellKnownSymbolsStore = shared('wks'); + var Symbol$1 = global_1.Symbol; + var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; + + var wellKnownSymbol = function (name) { + if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { + if (nativeSymbol && has$1(Symbol$1, name)) { + WellKnownSymbolsStore[name] = Symbol$1[name]; + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); + } + } return WellKnownSymbolsStore[name]; + }; + + var SPECIES$2 = wellKnownSymbol('species'); + + // `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES$2]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); + }; + + var SPECIES$1 = wellKnownSymbol('species'); + + var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return engineV8Version >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$1] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); + }; + + var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; + var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/679 + var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; + }); + + var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + + var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); + }; + + var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + + // `Array.prototype.concat` method + // https://tc39.es/ecma262/#sec-array.prototype.concat + // with adding support of @@isConcatSpreadable and @@species + _export({ target: 'Array', proto: true, forced: FORCED }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } + }); + + var aFunction = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; + }; + + // optional / simple context binding + var functionBindContext = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var push = [].push; + + // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation + var createMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var IS_FILTER_OUT = TYPE == 7; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject($this); + var self = indexedObject(O); + var boundFunction = functionBindContext(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push.call(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push.call(target, value); // filterOut + } + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; + }; + + var arrayIteration = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod(6), + // `Array.prototype.filterOut` method + // https://github.com/tc39/proposal-array-filtering + filterOut: createMethod(7) + }; + + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); + return O; + }; + + var html = getBuiltIn('document', 'documentElement'); + + var GT = '>'; + var LT = '<'; + var PROTOTYPE = 'prototype'; + var SCRIPT = 'script'; + var IE_PROTO = sharedKey('IE_PROTO'); + + var EmptyConstructor = function () { /* empty */ }; + + var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; + }; + + // Create object with fake `null` prototype: use ActiveX Object with cleared prototype + var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; + }; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; + }; + + // Check for document.domain and active x support + // No need to use active x approach when document.domain is not set + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + // avoid IE GC bug + var activeXDocument; + var NullProtoObject = function () { + try { + /* global ActiveXObject -- old IE */ + activeXDocument = document.domain && new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); + }; + + hiddenKeys$1[IE_PROTO] = true; + + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : objectDefineProperties(result, Properties); + }; + + var UNSCOPABLES = wellKnownSymbol('unscopables'); + var ArrayPrototype = Array.prototype; + + // Array.prototype[@@unscopables] + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + if (ArrayPrototype[UNSCOPABLES] == undefined) { + objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: objectCreate(null) + }); + } + + // add a key to Array.prototype[@@unscopables] + var addToUnscopables = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; + }; + + var $find = arrayIteration.find; + + + var FIND = 'find'; + var SKIPS_HOLES = true; + + // Shouldn't skip holes + if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); + + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables(FIND); + + var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); + + var SPECIES = wellKnownSymbol('species'); + var nativeSlice = [].slice; + var max = Math.max; + + // `Array.prototype.slice` method + // https://tc39.es/ecma262/#sec-array.prototype.slice + // fallback for not array-like ES3 strings and DOM objects + _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + slice: function slice(start, end) { + var O = toIndexedObject(this); + var length = toLength(O.length); + var k = toAbsoluteIndex(start, length); + var fin = toAbsoluteIndex(end === undefined ? length : end, length); + // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible + var Constructor, result, n; + if (isArray(O)) { + Constructor = O.constructor; + // cross-realm fallback + if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { + Constructor = undefined; + } else if (isObject(Constructor)) { + Constructor = Constructor[SPECIES]; + if (Constructor === null) Constructor = undefined; + } + if (Constructor === Array || Constructor === undefined) { + return nativeSlice.call(O, k, fin); + } + } + result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); + for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); + result.length = n; + return result; + } + }); + + /** + * @author: Dustin Utecht + * @github: https://github.com/UtechtDustin + */ + + var Utils = $__default['default'].fn.bootstrapTable.utils; + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { + customView: false, + showCustomView: false, + showCustomViewButton: false + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, { + customView: { + bootstrap3: 'glyphicon glyphicon-eye-open', + bootstrap4: 'fa fa-eye', + semantic: 'fa fa-eye', + foundation: 'fa fa-eye', + bulma: 'fa fa-eye', + materialize: 'remove_red_eye' + }[$__default['default'].fn.bootstrapTable.theme] || 'fa-eye' + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { + onCustomViewPostBody: function onCustomViewPostBody() { + return false; + }, + onCustomViewPreBody: function onCustomViewPreBody() { + return false; + } + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, { + formatToggleCustomView: function formatToggleCustomView() { + return 'Toggle custom view'; + } + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales); + $__default['default'].fn.bootstrapTable.methods.push('toggleCustomView'); + $__default['default'].extend($__default['default'].fn.bootstrapTable.Constructor.EVENTS, { + 'custom-view-post-body.bs.table': 'onCustomViewPostBody', + 'custom-view-pre-body.bs.table': 'onCustomViewPreBody' + }); + + $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { + _inherits(_class, _$$BootstrapTable); + + var _super = _createSuper(_class); + + function _class() { + _classCallCheck(this, _class); + + return _super.apply(this, arguments); + } + + _createClass(_class, [{ + key: "init", + value: function init() { + this.showCustomView = this.options.showCustomView; + + _get(_getPrototypeOf(_class.prototype), "init", this).call(this); + } + }, { + key: "initToolbar", + value: function initToolbar() { + var _get2; + + if (this.options.customView && this.options.showCustomViewButton) { + this.buttons = Object.assign(this.buttons, { + customView: { + text: this.options.formatToggleCustomView(), + icon: this.options.icons.customView, + event: this.toggleCustomView, + attributes: { + 'aria-label': this.options.formatToggleCustomView(), + title: this.options.formatToggleCustomView() + } + } + }); + } + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args)); + } + }, { + key: "initBody", + value: function initBody() { + _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this); + + if (!this.options.customView) { + return; + } + + var $table = this.$el; + var $customViewContainer = this.$container.find('.fixed-table-custom-view'); + $table.hide(); + $customViewContainer.hide(); + + if (!this.options.customView || !this.showCustomView) { + $table.show(); + return; + } + + var data = this.getData().slice(this.pageFrom - 1, this.pageTo); + var value = Utils.calculateObjectValue(this, this.options.customView, [data], ''); + this.trigger('custom-view-pre-body', data, value); + + if ($customViewContainer.length === 1) { + $customViewContainer.show().html(value); + } else { + this.$tableBody.after("
    ".concat(value, "
    ")); + } + + this.trigger('custom-view-post-body', data, value); + } + }, { + key: "toggleCustomView", + value: function toggleCustomView() { + this.showCustomView = !this.showCustomView; + this.initBody(); + } + }]); + + return _class; + }($__default['default'].BootstrapTable); + +}))); diff --git a/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js index a39dddd030..87bef30086 100644 --- a/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js +++ b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js @@ -1,7 +1,10 @@ -/* -* bootstrap-table - v1.12.1 - 2018-03-12 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2018 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.fn.bootstrapTable.locales["en-US"]={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return a+" rows per page"},formatShowingRows:function(a,b,c){return"Showing "+a+" to "+b+" of "+c+" rows"},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"},formatExport:function(){return"Export data"},formatClearFilters:function(){return"Clear filters"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["en-US"])}(jQuery); \ No newline at end of file +/** + * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) + * + * @version v1.18.3 + * @homepage https://bootstrap-table.com + * @author wenzhixin (http://wenzhixin.net.cn/) + * @license MIT + */ + +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(t),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,n){return t(n={exports:{}},n.exports),n.exports}var i=function(t){return t&&t.Math==Math&&t},u=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},c=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,s={f:l&&!a.call({1:2},1)?function(t){var n=l(this,t);return!!n&&n.enumerable}:a},p=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},g={}.toString,d=function(t){return g.call(t).slice(8,-1)},h="".split,y=f((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==d(t)?h.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return y(m(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t,n){if(!w(t))return t;var r,e;if(n&&"function"==typeof(r=t.toString)&&!w(e=r.call(t)))return e;if("function"==typeof(r=t.valueOf)&&!w(e=r.call(t)))return e;if(!n&&"function"==typeof(r=t.toString)&&!w(e=r.call(t)))return e;throw TypeError("Can't convert object to primitive value")},S={}.hasOwnProperty,T=function(t,n){return S.call(t,n)},O=u.document,P=w(O)&&w(O.createElement),j=!c&&!f((function(){return 7!=Object.defineProperty((t="div",P?O.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),x=Object.getOwnPropertyDescriptor,A={f:c?x:function(t,n){if(t=v(t),n=b(n,!0),j)try{return x(t,n)}catch(t){}if(T(t,n))return p(!s.f.call(t,n),t[n])}},C=function(t){if(!w(t))throw TypeError(String(t)+" is not an object");return t},E=Object.defineProperty,M={f:c?E:function(t,n,r){if(C(t),n=b(n,!0),C(r),j)try{return E(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t}},R=c?function(t,n,r){return M.f(t,n,p(1,r))}:function(t,n,r){return t[n]=r,t},F=function(t,n){try{R(u,t,n)}catch(r){u[t]=n}return n},N="__core-js_shared__",L=u[N]||F(N,{}),k=Function.toString;"function"!=typeof L.inspectSource&&(L.inspectSource=function(t){return k.call(t)});var H,I,_,D,q=L.inspectSource,z=u.WeakMap,G="function"==typeof z&&/native code/.test(q(z)),U=o((function(t){(t.exports=function(t,n){return L[t]||(L[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),B=0,W=Math.random(),J=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++B+W).toString(36)},K=U("keys"),Q={},V=u.WeakMap;if(G){var Y=L.state||(L.state=new V),X=Y.get,Z=Y.has,$=Y.set;H=function(t,n){return n.facade=t,$.call(Y,t,n),n},I=function(t){return X.call(Y,t)||{}},_=function(t){return Z.call(Y,t)}}else{var tt=K[D="state"]||(K[D]=J(D));Q[tt]=!0,H=function(t,n){return n.facade=t,R(t,tt,n),n},I=function(t){return T(t,tt)?t[tt]:{}},_=function(t){return T(t,tt)}}var nt,rt,et={set:H,get:I,has:_,enforce:function(t){return _(t)?I(t):H(t,{})},getterFor:function(t){return function(n){var r;if(!w(n)||(r=I(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ot=o((function(t){var n=et.get,r=et.enforce,e=String(String).split("String");(t.exports=function(t,n,o,i){var f,c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof n||T(o,"name")||R(o,"name",n),(f=r(o)).source||(f.source=e.join("string"==typeof n?n:""))),t!==u?(c?!l&&t[n]&&(a=!0):delete t[n],a?t[n]=o:R(t,n,o)):a?t[n]=o:F(n,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&n(this).source||q(this)}))})),it=u,ut=function(t){return"function"==typeof t?t:void 0},ft=function(t,n){return arguments.length<2?ut(it[t])||ut(u[t]):it[t]&&it[t][n]||u[t]&&u[t][n]},ct=Math.ceil,at=Math.floor,lt=function(t){return isNaN(t=+t)?0:(t>0?at:ct)(t)},st=Math.min,pt=function(t){return t>0?st(lt(t),9007199254740991):0},gt=Math.max,dt=Math.min,ht=function(t){return function(n,r,e){var o,i=v(n),u=pt(i.length),f=function(t,n){var r=lt(t);return r<0?gt(r+n,0):dt(r,n)}(e,u);if(t&&r!=r){for(;u>f;)if((o=i[f++])!=o)return!0}else for(;u>f;f++)if((t||f in i)&&i[f]===r)return t||f||0;return!t&&-1}},yt={includes:ht(!0),indexOf:ht(!1)}.indexOf,mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),vt={f:Object.getOwnPropertyNames||function(t){return function(t,n){var r,e=v(t),o=0,i=[];for(r in e)!T(Q,r)&&T(e,r)&&i.push(r);for(;n.length>o;)T(e,r=n[o++])&&(~yt(i,r)||i.push(r));return i}(t,mt)}},wt={f:Object.getOwnPropertySymbols},bt=ft("Reflect","ownKeys")||function(t){var n=vt.f(C(t)),r=wt.f;return r?n.concat(r(t)):n},St=function(t,n){for(var r=bt(n),e=M.f,o=A.f,i=0;i=74)&&(nt=Lt.match(/Chrome\/(\d+)/))&&(rt=nt[1]);var _t,Dt=rt&&+rt,qt=!!Object.getOwnPropertySymbols&&!f((function(){return!Symbol.sham&&(Nt?38===Dt:Dt>37&&Dt<41)})),zt=qt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Gt=U("wks"),Ut=u.Symbol,Bt=zt?Ut:Ut&&Ut.withoutSetter||J,Wt=function(t){return T(Gt,t)&&(qt||"string"==typeof Gt[t])||(qt&&T(Ut,t)?Gt[t]=Ut[t]:Gt[t]=Bt("Symbol."+t)),Gt[t]},Jt=Wt("species"),Kt=function(t,n){var r;return Mt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Mt(r.prototype)?w(r)&&null===(r=r[Jt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===n?0:n)},Qt=Wt("species"),Vt=Wt("isConcatSpreadable"),Yt=9007199254740991,Xt="Maximum allowed index exceeded",Zt=Dt>=51||!f((function(){var t=[];return t[Vt]=!1,t.concat()[0]!==t})),$t=(_t="concat",Dt>=51||!f((function(){var t=[];return(t.constructor={})[Qt]=function(){return{foo:1}},1!==t[_t](Boolean).foo}))),tn=function(t){if(!w(t))return!1;var n=t[Vt];return void 0!==n?!!n:Mt(t)};!function(t,n){var r,e,o,i,f,c=t.target,a=t.global,l=t.stat;if(r=a?u:l?u[c]||F(c,{}):(u[c]||{}).prototype)for(e in n){if(i=n[e],o=t.noTargetGet?(f=Et(r,e))&&f.value:r[e],!Ct(a?e:c+(l?".":"#")+e,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;St(i,o)}(t.sham||o&&o.sham)&&R(i,"sham",!0),ot(r,e,i,t)}}({target:"Array",proto:!0,forced:!Zt||!$t},{concat:function(t){var n,r,e,o,i,u=Rt(this),f=Kt(u,0),c=0;for(n=-1,e=arguments.length;nYt)throw TypeError(Xt);for(r=0;r=Yt)throw TypeError(Xt);Ft(f,c++,i)}return f.length=c,f}}),r.default.fn.bootstrapTable.locales["en-US"]=r.default.fn.bootstrapTable.locales.en={formatCopyRows:function(){return"Copy Rows"},formatPrint:function(){return"Print"},formatLoadingMessage:function(){return"Loading, please wait"},formatRecordsPerPage:function(t){return"".concat(t," rows per page")},formatShowingRows:function(t,n,r,e){return void 0!==e&&e>0&&e>r?"Showing ".concat(t," to ").concat(n," of ").concat(r," rows (filtered from ").concat(e," total rows)"):"Showing ".concat(t," to ").concat(n," of ").concat(r," rows")},formatSRPaginationPreText:function(){return"previous page"},formatSRPaginationPageText:function(t){return"to page ".concat(t)},formatSRPaginationNextText:function(){return"next page"},formatDetailPagination:function(t){return"Showing ".concat(t," rows")},formatClearSearch:function(){return"Clear Search"},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatPaginationSwitchDown:function(){return"Show pagination"},formatPaginationSwitchUp:function(){return"Hide pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatToggleOn:function(){return"Show card view"},formatToggleOff:function(){return"Hide card view"},formatColumns:function(){return"Columns"},formatColumnsToggleAll:function(){return"Toggle all"},formatFullscreen:function(){return"Fullscreen"},formatAllRows:function(){return"All"},formatAutoRefresh:function(){return"Auto Refresh"},formatExport:function(){return"Export data"},formatJumpTo:function(){return"GO"},formatAdvancedSearch:function(){return"Advanced search"},formatAdvancedCloseButton:function(){return"Close"},formatFilterControlSwitch:function(){return"Hide/Show controls"},formatFilterControlSwitchHide:function(){return"Hide controls"},formatFilterControlSwitchShow:function(){return"Show controls"}},r.default.extend(r.default.fn.bootstrapTable.defaults,r.default.fn.bootstrapTable.locales["en-US"])})); diff --git a/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js index 5fdfd2ee58..941ec06bfa 100644 --- a/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js +++ b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js @@ -1,17 +1,28 @@ (function (global, factory) { - if (typeof define === "function" && define.amd) { - define([], factory); - } else if (typeof exports !== "undefined") { - factory(); - } else { - var mod = { - exports: {} - }; - factory(); - global.bootstrapTable = mod.exports; + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : + typeof define === 'function' && define.amd ? define(['jquery'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BootstrapTable = factory(global.jQuery)); +}(this, (function ($) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var $__default = /*#__PURE__*/_interopDefaultLegacy($); + + function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); } -})(this, function () { - 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { @@ -19,2634 +30,6084 @@ } } - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - var _slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; - }(); - - function _toConsumableArray(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } else { - return Array.from(arr); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); } } - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } - /** - * @author zhixin wen - * version: 1.14.2 - * https://github.com/wenzhixin/bootstrap-table/ - */ + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); + } - (function ($) { - // TOOLS DEFINITION - // ====================== + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + + function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; - var bootstrapVersion = 4; try { - var rawVersion = $.fn.dropdown.Constructor.VERSION; + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); - // Only try to parse VERSION if is is defined. - // It is undefined in older versions of Bootstrap (tested with 3.1.1). - if (rawVersion !== undefined) { - bootstrapVersion = parseInt(rawVersion, 10); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; } - } catch (e) { - // ignore } - var constants = { - 3: { - theme: 'bootstrap3', - iconsPrefix: 'glyphicon', - icons: { - paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down', - paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up', - refresh: 'glyphicon-refresh icon-refresh', - toggleOff: 'glyphicon-list-alt icon-list-alt', - toggleOn: 'glyphicon-list-alt icon-list-alt', - columns: 'glyphicon-th icon-th', - detailOpen: 'glyphicon-plus icon-plus', - detailClose: 'glyphicon-minus icon-minus', - fullscreen: 'glyphicon-fullscreen' - }, - classes: { - buttonsPrefix: 'btn', - buttons: 'default', - buttonsGroup: 'btn-group', - buttonsDropdown: 'btn-group', - pull: 'pull', - inputGroup: '', - input: 'form-control', - paginationDropdown: 'btn-group dropdown', - dropup: 'dropup', - dropdownActive: 'active', - paginationActive: 'active' - }, - html: { - toobarDropdow: [''], - toobarDropdowItem: '
  • ', - pageDropdown: [''], - pageDropdownItem: '', - dropdownCaret: '', - pagination: ['
      ', '
    '], - paginationItem: '
  • %s
  • ', - icon: '' - } - }, - 4: { - theme: 'bootstrap4', - iconsPrefix: 'fa', - icons: { - paginationSwitchDown: 'fa-caret-square-down', - paginationSwitchUp: 'fa-caret-square-up', - refresh: 'fa-sync', - toggleOff: 'fa-toggle-off', - toggleOn: 'fa-toggle-on', - columns: 'fa-th-list', - fullscreen: 'fa-arrows-alt', - detailOpen: 'fa-plus', - detailClose: 'fa-minus' - }, - classes: { - buttonsPrefix: 'btn', - buttons: 'secondary', - buttonsGroup: 'btn-group', - buttonsDropdown: 'btn-group', - pull: 'float', - inputGroup: '', - input: 'form-control', - paginationDropdown: 'btn-group dropdown', - dropup: 'dropup', - dropdownActive: 'active', - paginationActive: 'active' - }, - html: { - toobarDropdow: [''], - toobarDropdowItem: '', - pageDropdown: [''], - pageDropdownItem: '%s', - dropdownCaret: '', - pagination: ['
      ', '
    '], - paginationItem: '
  • %s
  • ', - icon: '' - } - } - }[bootstrapVersion]; + return _arr; + } - var Utils = { - bootstrapVersion: bootstrapVersion, + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } - sprintf: function sprintf(_str) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; - var flag = true; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + function _createForOfIteratorHelper(o, allowArrayLike) { + var it; + + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; var i = 0; - var str = _str.replace(/%s/g, function () { - var arg = args[i++]; + var F = function () {}; - if (typeof arg === 'undefined') { - flag = false; - return ''; + return { + s: F, + n: function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function (e) { + throw e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var normalCompletion = true, + didErr = false, + err; + return { + s: function () { + it = o[Symbol.iterator](); + }, + n: function () { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function (e) { + didErr = true; + err = e; + }, + f: function () { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var check = function (it) { + return it && it.Math == Math && it; + }; + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global_1 = + /* global globalThis -- safe */ + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + check(typeof self == 'object' && self) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + var fails = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + + // Detect IE8's incomplete defineProperty implementation + var descriptors = !fails(function () { + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; + }); + + var nativePropertyIsEnumerable = {}.propertyIsEnumerable; + var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor; + + // Nashorn ~ JDK8 bug + var NASHORN_BUG = getOwnPropertyDescriptor$4 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + + // `Object.prototype.propertyIsEnumerable` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable + var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor$4(this, V); + return !!descriptor && descriptor.enumerable; + } : nativePropertyIsEnumerable; + + var objectPropertyIsEnumerable = { + f: f$4 + }; + + var createPropertyDescriptor = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var toString = {}.toString; + + var classofRaw = function (it) { + return toString.call(it).slice(8, -1); + }; + + var split = ''.split; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var indexedObject = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !Object('z').propertyIsEnumerable(0); + }) ? function (it) { + return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); + } : Object; + + // `RequireObjectCoercible` abstract operation + // https://tc39.es/ecma262/#sec-requireobjectcoercible + var requireObjectCoercible = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // toObject with fallback for non-array-like ES3 strings + + + + var toIndexedObject = function (it) { + return indexedObject(requireObjectCoercible(it)); + }; + + var isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + // `ToPrimitive` abstract operation + // https://tc39.es/ecma262/#sec-toprimitive + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var toPrimitive = function (input, PREFERRED_STRING) { + if (!isObject(input)) return input; + var fn, val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var hasOwnProperty = {}.hasOwnProperty; + + var has$1 = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var document$1 = global_1.document; + // typeof document.createElement is 'object' in old IE + var EXISTS = isObject(document$1) && isObject(document$1.createElement); + + var documentCreateElement = function (it) { + return EXISTS ? document$1.createElement(it) : {}; + }; + + // Thank's IE8 for his funny defineProperty + var ie8DomDefine = !descriptors && !fails(function () { + return Object.defineProperty(documentCreateElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; + }); + + var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor + var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (ie8DomDefine) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); + }; + + var objectGetOwnPropertyDescriptor = { + f: f$3 + }; + + var anObject = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; + }; + + var nativeDefineProperty = Object.defineProperty; + + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (ie8DomDefine) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var objectDefineProperty = { + f: f$2 + }; + + var createNonEnumerableProperty = descriptors ? function (object, key, value) { + return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var setGlobal = function (key, value) { + try { + createNonEnumerableProperty(global_1, key, value); + } catch (error) { + global_1[key] = value; + } return value; + }; + + var SHARED = '__core-js_shared__'; + var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); + + var sharedStore = store$1; + + var functionToString = Function.toString; + + // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper + if (typeof sharedStore.inspectSource != 'function') { + sharedStore.inspectSource = function (it) { + return functionToString.call(it); + }; + } + + var inspectSource = sharedStore.inspectSource; + + var WeakMap$1 = global_1.WeakMap; + + var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1)); + + var shared = createCommonjsModule(function (module) { + (module.exports = function (key, value) { + return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: '3.9.1', + mode: 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' + }); + }); + + var id = 0; + var postfix = Math.random(); + + var uid = function (key) { + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); + }; + + var keys$2 = shared('keys'); + + var sharedKey = function (key) { + return keys$2[key] || (keys$2[key] = uid(key)); + }; + + var hiddenKeys$1 = {}; + + var WeakMap = global_1.WeakMap; + var set, get, has; + + var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); + }; + + var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; + }; + + if (nativeWeakMap) { + var store = sharedStore.state || (sharedStore.state = new WeakMap()); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function (it, metadata) { + metadata.facade = it; + wmset.call(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store, it) || {}; + }; + has = function (it) { + return wmhas.call(store, it); + }; + } else { + var STATE = sharedKey('state'); + hiddenKeys$1[STATE] = true; + set = function (it, metadata) { + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return has$1(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return has$1(it, STATE); + }; + } + + var internalState = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor + }; + + var redefine = createCommonjsModule(function (module) { + var getInternalState = internalState.get; + var enforceInternalState = internalState.enforce; + var TEMPLATE = String(String).split('String'); + + (module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var state; + if (typeof value == 'function') { + if (typeof key == 'string' && !has$1(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + } + if (O === global_1) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else createNonEnumerableProperty(O, key, value); + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || inspectSource(this); + }); + }); + + var path = global_1; + + var aFunction$1 = function (variable) { + return typeof variable == 'function' ? variable : undefined; + }; + + var getBuiltIn = function (namespace, method) { + return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace]) + : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; + }; + + var ceil = Math.ceil; + var floor$1 = Math.floor; + + // `ToInteger` abstract operation + // https://tc39.es/ecma262/#sec-tointeger + var toInteger = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$1 : ceil)(argument); + }; + + var min$6 = Math.min; + + // `ToLength` abstract operation + // https://tc39.es/ecma262/#sec-tolength + var toLength = function (argument) { + return argument > 0 ? min$6(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + }; + + var max$3 = Math.max; + var min$5 = Math.min; + + // Helper for a popular repeating case of the spec: + // Let integer be ? ToInteger(index). + // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). + var toAbsoluteIndex = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max$3(integer + length, 0) : min$5(integer, length); + }; + + // `Array.prototype.{ indexOf, includes }` methods implementation + var createMethod$4 = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var arrayIncludes = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod$4(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod$4(false) + }; + + var indexOf = arrayIncludes.indexOf; + + + var objectKeysInternal = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has$1(O, key = names[i++])) { + ~indexOf(result, key) || result.push(key); + } + return result; + }; + + // IE8- don't enum bug keys + var enumBugKeys = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + + var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return objectKeysInternal(O, hiddenKeys); + }; + + var objectGetOwnPropertyNames = { + f: f$1 + }; + + var f = Object.getOwnPropertySymbols; + + var objectGetOwnPropertySymbols = { + f: f + }; + + // all object keys, includes non-enumerable and symbols + var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = objectGetOwnPropertyNames.f(anObject(it)); + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; + }; + + var copyConstructorProperties = function (target, source) { + var keys = ownKeys(source); + var defineProperty = objectDefineProperty.f; + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + }; + + var replacement = /#|\.prototype\./; + + var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; + }; + + var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); + }; + + var data = isForced.data = {}; + var NATIVE = isForced.NATIVE = 'N'; + var POLYFILL = isForced.POLYFILL = 'P'; + + var isForced_1 = isForced; + + var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; + + + + + + + /* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target + */ + var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global_1; + } else if (STATIC) { + target = global_1[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global_1[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor$3(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } + }; + + // a string of all valid unicode whitespaces + var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + var whitespace = '[' + whitespaces + ']'; + var ltrim = RegExp('^' + whitespace + whitespace + '*'); + var rtrim = RegExp(whitespace + whitespace + '*$'); + + // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation + var createMethod$3 = function (TYPE) { + return function ($this) { + var string = String(requireObjectCoercible($this)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }; + }; + + var stringTrim = { + // `String.prototype.{ trimLeft, trimStart }` methods + // https://tc39.es/ecma262/#sec-string.prototype.trimstart + start: createMethod$3(1), + // `String.prototype.{ trimRight, trimEnd }` methods + // https://tc39.es/ecma262/#sec-string.prototype.trimend + end: createMethod$3(2), + // `String.prototype.trim` method + // https://tc39.es/ecma262/#sec-string.prototype.trim + trim: createMethod$3(3) + }; + + var non = '\u200B\u0085\u180E'; + + // check that a method works with the correct list + // of whitespaces and has a correct name + var stringTrimForced = function (METHOD_NAME) { + return fails(function () { + return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME; + }); + }; + + var $trim = stringTrim.trim; + + + // `String.prototype.trim` method + // https://tc39.es/ecma262/#sec-string.prototype.trim + _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, { + trim: function trim() { + return $trim(this); + } + }); + + var arrayMethodIsStrict = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing + method.call(null, argument || function () { throw 1; }, 1); + }); + }; + + var nativeJoin = [].join; + + var ES3_STRINGS = indexedObject != Object; + var STRICT_METHOD$3 = arrayMethodIsStrict('join', ','); + + // `Array.prototype.join` method + // https://tc39.es/ecma262/#sec-array.prototype.join + _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$3 }, { + join: function join(separator) { + return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); + } + }); + + // `RegExp.prototype.flags` getter implementation + // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags + var regexpFlags = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.dotAll) result += 's'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, + // so we use an intermediate function. + function RE(s, f) { + return RegExp(s, f); + } + + var UNSUPPORTED_Y$2 = fails(function () { + // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError + var re = RE('a', 'y'); + re.lastIndex = 2; + return re.exec('abcd') != null; + }); + + var BROKEN_CARET = fails(function () { + // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 + var re = RE('^r', 'gy'); + re.lastIndex = 2; + return re.exec('str') != null; + }); + + var regexpStickyHelpers = { + UNSUPPORTED_Y: UNSUPPORTED_Y$2, + BROKEN_CARET: BROKEN_CARET + }; + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; + })(); + + var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET; + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + var sticky = UNSUPPORTED_Y$1 && re.sticky; + var flags = regexpFlags.call(re); + var source = re.source; + var charsAdded = 0; + var strCopy = str; + + if (sticky) { + flags = flags.replace('y', ''); + if (flags.indexOf('g') === -1) { + flags += 'g'; + } + + strCopy = String(str).slice(re.lastIndex); + // Support anchored sticky behavior. + if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { + source = '(?: ' + source + ')'; + strCopy = ' ' + strCopy; + charsAdded++; + } + // ^(? + rx + ) is needed, in combination with some str slicing, to + // simulate the 'y' flag. + reCopy = new RegExp('^(?:' + source + ')', flags); + } + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + source + '$(?!\\s)', flags); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = nativeExec.call(sticky ? reCopy : re, strCopy); + + if (sticky) { + if (match) { + match.input = match.input.slice(charsAdded); + match[0] = match[0].slice(charsAdded); + match.index = re.lastIndex; + re.lastIndex += match[0].length; + } else re.lastIndex = 0; + } else if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; } - return arg; }); - return flag ? str : ''; - }, - isEmptyObject: function isEmptyObject() { - var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + } - return function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(obj).length === 0 && obj.constructor === Object; - }, - isNumeric: function isNumeric(n) { - return !isNaN(parseFloat(n)) && isFinite(n); - }, - getFieldTitle: function getFieldTitle(list, value) { - for (var _iterator = list, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; + return match; + }; + } - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; + var regexpExec = patchedExec; + + // `RegExp.prototype.exec` method + // https://tc39.es/ecma262/#sec-regexp.prototype.exec + _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { + exec: regexpExec + }); + + var engineIsNode = classofRaw(global_1.process) == 'process'; + + var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; + + var process = global_1.process; + var versions = process && process.versions; + var v8 = versions && versions.v8; + var match, version; + + if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; + } else if (engineUserAgent) { + match = engineUserAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = engineUserAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } + } + + var engineV8Version = version && +version; + + var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { + /* global Symbol -- required for testing */ + return !Symbol.sham && + // Chrome 38 Symbol has incorrect toString conversion + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41); + }); + + var useSymbolAsUid = nativeSymbol + /* global Symbol -- safe */ + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; + + var WellKnownSymbolsStore = shared('wks'); + var Symbol$1 = global_1.Symbol; + var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; + + var wellKnownSymbol = function (name) { + if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { + if (nativeSymbol && has$1(Symbol$1, name)) { + WellKnownSymbolsStore[name] = Symbol$1[name]; + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); + } + } return WellKnownSymbolsStore[name]; + }; + + // TODO: Remove from `core-js@4` since it's moved to entry points + + + + + + + + var SPECIES$5 = wellKnownSymbol('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; + }); + + // IE <= 11 replaces $0 with the whole match, as if it was $& + // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 + var REPLACE_KEEPS_$0 = (function () { + return 'a'.replace(/./, '$0') === '$0'; + })(); + + var REPLACE = wellKnownSymbol('replace'); + // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string + var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { + if (/./[REPLACE]) { + return /./[REPLACE]('a', '$0') === ''; + } + return false; + })(); + + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + // Weex JS has frozen built-in prototypes, so use try / catch wrapper + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + // eslint-disable-next-line regexp/no-empty-group -- required for testing + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; + }); + + var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { + var SYMBOL = wellKnownSymbol(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES$5] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; + } + + re.exec = function () { execCalled = true; return null; }; + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !( + REPLACE_SUPPORTS_NAMED_GROUPS && + REPLACE_KEEPS_$0 && + !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + )) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, { + REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, + REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + }); + var stringMethod = methods[0]; + var regexMethod = methods[1]; - var item = _ref; + redefine(String.prototype, KEY, stringMethod); + redefine(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return regexMethod.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return regexMethod.call(string, this); } + ); + } + + if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); + }; + + var MATCH$2 = wellKnownSymbol('match'); + + // `IsRegExp` abstract operation + // https://tc39.es/ecma262/#sec-isregexp + var isRegexp = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); + }; + + var aFunction = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; + }; + + var SPECIES$4 = wellKnownSymbol('species'); + + // `SpeciesConstructor` abstract operation + // https://tc39.es/ecma262/#sec-speciesconstructor + var speciesConstructor = function (O, defaultConstructor) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction(S); + }; + + // `String.prototype.{ codePointAt, at }` methods implementation + var createMethod$2 = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = String(requireObjectCoercible($this)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING ? S.charAt(position) : first + : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; + }; + + var stringMultibyte = { + // `String.prototype.codePointAt` method + // https://tc39.es/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod$2(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod$2(true) + }; + + var charAt = stringMultibyte.charAt; + + // `AdvanceStringIndex` abstract operation + // https://tc39.es/ecma262/#sec-advancestringindex + var advanceStringIndex = function (S, index, unicode) { + return index + (unicode ? charAt(S, index).length : 1); + }; + + // `RegExpExec` abstract operation + // https://tc39.es/ecma262/#sec-regexpexec + var regexpExecAbstract = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classofRaw(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); + }; + + var arrayPush = [].push; + var min$4 = Math.min; + var MAX_UINT32 = 0xFFFFFFFF; + + // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); + + // @@split logic + fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { + var internalSplit; + if ( + 'abbc'.split(/(b)*/)[1] == 'c' || + // eslint-disable-next-line regexp/no-empty-group -- required for testing + 'test'.split(/(?:)/, -1).length != 4 || + 'ab'.split(/(?:ab)*/).length != 2 || + '.'.split(/(.?)(.?)/).length != 4 || + // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing + '.'.split(/()()/).length > 1 || + ''.split(/.?/).length + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(requireObjectCoercible(this)); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (separator === undefined) return [string]; + // If `separator` is not a regex, use native split + if (!isRegexp(separator)) { + return nativeSplit.call(string, separator, lim); + } + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy.lastIndex; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= lim) break; + } + if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output.length > lim ? output.slice(0, lim) : output; + }; + // Chakra, V8 + } else if ('0'.split(undefined, 0).length) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); + }; + } else internalSplit = nativeSplit; + + return [ + // `String.prototype.split` method + // https://tc39.es/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = requireObjectCoercible(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = min$4(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; + }, !SUPPORTS_Y); + + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + var objectKeys = Object.keys || function keys(O) { + return objectKeysInternal(O, enumBugKeys); + }; + + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); + return O; + }; + + var html = getBuiltIn('document', 'documentElement'); + + var GT = '>'; + var LT = '<'; + var PROTOTYPE = 'prototype'; + var SCRIPT = 'script'; + var IE_PROTO$1 = sharedKey('IE_PROTO'); + + var EmptyConstructor = function () { /* empty */ }; + + var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; + }; + + // Create object with fake `null` prototype: use ActiveX Object with cleared prototype + var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; + }; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; + }; + + // Check for document.domain and active x support + // No need to use active x approach when document.domain is not set + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + // avoid IE GC bug + var activeXDocument; + var NullProtoObject = function () { + try { + /* global ActiveXObject -- old IE */ + activeXDocument = document.domain && new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); + }; + + hiddenKeys$1[IE_PROTO$1] = true; + + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO$1] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : objectDefineProperties(result, Properties); + }; + + var UNSCOPABLES = wellKnownSymbol('unscopables'); + var ArrayPrototype = Array.prototype; + + // Array.prototype[@@unscopables] + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + if (ArrayPrototype[UNSCOPABLES] == undefined) { + objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: objectCreate(null) + }); + } + + // add a key to Array.prototype[@@unscopables] + var addToUnscopables = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; + }; + + var $includes = arrayIncludes.includes; + + + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + _export({ target: 'Array', proto: true }, { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables('includes'); + + // `IsArray` abstract operation + // https://tc39.es/ecma262/#sec-isarray + var isArray = Array.isArray || function isArray(arg) { + return classofRaw(arg) == 'Array'; + }; + + // `ToObject` abstract operation + // https://tc39.es/ecma262/#sec-toobject + var toObject = function (argument) { + return Object(requireObjectCoercible(argument)); + }; + + var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; + }; + + var SPECIES$3 = wellKnownSymbol('species'); + + // `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES$3]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); + }; + + var SPECIES$2 = wellKnownSymbol('species'); + + var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return engineV8Version >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES$2] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); + }; + + var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); + var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF; + var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/679 + var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; + }); + + var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + + var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); + }; + + var FORCED$4 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + + // `Array.prototype.concat` method + // https://tc39.es/ecma262/#sec-array.prototype.concat + // with adding support of @@isConcatSpreadable and @@species + _export({ target: 'Array', proto: true, forced: FORCED$4 }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } + }); + + // optional / simple context binding + var functionBindContext = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var push = [].push; + + // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation + var createMethod$1 = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var IS_FILTER_OUT = TYPE == 7; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject($this); + var self = indexedObject(O); + var boundFunction = functionBindContext(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push.call(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push.call(target, value); // filterOut + } + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; + }; + + var arrayIteration = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod$1(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod$1(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod$1(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod$1(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod$1(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod$1(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod$1(6), + // `Array.prototype.filterOut` method + // https://github.com/tc39/proposal-array-filtering + filterOut: createMethod$1(7) + }; + + var $find = arrayIteration.find; + + + var FIND = 'find'; + var SKIPS_HOLES$1 = true; + + // Shouldn't skip holes + if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES$1 = false; }); + + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + _export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 }, { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables(FIND); + + var notARegexp = function (it) { + if (isRegexp(it)) { + throw TypeError("The method doesn't accept regular expressions"); + } return it; + }; + + var MATCH$1 = wellKnownSymbol('match'); + + var correctIsRegexpLogic = function (METHOD_NAME) { + var regexp = /./; + try { + '/./'[METHOD_NAME](regexp); + } catch (error1) { + try { + regexp[MATCH$1] = false; + return '/./'[METHOD_NAME](regexp); + } catch (error2) { /* empty */ } + } return false; + }; + + // `String.prototype.includes` method + // https://tc39.es/ecma262/#sec-string.prototype.includes + _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { + includes: function includes(searchString /* , position = 0 */) { + return !!~String(requireObjectCoercible(this)) + .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // iterable DOM collections + // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods + var domIterables = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + }; + + var $forEach = arrayIteration.forEach; + + + var STRICT_METHOD$2 = arrayMethodIsStrict('forEach'); + + // `Array.prototype.forEach` method implementation + // https://tc39.es/ecma262/#sec-array.prototype.foreach + var arrayForEach = !STRICT_METHOD$2 ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } : [].forEach; + + for (var COLLECTION_NAME$1 in domIterables) { + var Collection$1 = global_1[COLLECTION_NAME$1]; + var CollectionPrototype$1 = Collection$1 && Collection$1.prototype; + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype$1 && CollectionPrototype$1.forEach !== arrayForEach) try { + createNonEnumerableProperty(CollectionPrototype$1, 'forEach', arrayForEach); + } catch (error) { + CollectionPrototype$1.forEach = arrayForEach; + } + } + + var trim$2 = stringTrim.trim; + + + var $parseFloat = global_1.parseFloat; + var FORCED$3 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity; + + // `parseFloat` method + // https://tc39.es/ecma262/#sec-parsefloat-string + var numberParseFloat = FORCED$3 ? function parseFloat(string) { + var trimmedString = trim$2(String(string)); + var result = $parseFloat(trimmedString); + return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result; + } : $parseFloat; + + // `parseFloat` method + // https://tc39.es/ecma262/#sec-parsefloat-string + _export({ global: true, forced: parseFloat != numberParseFloat }, { + parseFloat: numberParseFloat + }); + + var propertyIsEnumerable = objectPropertyIsEnumerable.f; + + // `Object.{ entries, values }` methods implementation + var createMethod = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!descriptors || propertyIsEnumerable.call(O, key)) { + result.push(TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + var objectToArray = { + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + entries: createMethod(true), + // `Object.values` method + // https://tc39.es/ecma262/#sec-object.values + values: createMethod(false) + }; + + var $entries = objectToArray.entries; + + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + _export({ target: 'Object', stat: true }, { + entries: function entries(O) { + return $entries(O); + } + }); + + var $indexOf = arrayIncludes.indexOf; + + + var nativeIndexOf = [].indexOf; + + var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; + var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf'); + + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 }, { + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? nativeIndexOf.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + var test$2 = []; + var nativeSort = test$2.sort; + + // IE8- + var FAILS_ON_UNDEFINED = fails(function () { + test$2.sort(undefined); + }); + // V8 bug + var FAILS_ON_NULL = fails(function () { + test$2.sort(null); + }); + // Old WebKit + var STRICT_METHOD = arrayMethodIsStrict('sort'); + + var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD; + + // `Array.prototype.sort` method + // https://tc39.es/ecma262/#sec-array.prototype.sort + _export({ target: 'Array', proto: true, forced: FORCED$2 }, { + sort: function sort(comparefn) { + return comparefn === undefined + ? nativeSort.call(toObject(this)) + : nativeSort.call(toObject(this), aFunction(comparefn)); + } + }); + + var floor = Math.floor; + var replace = ''.replace; + var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; + + // https://tc39.es/ecma262/#sec-getsubstitution + var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + }; + + var max$2 = Math.max; + var min$3 = Math.min; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { + var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; + var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; + var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; + + return [ + // `String.prototype.replace` method + // https://tc39.es/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; + return replacer !== undefined + ? replacer.call(searchValue, O, replaceValue) + : nativeReplace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + if ( + (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || + (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) + ) { + var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); + if (res.done) return res.value; + } + + var rx = anObject(regexp); + var S = String(this); + + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regexpExecAbstract(rx, S); + if (result === null) break; + + results.push(result); + if (!global) break; + + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + + var matched = String(result[0]); + var position = max$2(min$3(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + }); + + var nativeAssign = Object.assign; + var defineProperty$3 = Object.defineProperty; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + var objectAssign = !nativeAssign || fails(function () { + // should have correct order of operations (Edge bug) + if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$3({}, 'a', { + enumerable: true, + get: function () { + defineProperty$3(this, 'b', { + value: 3, + enumerable: false + }); + } + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + /* global Symbol -- required for testing */ + var symbol = Symbol(); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + var propertyIsEnumerable = objectPropertyIsEnumerable.f; + while (argumentsLength > index) { + var S = indexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; + } + } return T; + } : nativeAssign; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { + assign: objectAssign + }); + + var $filter = arrayIteration.filter; + + + var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('filter'); + + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + // with adding support of @@species + _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 }, { + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // `SameValue` abstract operation + // https://tc39.es/ecma262/#sec-samevalue + var sameValue = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare -- NaN check + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + // @@search logic + fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.es/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = requireObjectCoercible(this); + var searcher = regexp == undefined ? undefined : regexp[SEARCH]; + return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative(nativeSearch, regexp, this); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regexpExecAbstract(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; + }); + + var trim$1 = stringTrim.trim; + + + var $parseInt = global_1.parseInt; + var hex = /^[+-]?0[Xx]/; + var FORCED$1 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22; + + // `parseInt` method + // https://tc39.es/ecma262/#sec-parseint-string-radix + var numberParseInt = FORCED$1 ? function parseInt(string, radix) { + var S = trim$1(String(string)); + return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10)); + } : $parseInt; + + // `parseInt` method + // https://tc39.es/ecma262/#sec-parseint-string-radix + _export({ global: true, forced: parseInt != numberParseInt }, { + parseInt: numberParseInt + }); + + var $map = arrayIteration.map; + + + var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map'); + + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + // with adding support of @@species + _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, { + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + var $findIndex = arrayIteration.findIndex; + + + var FIND_INDEX = 'findIndex'; + var SKIPS_HOLES = true; + + // Shouldn't skip holes + if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; }); + + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findindex + _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables(FIND_INDEX); + + var aPossiblePrototype = function (it) { + if (!isObject(it) && it !== null) { + throw TypeError("Can't set " + String(it) + ' as a prototype'); + } return it; + }; + + /* eslint-disable no-proto -- safe */ + + + + // `Object.setPrototypeOf` method + // https://tc39.es/ecma262/#sec-object.setprototypeof + // Works with __proto__ only. Old v8 can't work with null proto objects. + var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; + setter.call(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter.call(O, proto); + else O.__proto__ = proto; + return O; + }; + }() : undefined); + + // makes subclassing work correct for wrapped built-ins + var inheritIfRequired = function ($this, dummy, Wrapper) { + var NewTarget, NewTargetPrototype; + if ( + // it can work only with native `setPrototypeOf` + objectSetPrototypeOf && + // we haven't completely correct pre-ES6 way for getting `new.target`, so use this + typeof (NewTarget = dummy.constructor) == 'function' && + NewTarget !== Wrapper && + isObject(NewTargetPrototype = NewTarget.prototype) && + NewTargetPrototype !== Wrapper.prototype + ) objectSetPrototypeOf($this, NewTargetPrototype); + return $this; + }; + + var SPECIES$1 = wellKnownSymbol('species'); + + var setSpecies = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = objectDefineProperty.f; + + if (descriptors && Constructor && !Constructor[SPECIES$1]) { + defineProperty(Constructor, SPECIES$1, { + configurable: true, + get: function () { return this; } + }); + } + }; + + var defineProperty$2 = objectDefineProperty.f; + var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f; + + + + + + var setInternalState$1 = internalState.set; + + + + var MATCH = wellKnownSymbol('match'); + var NativeRegExp = global_1.RegExp; + var RegExpPrototype$1 = NativeRegExp.prototype; + var re1 = /a/g; + var re2 = /a/g; + + // "new" should create a new object, old webkit bug + var CORRECT_NEW = new NativeRegExp(re1) !== re1; + + var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y; + + var FORCED = descriptors && isForced_1('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () { + re2[MATCH] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; + }))); + + // `RegExp` constructor + // https://tc39.es/ecma262/#sec-regexp-constructor + if (FORCED) { + var RegExpWrapper = function RegExp(pattern, flags) { + var thisIsRegExp = this instanceof RegExpWrapper; + var patternIsRegExp = isRegexp(pattern); + var flagsAreUndefined = flags === undefined; + var sticky; + + if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) { + return pattern; + } + + if (CORRECT_NEW) { + if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source; + } else if (pattern instanceof RegExpWrapper) { + if (flagsAreUndefined) flags = regexpFlags.call(pattern); + pattern = pattern.source; + } + + if (UNSUPPORTED_Y) { + sticky = !!flags && flags.indexOf('y') > -1; + if (sticky) flags = flags.replace(/y/g, ''); + } + + var result = inheritIfRequired( + CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags), + thisIsRegExp ? this : RegExpPrototype$1, + RegExpWrapper + ); + + if (UNSUPPORTED_Y && sticky) setInternalState$1(result, { sticky: sticky }); + + return result; + }; + var proxy = function (key) { + key in RegExpWrapper || defineProperty$2(RegExpWrapper, key, { + configurable: true, + get: function () { return NativeRegExp[key]; }, + set: function (it) { NativeRegExp[key] = it; } + }); + }; + var keys$1 = getOwnPropertyNames$1(NativeRegExp); + var index = 0; + while (keys$1.length > index) proxy(keys$1[index++]); + RegExpPrototype$1.constructor = RegExpWrapper; + RegExpWrapper.prototype = RegExpPrototype$1; + redefine(global_1, 'RegExp', RegExpWrapper); + } + + // https://tc39.es/ecma262/#sec-get-regexp-@@species + setSpecies('RegExp'); + + var TO_STRING = 'toString'; + var RegExpPrototype = RegExp.prototype; + var nativeToString = RegExpPrototype[TO_STRING]; + + var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); + // FF44- RegExp#toString has a wrong name + var INCORRECT_NAME = nativeToString.name != TO_STRING; + + // `RegExp.prototype.toString` method + // https://tc39.es/ecma262/#sec-regexp.prototype.tostring + if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = String(R.source); + var rf = R.flags; + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); + } + + var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag'); + var test$1 = {}; + + test$1[TO_STRING_TAG$3] = 'z'; + + var toStringTagSupport = String(test$1) === '[object z]'; + + var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag'); + // ES3 wrong here + var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { /* empty */ } + }; + + // getting tag from ES6+ `Object.prototype.toString` + var classof = toStringTagSupport ? classofRaw : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$2)) == 'string' ? tag + // builtinTag case + : CORRECT_ARGUMENTS ? classofRaw(O) + // ES3 arguments fallback + : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; + }; + + // `Object.prototype.toString` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.tostring + var objectToString = toStringTagSupport ? {}.toString : function toString() { + return '[object ' + classof(this) + ']'; + }; + + // `Object.prototype.toString` method + // https://tc39.es/ecma262/#sec-object.prototype.tostring + if (!toStringTagSupport) { + redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); + } + + var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice'); + + var SPECIES = wellKnownSymbol('species'); + var nativeSlice = [].slice; + var max$1 = Math.max; + + // `Array.prototype.slice` method + // https://tc39.es/ecma262/#sec-array.prototype.slice + // fallback for not array-like ES3 strings and DOM objects + _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { + slice: function slice(start, end) { + var O = toIndexedObject(this); + var length = toLength(O.length); + var k = toAbsoluteIndex(start, length); + var fin = toAbsoluteIndex(end === undefined ? length : end, length); + // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible + var Constructor, result, n; + if (isArray(O)) { + Constructor = O.constructor; + // cross-realm fallback + if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { + Constructor = undefined; + } else if (isObject(Constructor)) { + Constructor = Constructor[SPECIES]; + if (Constructor === null) Constructor = undefined; + } + if (Constructor === Array || Constructor === undefined) { + return nativeSlice.call(O, k, fin); + } + } + result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0)); + for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); + result.length = n; + return result; + } + }); + + var correctPrototypeGetter = !fails(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + return Object.getPrototypeOf(new F()) !== F.prototype; + }); + + var IE_PROTO = sharedKey('IE_PROTO'); + var ObjectPrototype = Object.prototype; + + // `Object.getPrototypeOf` method + // https://tc39.es/ecma262/#sec-object.getprototypeof + var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) { + O = toObject(O); + if (has$1(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectPrototype : null; + }; + + var ITERATOR$2 = wellKnownSymbol('iterator'); + var BUGGY_SAFARI_ITERATORS$1 = false; + + var returnThis$1 = function () { return this; }; + + // `%IteratorPrototype%` object + // https://tc39.es/ecma262/#sec-%iteratorprototype%-object + var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator; + + if ([].keys) { + arrayIterator = [].keys(); + // Safari 8 has buggy iterators w/o `next` + if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true; + else { + PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype; + } + } + + var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () { + var test = {}; + // FF44- legacy iterators case + return IteratorPrototype$2[ITERATOR$2].call(test) !== test; + }); + + if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + if (!has$1(IteratorPrototype$2, ITERATOR$2)) { + createNonEnumerableProperty(IteratorPrototype$2, ITERATOR$2, returnThis$1); + } + + var iteratorsCore = { + IteratorPrototype: IteratorPrototype$2, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1 + }; + + var defineProperty$1 = objectDefineProperty.f; + + + + var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); + + var setToStringTag = function (it, TAG, STATIC) { + if (it && !has$1(it = STATIC ? it : it.prototype, TO_STRING_TAG$1)) { + defineProperty$1(it, TO_STRING_TAG$1, { configurable: true, value: TAG }); + } + }; + + var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; + + var createIteratorConstructor = function (IteratorConstructor, NAME, next) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false); + return IteratorConstructor; + }; + + var IteratorPrototype = iteratorsCore.IteratorPrototype; + var BUGGY_SAFARI_ITERATORS = iteratorsCore.BUGGY_SAFARI_ITERATORS; + var ITERATOR$1 = wellKnownSymbol('iterator'); + var KEYS = 'keys'; + var VALUES = 'values'; + var ENTRIES = 'entries'; + + var returnThis = function () { return this; }; + + var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } return function () { return new IteratorConstructor(this); }; + }; + + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR$1] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable())); + if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (objectSetPrototypeOf) { + objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') { + createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis); + } + } + // Set @@toStringTag to native iterators + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true); + } + } + + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return nativeIterator.call(this); }; + } + + // define iterator + if (IterablePrototype[ITERATOR$1] !== defaultIterator) { + createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator); + } + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + redefine(IterablePrototype, KEY, methods[KEY]); + } + } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); + } + + return methods; + }; + + var ARRAY_ITERATOR = 'Array Iterator'; + var setInternalState = internalState.set; + var getInternalState = internalState.getterFor(ARRAY_ITERATOR); + + // `Array.prototype.entries` method + // https://tc39.es/ecma262/#sec-array.prototype.entries + // `Array.prototype.keys` method + // https://tc39.es/ecma262/#sec-array.prototype.keys + // `Array.prototype.values` method + // https://tc39.es/ecma262/#sec-array.prototype.values + // `Array.prototype[@@iterator]` method + // https://tc39.es/ecma262/#sec-array.prototype-@@iterator + // `CreateArrayIterator` internal method + // https://tc39.es/ecma262/#sec-createarrayiterator + var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) { + setInternalState(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject(iterated), // target + index: 0, // next index + kind: kind // kind + }); + // `%ArrayIteratorPrototype%.next` method + // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next + }, function () { + var state = getInternalState(this); + var target = state.target; + var kind = state.kind; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return { value: undefined, done: true }; + } + if (kind == 'keys') return { value: index, done: false }; + if (kind == 'values') return { value: target[index], done: false }; + return { value: [index, target[index]], done: false }; + }, 'values'); + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + + var ITERATOR = wellKnownSymbol('iterator'); + var TO_STRING_TAG = wellKnownSymbol('toStringTag'); + var ArrayValues = es_array_iterator.values; + + for (var COLLECTION_NAME in domIterables) { + var Collection = global_1[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + if (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[ITERATOR] !== ArrayValues) try { + createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); + } catch (error) { + CollectionPrototype[ITERATOR] = ArrayValues; + } + if (!CollectionPrototype[TO_STRING_TAG]) { + createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); + } + if (domIterables[COLLECTION_NAME]) for (var METHOD_NAME in es_array_iterator) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try { + createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, es_array_iterator[METHOD_NAME]); + } catch (error) { + CollectionPrototype[METHOD_NAME] = es_array_iterator[METHOD_NAME]; + } + } + } + } + + var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); + + var max = Math.max; + var min$2 = Math.min; + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; + var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; + + // `Array.prototype.splice` method + // https://tc39.es/ecma262/#sec-array.prototype.splice + // with adding support of @@species + _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + splice: function splice(start, deleteCount /* , ...items */) { + var O = toObject(this); + var len = toLength(O.length); + var actualStart = toAbsoluteIndex(start, len); + var argumentsLength = arguments.length; + var insertCount, actualDeleteCount, A, k, from, to; + if (argumentsLength === 0) { + insertCount = actualDeleteCount = 0; + } else if (argumentsLength === 1) { + insertCount = 0; + actualDeleteCount = len - actualStart; + } else { + insertCount = argumentsLength - 2; + actualDeleteCount = min$2(max(toInteger(deleteCount), 0), len - actualStart); + } + if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { + throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); + } + A = arraySpeciesCreate(O, actualDeleteCount); + for (k = 0; k < actualDeleteCount; k++) { + from = actualStart + k; + if (from in O) createProperty(A, k, O[from]); + } + A.length = actualDeleteCount; + if (insertCount < actualDeleteCount) { + for (k = actualStart; k < len - actualDeleteCount; k++) { + from = k + actualDeleteCount; + to = k + insertCount; + if (from in O) O[to] = O[from]; + else delete O[to]; + } + for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; + } else if (insertCount > actualDeleteCount) { + for (k = len - actualDeleteCount; k > actualStart; k--) { + from = k + actualDeleteCount - 1; + to = k + insertCount - 1; + if (from in O) O[to] = O[from]; + else delete O[to]; + } + } + for (k = 0; k < insertCount; k++) { + O[k + actualStart] = arguments[k + 2]; + } + O.length = len - actualDeleteCount + insertCount; + return A; + } + }); + + var getOwnPropertyNames = objectGetOwnPropertyNames.f; + var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; + var defineProperty = objectDefineProperty.f; + var trim = stringTrim.trim; + + var NUMBER = 'Number'; + var NativeNumber = global_1[NUMBER]; + var NumberPrototype = NativeNumber.prototype; + + // Opera ~12 has broken Object#toString + var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER; + + // `ToNumber` abstract operation + // https://tc39.es/ecma262/#sec-tonumber + var toNumber = function (argument) { + var it = toPrimitive(argument, false); + var first, third, radix, maxCode, digits, length, index, code; + if (typeof it == 'string' && it.length > 2) { + it = trim(it); + first = it.charCodeAt(0); + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i + default: return +it; + } + digits = it.slice(2); + length = digits.length; + for (index = 0; index < length; index++) { + code = digits.charCodeAt(index); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; + }; + + // `Number` constructor + // https://tc39.es/ecma262/#sec-number-constructor + if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { + var NumberWrapper = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var dummy = this; + return dummy instanceof NumberWrapper + // check on 1..constructor(foo) case + && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER) + ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it); + }; + for (var keys = descriptors ? getOwnPropertyNames(NativeNumber) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES2015 (in case, if modules with ES2015 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' + + // ESNext + 'fromString,range' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has$1(NativeNumber, key = keys[j]) && !has$1(NumberWrapper, key)) { + defineProperty(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key)); + } + } + NumberWrapper.prototype = NumberPrototype; + NumberPrototype.constructor = NumberWrapper; + redefine(global_1, NUMBER, NumberWrapper); + } + + var nativeReverse = [].reverse; + var test = [1, 2]; + + // `Array.prototype.reverse` method + // https://tc39.es/ecma262/#sec-array.prototype.reverse + // fix for Safari 12.0 bug + // https://bugs.webkit.org/show_bug.cgi?id=188794 + _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, { + reverse: function reverse() { + // eslint-disable-next-line no-self-assign -- dirty hack + if (isArray(this)) this.length = this.length; + return nativeReverse.call(this); + } + }); + + /* eslint-disable no-unused-vars */ + + var VERSION = '1.18.3'; + var bootstrapVersion = 4; + + try { + var rawVersion = $__default['default'].fn.dropdown.Constructor.VERSION; // Only try to parse VERSION if it is defined. + // It is undefined in older versions of Bootstrap (tested with 3.1.1). + + if (rawVersion !== undefined) { + bootstrapVersion = parseInt(rawVersion, 10); + } + } catch (e) {// ignore + } + + try { + // eslint-disable-next-line no-undef + var _rawVersion = bootstrap.Tooltip.VERSION; + + if (_rawVersion !== undefined) { + bootstrapVersion = parseInt(_rawVersion, 10); + } + } catch (e) {// ignore + } + + var CONSTANTS = { + 3: { + iconsPrefix: 'glyphicon', + icons: { + paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down', + paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up', + refresh: 'glyphicon-refresh icon-refresh', + toggleOff: 'glyphicon-list-alt icon-list-alt', + toggleOn: 'glyphicon-list-alt icon-list-alt', + columns: 'glyphicon-th icon-th', + detailOpen: 'glyphicon-plus icon-plus', + detailClose: 'glyphicon-minus icon-minus', + fullscreen: 'glyphicon-fullscreen', + search: 'glyphicon-search', + clearSearch: 'glyphicon-trash' + }, + classes: { + buttonsPrefix: 'btn', + buttons: 'default', + buttonsGroup: 'btn-group', + buttonsDropdown: 'btn-group', + pull: 'pull', + inputGroup: 'input-group', + inputPrefix: 'input-', + input: 'form-control', + paginationDropdown: 'btn-group dropdown', + dropup: 'dropup', + dropdownActive: 'active', + paginationActive: 'active', + buttonActive: 'active' + }, + html: { + toolbarDropdown: [''], + toolbarDropdownItem: '', + toolbarDropdownSeparator: '
  • ', + pageDropdown: [''], + pageDropdownItem: '
    ', + dropdownCaret: '', + pagination: ['
      ', '
    '], + paginationItem: '
  • %s
  • ', + icon: '', + inputGroup: '
    %s%s
    ', + searchInput: '', + searchButton: '', + searchClearButton: '' + } + }, + 4: { + iconsPrefix: 'fa', + icons: { + paginationSwitchDown: 'fa-caret-square-down', + paginationSwitchUp: 'fa-caret-square-up', + refresh: 'fa-sync', + toggleOff: 'fa-toggle-off', + toggleOn: 'fa-toggle-on', + columns: 'fa-th-list', + detailOpen: 'fa-plus', + detailClose: 'fa-minus', + fullscreen: 'fa-arrows-alt', + search: 'fa-search', + clearSearch: 'fa-trash' + }, + classes: { + buttonsPrefix: 'btn', + buttons: 'secondary', + buttonsGroup: 'btn-group', + buttonsDropdown: 'btn-group', + pull: 'float', + inputGroup: 'btn-group', + inputPrefix: 'form-control-', + input: 'form-control', + paginationDropdown: 'btn-group dropdown', + dropup: 'dropup', + dropdownActive: 'active', + paginationActive: 'active', + buttonActive: 'active' + }, + html: { + toolbarDropdown: [''], + toolbarDropdownItem: '', + pageDropdown: [''], + pageDropdownItem: '%s', + toolbarDropdownSeparator: '', + dropdownCaret: '', + pagination: ['
      ', '
    '], + paginationItem: '
  • %s
  • ', + icon: '', + inputGroup: '
    %s
    %s
    ', + searchInput: '', + searchButton: '', + searchClearButton: '' + } + }, + 5: { + iconsPrefix: 'fa', + icons: { + paginationSwitchDown: 'fa-caret-square-down', + paginationSwitchUp: 'fa-caret-square-up', + refresh: 'fa-sync', + toggleOff: 'fa-toggle-off', + toggleOn: 'fa-toggle-on', + columns: 'fa-th-list', + detailOpen: 'fa-plus', + detailClose: 'fa-minus', + fullscreen: 'fa-arrows-alt', + search: 'fa-search', + clearSearch: 'fa-trash' + }, + classes: { + buttonsPrefix: 'btn', + buttons: 'secondary', + buttonsGroup: 'btn-group', + buttonsDropdown: 'btn-group', + pull: 'float', + inputGroup: 'btn-group', + inputPrefix: 'form-control-', + input: 'form-control', + paginationDropdown: 'btn-group dropdown', + dropup: 'dropup', + dropdownActive: 'active', + paginationActive: 'active', + buttonActive: 'active' + }, + html: { + dataToggle: 'data-bs-toggle', + toolbarDropdown: [''], + toolbarDropdownItem: '', + pageDropdown: [''], + pageDropdownItem: '%s', + toolbarDropdownSeparator: '', + dropdownCaret: '', + pagination: ['
      ', '
    '], + paginationItem: '
  • %s
  • ', + icon: '', + inputGroup: '
    %s
    %s
    ', + searchInput: '', + searchButton: '', + searchClearButton: '' + } + } + }[bootstrapVersion]; + var DEFAULTS = { + height: undefined, + classes: 'table table-bordered table-hover', + buttons: {}, + theadClasses: '', + headerStyle: function headerStyle(column) { + return {}; + }, + rowStyle: function rowStyle(row, index) { + return {}; + }, + rowAttributes: function rowAttributes(row, index) { + return {}; + }, + undefinedText: '-', + locale: undefined, + virtualScroll: false, + virtualScrollItemHeight: undefined, + sortable: true, + sortClass: undefined, + silentSort: true, + sortName: undefined, + sortOrder: undefined, + sortReset: false, + sortStable: false, + rememberOrder: false, + serverSort: true, + customSort: undefined, + columns: [[]], + data: [], + url: undefined, + method: 'get', + cache: true, + contentType: 'application/json', + dataType: 'json', + ajax: undefined, + ajaxOptions: {}, + queryParams: function queryParams(params) { + return params; + }, + queryParamsType: 'limit', + // 'limit', undefined + responseHandler: function responseHandler(res) { + return res; + }, + totalField: 'total', + totalNotFilteredField: 'totalNotFiltered', + dataField: 'rows', + footerField: 'footer', + pagination: false, + paginationParts: ['pageInfo', 'pageSize', 'pageList'], + showExtendedPagination: false, + paginationLoop: true, + sidePagination: 'client', + // client or server + totalRows: 0, + totalNotFiltered: 0, + pageNumber: 1, + pageSize: 10, + pageList: [10, 25, 50, 100], + paginationHAlign: 'right', + // right, left + paginationVAlign: 'bottom', + // bottom, top, both + paginationDetailHAlign: 'left', + // right, left + paginationPreText: '‹', + paginationNextText: '›', + paginationSuccessivelySize: 5, + // Maximum successively number of pages in a row + paginationPagesBySide: 1, + // Number of pages on each side (right, left) of the current page. + paginationUseIntermediate: false, + // Calculate intermediate pages for quick access + search: false, + searchHighlight: false, + searchOnEnterKey: false, + strictSearch: false, + searchSelector: false, + visibleSearch: false, + showButtonIcons: true, + showButtonText: false, + showSearchButton: false, + showSearchClearButton: false, + trimOnSearch: true, + searchAlign: 'right', + searchTimeOut: 500, + searchText: '', + customSearch: undefined, + showHeader: true, + showFooter: false, + footerStyle: function footerStyle(column) { + return {}; + }, + searchAccentNeutralise: false, + showColumns: false, + showColumnsToggleAll: false, + showColumnsSearch: false, + minimumCountColumns: 1, + showPaginationSwitch: false, + showRefresh: false, + showToggle: false, + showFullscreen: false, + smartDisplay: true, + escape: false, + filterOptions: { + filterAlgorithm: 'and' + }, + idField: undefined, + selectItemName: 'btSelectItem', + clickToSelect: false, + ignoreClickToSelectOn: function ignoreClickToSelectOn(_ref) { + var tagName = _ref.tagName; + return ['A', 'BUTTON'].includes(tagName); + }, + singleSelect: false, + checkboxHeader: true, + maintainMetaData: false, + multipleSelectRow: false, + uniqueId: undefined, + cardView: false, + detailView: false, + detailViewIcon: true, + detailViewByClick: false, + detailViewAlign: 'left', + detailFormatter: function detailFormatter(index, row) { + return ''; + }, + detailFilter: function detailFilter(index, row) { + return true; + }, + toolbar: undefined, + toolbarAlign: 'left', + buttonsToolbar: undefined, + buttonsAlign: 'right', + buttonsOrder: ['paginationSwitch', 'refresh', 'toggle', 'fullscreen', 'columns'], + buttonsPrefix: CONSTANTS.classes.buttonsPrefix, + buttonsClass: CONSTANTS.classes.buttons, + icons: CONSTANTS.icons, + iconSize: undefined, + iconsPrefix: CONSTANTS.iconsPrefix, + // glyphicon or fa(font-awesome) + loadingFontSize: 'auto', + loadingTemplate: function loadingTemplate(loadingMessage) { + return "\n ".concat(loadingMessage, "\n \n \n "); + }, + onAll: function onAll(name, args) { + return false; + }, + onClickCell: function onClickCell(field, value, row, $element) { + return false; + }, + onDblClickCell: function onDblClickCell(field, value, row, $element) { + return false; + }, + onClickRow: function onClickRow(item, $element) { + return false; + }, + onDblClickRow: function onDblClickRow(item, $element) { + return false; + }, + onSort: function onSort(name, order) { + return false; + }, + onCheck: function onCheck(row) { + return false; + }, + onUncheck: function onUncheck(row) { + return false; + }, + onCheckAll: function onCheckAll(rows) { + return false; + }, + onUncheckAll: function onUncheckAll(rows) { + return false; + }, + onCheckSome: function onCheckSome(rows) { + return false; + }, + onUncheckSome: function onUncheckSome(rows) { + return false; + }, + onLoadSuccess: function onLoadSuccess(data) { + return false; + }, + onLoadError: function onLoadError(status) { + return false; + }, + onColumnSwitch: function onColumnSwitch(field, checked) { + return false; + }, + onPageChange: function onPageChange(number, size) { + return false; + }, + onSearch: function onSearch(text) { + return false; + }, + onToggle: function onToggle(cardView) { + return false; + }, + onPreBody: function onPreBody(data) { + return false; + }, + onPostBody: function onPostBody() { + return false; + }, + onPostHeader: function onPostHeader() { + return false; + }, + onPostFooter: function onPostFooter() { + return false; + }, + onExpandRow: function onExpandRow(index, row, $detail) { + return false; + }, + onCollapseRow: function onCollapseRow(index, row) { + return false; + }, + onRefreshOptions: function onRefreshOptions(options) { + return false; + }, + onRefresh: function onRefresh(params) { + return false; + }, + onResetView: function onResetView() { + return false; + }, + onScrollBody: function onScrollBody() { + return false; + } + }; + var EN = { + formatLoadingMessage: function formatLoadingMessage() { + return 'Loading, please wait'; + }, + formatRecordsPerPage: function formatRecordsPerPage(pageNumber) { + return "".concat(pageNumber, " rows per page"); + }, + formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) { + if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) { + return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows (filtered from ").concat(totalNotFiltered, " total rows)"); + } + + return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows"); + }, + formatSRPaginationPreText: function formatSRPaginationPreText() { + return 'previous page'; + }, + formatSRPaginationPageText: function formatSRPaginationPageText(page) { + return "to page ".concat(page); + }, + formatSRPaginationNextText: function formatSRPaginationNextText() { + return 'next page'; + }, + formatDetailPagination: function formatDetailPagination(totalRows) { + return "Showing ".concat(totalRows, " rows"); + }, + formatSearch: function formatSearch() { + return 'Search'; + }, + formatClearSearch: function formatClearSearch() { + return 'Clear Search'; + }, + formatNoMatches: function formatNoMatches() { + return 'No matching records found'; + }, + formatPaginationSwitch: function formatPaginationSwitch() { + return 'Hide/Show pagination'; + }, + formatPaginationSwitchDown: function formatPaginationSwitchDown() { + return 'Show pagination'; + }, + formatPaginationSwitchUp: function formatPaginationSwitchUp() { + return 'Hide pagination'; + }, + formatRefresh: function formatRefresh() { + return 'Refresh'; + }, + formatToggle: function formatToggle() { + return 'Toggle'; + }, + formatToggleOn: function formatToggleOn() { + return 'Show card view'; + }, + formatToggleOff: function formatToggleOff() { + return 'Hide card view'; + }, + formatColumns: function formatColumns() { + return 'Columns'; + }, + formatColumnsToggleAll: function formatColumnsToggleAll() { + return 'Toggle all'; + }, + formatFullscreen: function formatFullscreen() { + return 'Fullscreen'; + }, + formatAllRows: function formatAllRows() { + return 'All'; + } + }; + var COLUMN_DEFAULTS = { + field: undefined, + title: undefined, + titleTooltip: undefined, + class: undefined, + width: undefined, + widthUnit: 'px', + rowspan: undefined, + colspan: undefined, + align: undefined, + // left, right, center + halign: undefined, + // left, right, center + falign: undefined, + // left, right, center + valign: undefined, + // top, middle, bottom + cellStyle: undefined, + radio: false, + checkbox: false, + checkboxEnabled: true, + clickToSelect: true, + showSelectTitle: false, + sortable: false, + sortName: undefined, + order: 'asc', + // asc, desc + sorter: undefined, + visible: true, + switchable: true, + cardVisible: true, + searchable: true, + formatter: undefined, + footerFormatter: undefined, + detailFormatter: undefined, + searchFormatter: true, + searchHighlightFormatter: false, + escape: false, + events: undefined + }; + var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandRowByUniqueId', 'collapseRowByUniqueId', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText']; + var EVENTS = { + 'all.bs.table': 'onAll', + 'click-row.bs.table': 'onClickRow', + 'dbl-click-row.bs.table': 'onDblClickRow', + 'click-cell.bs.table': 'onClickCell', + 'dbl-click-cell.bs.table': 'onDblClickCell', + 'sort.bs.table': 'onSort', + 'check.bs.table': 'onCheck', + 'uncheck.bs.table': 'onUncheck', + 'check-all.bs.table': 'onCheckAll', + 'uncheck-all.bs.table': 'onUncheckAll', + 'check-some.bs.table': 'onCheckSome', + 'uncheck-some.bs.table': 'onUncheckSome', + 'load-success.bs.table': 'onLoadSuccess', + 'load-error.bs.table': 'onLoadError', + 'column-switch.bs.table': 'onColumnSwitch', + 'page-change.bs.table': 'onPageChange', + 'search.bs.table': 'onSearch', + 'toggle.bs.table': 'onToggle', + 'pre-body.bs.table': 'onPreBody', + 'post-body.bs.table': 'onPostBody', + 'post-header.bs.table': 'onPostHeader', + 'post-footer.bs.table': 'onPostFooter', + 'expand-row.bs.table': 'onExpandRow', + 'collapse-row.bs.table': 'onCollapseRow', + 'refresh-options.bs.table': 'onRefreshOptions', + 'reset-view.bs.table': 'onResetView', + 'refresh.bs.table': 'onRefresh', + 'scroll-body.bs.table': 'onScrollBody' + }; + Object.assign(DEFAULTS, EN); + var Constants = { + VERSION: VERSION, + THEME: "bootstrap".concat(bootstrapVersion), + CONSTANTS: CONSTANTS, + DEFAULTS: DEFAULTS, + COLUMN_DEFAULTS: COLUMN_DEFAULTS, + METHODS: METHODS, + EVENTS: EVENTS, + LOCALES: { + en: EN, + 'en-US': EN + } + }; + + var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); }); + + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { + keys: function keys(it) { + return objectKeys(toObject(it)); + } + }); + + var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; + + + + + + + var nativeStartsWith = ''.startsWith; + var min$1 = Math.min; + + var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('startsWith'); + // https://github.com/zloirock/core-js/pull/702 + var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () { + var descriptor = getOwnPropertyDescriptor$1(String.prototype, 'startsWith'); + return descriptor && !descriptor.writable; + }(); + + // `String.prototype.startsWith` method + // https://tc39.es/ecma262/#sec-string.prototype.startswith + _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = String(requireObjectCoercible(this)); + notARegexp(searchString); + var index = toLength(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return nativeStartsWith + ? nativeStartsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } + }); + + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + + + + + + + var nativeEndsWith = ''.endsWith; + var min = Math.min; + + var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('endsWith'); + // https://github.com/zloirock/core-js/pull/702 + var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () { + var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith'); + return descriptor && !descriptor.writable; + }(); + + // `String.prototype.endsWith` method + // https://tc39.es/ecma262/#sec-string.prototype.endswith + _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = String(requireObjectCoercible(this)); + notARegexp(searchString); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : min(toLength(endPosition), len); + var search = String(searchString); + return nativeEndsWith + ? nativeEndsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } + }); + + var Utils = { + getSearchInput: function getSearchInput(that) { + if (typeof that.options.searchSelector === 'string') { + return $__default['default'](that.options.searchSelector); + } + + return that.$toolbar.find('.search input'); + }, + // it only does '%s', and return '' when arguments are undefined + sprintf: function sprintf(_str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var flag = true; + var i = 0; + + var str = _str.replace(/%s/g, function () { + var arg = args[i++]; + + if (typeof arg === 'undefined') { + flag = false; + return ''; + } + + return arg; + }); + + return flag ? str : ''; + }, + isObject: function isObject(val) { + return val instanceof Object && !Array.isArray(val); + }, + isEmptyObject: function isEmptyObject() { + var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return Object.entries(obj).length === 0 && obj.constructor === Object; + }, + isNumeric: function isNumeric(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + }, + getFieldTitle: function getFieldTitle(list, value) { + var _iterator = _createForOfIteratorHelper(list), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var item = _step.value; if (item.field === value) { return item.title; } } - return ''; - }, - setFieldIndex: function setFieldIndex(columns) { - var totalCol = 0; - var flag = []; + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } - for (var _iterator2 = columns[0], _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; + return ''; + }, + setFieldIndex: function setFieldIndex(columns) { + var totalCol = 0; + var flag = []; - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var column = _ref2; + var _iterator2 = _createForOfIteratorHelper(columns[0]), + _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var column = _step2.value; totalCol += column.colspan || 1; } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } - for (var i = 0; i < columns.length; i++) { - flag[i] = []; - for (var j = 0; j < totalCol; j++) { - flag[i][j] = false; - } + for (var i = 0; i < columns.length; i++) { + flag[i] = []; + + for (var j = 0; j < totalCol; j++) { + flag[i][j] = false; } + } - for (var _i3 = 0; _i3 < columns.length; _i3++) { - for (var _iterator3 = columns[_i3], _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i4 >= _iterator3.length) break; - _ref3 = _iterator3[_i4++]; - } else { - _i4 = _iterator3.next(); - if (_i4.done) break; - _ref3 = _i4.value; - } - - var r = _ref3; + for (var _i = 0; _i < columns.length; _i++) { + var _iterator3 = _createForOfIteratorHelper(columns[_i]), + _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var r = _step3.value; var rowspan = r.rowspan || 1; var colspan = r.colspan || 1; - var index = flag[_i3].indexOf(false); + + var index = flag[_i].indexOf(false); + + r.colspanIndex = index; if (colspan === 1) { - r.fieldIndex = index; - // when field is undefined, use index instead + r.fieldIndex = index; // when field is undefined, use index instead + if (typeof r.field === 'undefined') { r.field = index; } + } else { + r.colspanGroup = r.colspan; } - for (var k = 0; k < rowspan; k++) { - flag[_i3 + k][index] = true; - } - for (var _k = 0; _k < colspan; _k++) { - flag[_i3][index + _k] = true; - } - } - } - }, - getScrollBarWidth: function getScrollBarWidth() { - if (this.cachedWidth === undefined) { - var $inner = $('
    ').addClass('fixed-table-scroll-inner'); - var $outer = $('
    ').addClass('fixed-table-scroll-outer'); - - $outer.append($inner); - $('body').append($outer); - - var w1 = $inner[0].offsetWidth; - $outer.css('overflow', 'scroll'); - var w2 = $inner[0].offsetWidth; - - if (w1 === w2) { - w2 = $outer[0].clientWidth; - } - - $outer.remove(); - this.cachedWidth = w1 - w2; - } - return this.cachedWidth; - }, - calculateObjectValue: function calculateObjectValue(self, name, args, defaultValue) { - var func = name; - - if (typeof name === 'string') { - // support obj.func1.func2 - var names = name.split('.'); - - if (names.length > 1) { - func = window; - for (var _iterator4 = names, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { - var _ref4; - - if (_isArray4) { - if (_i5 >= _iterator4.length) break; - _ref4 = _iterator4[_i5++]; - } else { - _i5 = _iterator4.next(); - if (_i5.done) break; - _ref4 = _i5.value; + for (var _j = 0; _j < rowspan; _j++) { + for (var k = 0; k < colspan; k++) { + flag[_i + _j][index + k] = true; } + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + }, + normalizeAccent: function normalizeAccent(value) { + if (typeof value !== 'string') { + return value; + } - var f = _ref4; + return value.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + }, + updateFieldGroup: function updateFieldGroup(columns) { + var _ref; + var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns)); + + var _iterator4 = _createForOfIteratorHelper(columns), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var c = _step4.value; + + var _iterator5 = _createForOfIteratorHelper(c), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var r = _step5.value; + + if (r.colspanGroup > 1) { + var colspan = 0; + + var _loop = function _loop(i) { + var column = allColumns.find(function (col) { + return col.fieldIndex === i; + }); + + if (column.visible) { + colspan++; + } + }; + + for (var i = r.colspanIndex; i < r.colspanIndex + r.colspanGroup; i++) { + _loop(i); + } + + r.colspan = colspan; + r.visible = colspan > 0; + } + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + }, + getScrollBarWidth: function getScrollBarWidth() { + if (this.cachedWidth === undefined) { + var $inner = $__default['default']('
    ').addClass('fixed-table-scroll-inner'); + var $outer = $__default['default']('
    ').addClass('fixed-table-scroll-outer'); + $outer.append($inner); + $__default['default']('body').append($outer); + var w1 = $inner[0].offsetWidth; + $outer.css('overflow', 'scroll'); + var w2 = $inner[0].offsetWidth; + + if (w1 === w2) { + w2 = $outer[0].clientWidth; + } + + $outer.remove(); + this.cachedWidth = w1 - w2; + } + + return this.cachedWidth; + }, + calculateObjectValue: function calculateObjectValue(self, name, args, defaultValue) { + var func = name; + + if (typeof name === 'string') { + // support obj.func1.func2 + var names = name.split('.'); + + if (names.length > 1) { + func = window; + + var _iterator6 = _createForOfIteratorHelper(names), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var f = _step6.value; func = func[f]; } - } else { - func = window[name]; + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); } + } else { + func = window[name]; } + } - if (func !== null && (typeof func === 'undefined' ? 'undefined' : _typeof(func)) === 'object') { - return func; - } + if (func !== null && _typeof(func) === 'object') { + return func; + } - if (typeof func === 'function') { - return func.apply(self, args || []); - } + if (typeof func === 'function') { + return func.apply(self, args || []); + } - if (!func && typeof name === 'string' && this.sprintf.apply(this, [name].concat(_toConsumableArray(args)))) { - return this.sprintf.apply(this, [name].concat(_toConsumableArray(args))); - } + if (!func && typeof name === 'string' && this.sprintf.apply(this, [name].concat(_toConsumableArray(args)))) { + return this.sprintf.apply(this, [name].concat(_toConsumableArray(args))); + } - return defaultValue; - }, - compareObjects: function compareObjects(objectA, objectB, compareLength) { - var aKeys = Object.keys(objectA); - var bKeys = Object.keys(objectB); + return defaultValue; + }, + compareObjects: function compareObjects(objectA, objectB, compareLength) { + var aKeys = Object.keys(objectA); + var bKeys = Object.keys(objectB); - if (compareLength && aKeys.length !== bKeys.length) { + if (compareLength && aKeys.length !== bKeys.length) { + return false; + } + + for (var _i2 = 0, _aKeys = aKeys; _i2 < _aKeys.length; _i2++) { + var key = _aKeys[_i2]; + + if (bKeys.includes(key) && objectA[key] !== objectB[key]) { return false; } + } - for (var _iterator5 = aKeys, _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { - var _ref5; + return true; + }, + escapeHTML: function escapeHTML(text) { + if (typeof text === 'string') { + return text.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/`/g, '`'); + } - if (_isArray5) { - if (_i6 >= _iterator5.length) break; - _ref5 = _iterator5[_i6++]; - } else { - _i6 = _iterator5.next(); - if (_i6.done) break; - _ref5 = _i6.value; - } + return text; + }, + unescapeHTML: function unescapeHTML(text) { + if (typeof text === 'string') { + return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '\'').replace(/`/g, '`'); + } - var key = _ref5; + return text; + }, + getRealDataAttr: function getRealDataAttr(dataAttr) { + for (var _i3 = 0, _Object$entries = Object.entries(dataAttr); _i3 < _Object$entries.length; _i3++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2), + attr = _Object$entries$_i[0], + value = _Object$entries$_i[1]; - if (bKeys.indexOf(key) !== -1 && objectA[key] !== objectB[key]) { - return false; - } + var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase(); + + if (auxAttr !== attr) { + dataAttr[auxAttr] = value; + delete dataAttr[attr]; } + } - return true; - }, - escapeHTML: function escapeHTML(text) { - if (typeof text === 'string') { - return text.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/`/g, '`'); - } - return text; - }, - getRealDataAttr: function getRealDataAttr(dataAttr) { - for (var _iterator6 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(dataAttr), _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { - var _ref6; + return dataAttr; + }, + getItemField: function getItemField(item, field, escape) { + var value = item; - if (_isArray6) { - if (_i7 >= _iterator6.length) break; - _ref6 = _iterator6[_i7++]; - } else { - _i7 = _iterator6.next(); - if (_i7.done) break; - _ref6 = _i7.value; - } + if (typeof field !== 'string' || item.hasOwnProperty(field)) { + return escape ? this.escapeHTML(item[field]) : item[field]; + } - var _ref7 = _ref6, - _ref8 = _slicedToArray(_ref7, 2), - attr = _ref8[0], - value = _ref8[1]; + var props = field.split('.'); - var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase(); - if (auxAttr !== attr) { - dataAttr[auxAttr] = value; - delete dataAttr[attr]; - } - } - return dataAttr; - }, - getItemField: function getItemField(item, field, escape) { - var value = item; - - if (typeof field !== 'string' || item.hasOwnProperty(field)) { - return escape ? this.escapeHTML(item[field]) : item[field]; - } - - var props = field.split('.'); - for (var _iterator7 = props, _isArray7 = Array.isArray(_iterator7), _i8 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { - var _ref9; - - if (_isArray7) { - if (_i8 >= _iterator7.length) break; - _ref9 = _iterator7[_i8++]; - } else { - _i8 = _iterator7.next(); - if (_i8.done) break; - _ref9 = _i8.value; - } - - var p = _ref9; + var _iterator7 = _createForOfIteratorHelper(props), + _step7; + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var p = _step7.value; value = value && value[p]; } - return escape ? this.escapeHTML(value) : value; - }, - isIEBrowser: function isIEBrowser() { - return navigator.userAgent.indexOf('MSIE ') !== -1 || /Trident.*rv:11\./.test(navigator.userAgent); - }, - findIndex: function findIndex(items, item) { - for (var _iterator8 = items, _isArray8 = Array.isArray(_iterator8), _i9 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { - var _ref10; + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); + } - if (_isArray8) { - if (_i9 >= _iterator8.length) break; - _ref10 = _iterator8[_i9++]; - } else { - _i9 = _iterator8.next(); - if (_i9.done) break; - _ref10 = _i9.value; - } + return escape ? this.escapeHTML(value) : value; + }, + isIEBrowser: function isIEBrowser() { + return navigator.userAgent.includes('MSIE ') || /Trident.*rv:11\./.test(navigator.userAgent); + }, + findIndex: function findIndex(items, item) { + var _iterator8 = _createForOfIteratorHelper(items), + _step8; - var it = _ref10; + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var it = _step8.value; if (JSON.stringify(it) === JSON.stringify(item)) { return items.indexOf(it); } } - return -1; - } - }; - - // BOOTSTRAP TABLE CLASS DEFINITION - // ====================== - - var DEFAULTS = { - height: undefined, - classes: 'table table-bordered table-hover', - theadClasses: '', - rowStyle: function rowStyle(row, index) { - return {}; - }, - rowAttributes: function rowAttributes(row, index) { - return {}; - }, - - undefinedText: '-', - locale: undefined, - sortable: true, - sortClass: undefined, - silentSort: true, - sortName: undefined, - sortOrder: 'asc', - sortStable: false, - rememberOrder: false, - customSort: undefined, - columns: [[]], - data: [], - url: undefined, - method: 'get', - cache: true, - contentType: 'application/json', - dataType: 'json', - ajax: undefined, - ajaxOptions: {}, - queryParams: function queryParams(params) { - return params; - }, - - queryParamsType: 'limit', responseHandler: function responseHandler(res) { - return res; - }, - - totalField: 'total', - dataField: 'rows', - pagination: false, - onlyInfoPagination: false, - paginationLoop: true, - sidePagination: 'client', // client or server - totalRows: 0, - pageNumber: 1, - pageSize: 10, - pageList: [10, 25, 50, 100], - paginationHAlign: 'right', // right, left - paginationVAlign: 'bottom', // bottom, top, both - paginationDetailHAlign: 'left', // right, left - paginationPreText: '‹', - paginationNextText: '›', - paginationSuccessivelySize: 5, // Maximum successively number of pages in a row - paginationPagesBySide: 1, // Number of pages on each side (right, left) of the current page. - paginationUseIntermediate: false, // Calculate intermediate pages for quick access - search: false, - searchOnEnterKey: false, - strictSearch: false, - trimOnSearch: true, - searchAlign: 'right', - searchTimeOut: 500, - searchText: '', - customSearch: undefined, - showHeader: true, - showFooter: false, - footerStyle: function footerStyle(row, index) { - return {}; - }, - - showColumns: false, - minimumCountColumns: 1, - showPaginationSwitch: false, - showRefresh: false, - showToggle: false, - showFullscreen: false, - smartDisplay: true, - escape: false, - idField: undefined, - selectItemName: 'btSelectItem', - clickToSelect: false, - ignoreClickToSelectOn: function ignoreClickToSelectOn(_ref11) { - var tagName = _ref11.tagName; - - return ['A', 'BUTTON'].indexOf(tagName) !== -1; - }, - - singleSelect: false, - checkboxHeader: true, - maintainSelected: false, - uniqueId: undefined, - cardView: false, - detailView: false, - detailFormatter: function detailFormatter(index, row) { - return ''; - }, - detailFilter: function detailFilter(index, row) { - return true; - }, - - toolbar: undefined, - toolbarAlign: 'left', - buttonsToolbar: undefined, - buttonsAlign: 'right', - buttonsPrefix: constants.classes.buttonsPrefix, - buttonsClass: constants.classes.buttons, - icons: constants.icons, - iconSize: undefined, - iconsPrefix: constants.iconsPrefix, onAll: function onAll(name, args) { - return false; - }, - onClickCell: function onClickCell(field, value, row, $element) { - return false; - }, - onDblClickCell: function onDblClickCell(field, value, row, $element) { - return false; - }, - onClickRow: function onClickRow(item, $element) { - return false; - }, - onDblClickRow: function onDblClickRow(item, $element) { - return false; - }, - onSort: function onSort(name, order) { - return false; - }, - onCheck: function onCheck(row) { - return false; - }, - onUncheck: function onUncheck(row) { - return false; - }, - onCheckAll: function onCheckAll(rows) { - return false; - }, - onUncheckAll: function onUncheckAll(rows) { - return false; - }, - onCheckSome: function onCheckSome(rows) { - return false; - }, - onUncheckSome: function onUncheckSome(rows) { - return false; - }, - onLoadSuccess: function onLoadSuccess(data) { - return false; - }, - onLoadError: function onLoadError(status) { - return false; - }, - onColumnSwitch: function onColumnSwitch(field, checked) { - return false; - }, - onPageChange: function onPageChange(number, size) { - return false; - }, - onSearch: function onSearch(text) { - return false; - }, - onToggle: function onToggle(cardView) { - return false; - }, - onPreBody: function onPreBody(data) { - return false; - }, - onPostBody: function onPostBody() { - return false; - }, - onPostHeader: function onPostHeader() { - return false; - }, - onExpandRow: function onExpandRow(index, row, $detail) { - return false; - }, - onCollapseRow: function onCollapseRow(index, row) { - return false; - }, - onRefreshOptions: function onRefreshOptions(options) { - return false; - }, - onRefresh: function onRefresh(params) { - return false; - }, - onResetView: function onResetView() { - return false; - }, - onScrollBody: function onScrollBody() { - return false; - } - }; - - var LOCALES = {}; - LOCALES['en-US'] = LOCALES.en = { - formatLoadingMessage: function formatLoadingMessage() { - return 'Loading, please wait'; - }, - formatRecordsPerPage: function formatRecordsPerPage(pageNumber) { - return pageNumber + ' rows per page'; - }, - formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows) { - return 'Showing ' + pageFrom + ' to ' + pageTo + ' of ' + totalRows + ' rows'; - }, - formatDetailPagination: function formatDetailPagination(totalRows) { - return 'Showing ' + totalRows + ' rows'; - }, - formatSearch: function formatSearch() { - return 'Search'; - }, - formatNoMatches: function formatNoMatches() { - return 'No matching records found'; - }, - formatPaginationSwitch: function formatPaginationSwitch() { - return 'Hide/Show pagination'; - }, - formatRefresh: function formatRefresh() { - return 'Refresh'; - }, - formatToggle: function formatToggle() { - return 'Toggle'; - }, - formatColumns: function formatColumns() { - return 'Columns'; - }, - formatFullscreen: function formatFullscreen() { - return 'Fullscreen'; - }, - formatAllRows: function formatAllRows() { - return 'All'; - } - }; - - $.extend(DEFAULTS, LOCALES['en-US']); - - var COLUMN_DEFAULTS = { - radio: false, - checkbox: false, - checkboxEnabled: true, - field: undefined, - title: undefined, - titleTooltip: undefined, - 'class': undefined, - align: undefined, // left, right, center - halign: undefined, // left, right, center - falign: undefined, // left, right, center - valign: undefined, // top, middle, bottom - width: undefined, - sortable: false, - order: 'asc', // asc, desc - visible: true, - switchable: true, - clickToSelect: true, - formatter: undefined, - footerFormatter: undefined, - events: undefined, - sorter: undefined, - sortName: undefined, - cellStyle: undefined, - searchable: true, - searchFormatter: true, - cardVisible: true, - escape: false, - showSelectTitle: false - }; - - var EVENTS = { - 'all.bs.table': 'onAll', - 'click-cell.bs.table': 'onClickCell', - 'dbl-click-cell.bs.table': 'onDblClickCell', - 'click-row.bs.table': 'onClickRow', - 'dbl-click-row.bs.table': 'onDblClickRow', - 'sort.bs.table': 'onSort', - 'check.bs.table': 'onCheck', - 'uncheck.bs.table': 'onUncheck', - 'check-all.bs.table': 'onCheckAll', - 'uncheck-all.bs.table': 'onUncheckAll', - 'check-some.bs.table': 'onCheckSome', - 'uncheck-some.bs.table': 'onUncheckSome', - 'load-success.bs.table': 'onLoadSuccess', - 'load-error.bs.table': 'onLoadError', - 'column-switch.bs.table': 'onColumnSwitch', - 'page-change.bs.table': 'onPageChange', - 'search.bs.table': 'onSearch', - 'toggle.bs.table': 'onToggle', - 'pre-body.bs.table': 'onPreBody', - 'post-body.bs.table': 'onPostBody', - 'post-header.bs.table': 'onPostHeader', - 'expand-row.bs.table': 'onExpandRow', - 'collapse-row.bs.table': 'onCollapseRow', - 'refresh-options.bs.table': 'onRefreshOptions', - 'reset-view.bs.table': 'onResetView', - 'refresh.bs.table': 'onRefresh', - 'scroll-body.bs.table': 'onScrollBody' - }; - - var BootstrapTable = function () { - function BootstrapTable(el, options) { - _classCallCheck(this, BootstrapTable); - - this.options = options; - this.$el = $(el); - this.$el_ = this.$el.clone(); - this.timeoutId_ = 0; - this.timeoutFooter_ = 0; - - this.init(); + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); } - _createClass(BootstrapTable, [{ - key: 'init', - value: function init() { - this.initConstants(); - this.initLocale(); - this.initContainer(); - this.initTable(); - this.initHeader(); - this.initData(); - this.initHiddenRows(); - this.initFooter(); - this.initToolbar(); - this.initPagination(); - this.initBody(); - this.initSearchText(); - this.initServer(); - } - }, { - key: 'initConstants', - value: function initConstants() { - var o = this.options; - this.constants = constants; + return -1; + }, + trToData: function trToData(columns, $els) { + var _this = this; - var buttonsPrefix = o.buttonsPrefix ? o.buttonsPrefix + '-' : ''; - this.constants.buttonsClass = [o.buttonsPrefix, buttonsPrefix + o.buttonsClass, Utils.sprintf(buttonsPrefix + '%s', o.iconSize)].join(' ').trim(); - } - }, { - key: 'initLocale', - value: function initLocale() { - if (this.options.locale) { - var locales = $.fn.bootstrapTable.locales; - var parts = this.options.locale.split(/-|_/); + var data = []; + var m = []; + $els.each(function (y, el) { + var $el = $__default['default'](el); + var row = {}; // save tr's id, class and data-* attributes - parts[0] = parts[0].toLowerCase(); - if (parts[1]) { - parts[1] = parts[1].toUpperCase(); + row._id = $el.attr('id'); + row._class = $el.attr('class'); + row._data = _this.getRealDataAttr($el.data()); + row._style = $el.attr('style'); + $el.find('>td,>th').each(function (_x, el) { + var $el = $__default['default'](el); + var cspan = +$el.attr('colspan') || 1; + var rspan = +$el.attr('rowspan') || 1; + var x = _x; // skip already occupied cells in current row + + for (; m[y] && m[y][x]; x++) {// ignore + } // mark matrix elements occupied by current cell with true + + + for (var tx = x; tx < x + cspan; tx++) { + for (var ty = y; ty < y + rspan; ty++) { + if (!m[ty]) { + // fill missing rows + m[ty] = []; + } + + m[ty][tx] = true; } + } - if (locales[this.options.locale]) { - $.extend(this.options, locales[this.options.locale]); - } else if (locales[parts.join('-')]) { - $.extend(this.options, locales[parts.join('-')]); - } else if (locales[parts[0]]) { - $.extend(this.options, locales[parts[0]]); + var field = columns[x].field; + row[field] = $el.html().trim(); // save td's id, class and data-* attributes + + row["_".concat(field, "_id")] = $el.attr('id'); + row["_".concat(field, "_class")] = $el.attr('class'); + row["_".concat(field, "_rowspan")] = $el.attr('rowspan'); + row["_".concat(field, "_colspan")] = $el.attr('colspan'); + row["_".concat(field, "_title")] = $el.attr('title'); + row["_".concat(field, "_data")] = _this.getRealDataAttr($el.data()); + row["_".concat(field, "_style")] = $el.attr('style'); + }); + data.push(row); + }); + return data; + }, + sort: function sort(a, b, order, sortStable, aPosition, bPosition) { + if (a === undefined || a === null) { + a = ''; + } + + if (b === undefined || b === null) { + b = ''; + } + + if (sortStable && a === b) { + a = aPosition; + b = bPosition; + } // If both values are numeric, do a numeric comparison + + + if (this.isNumeric(a) && this.isNumeric(b)) { + // Convert numerical values form string to float. + a = parseFloat(a); + b = parseFloat(b); + + if (a < b) { + return order * -1; + } + + if (a > b) { + return order; + } + + return 0; + } + + if (a === b) { + return 0; + } // If value is not a string, convert to string + + + if (typeof a !== 'string') { + a = a.toString(); + } + + if (a.localeCompare(b) === -1) { + return order * -1; + } + + return order; + }, + getEventName: function getEventName(eventPrefix) { + var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000)); + return "".concat(eventPrefix, "-").concat(id); + }, + hasDetailViewIcon: function hasDetailViewIcon(options) { + return options.detailView && options.detailViewIcon && !options.cardView; + }, + getDetailViewIndexOffset: function getDetailViewIndexOffset(options) { + return this.hasDetailViewIcon(options) && options.detailViewAlign !== 'right' ? 1 : 0; + }, + checkAutoMergeCells: function checkAutoMergeCells(data) { + var _iterator9 = _createForOfIteratorHelper(data), + _step9; + + try { + for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { + var row = _step9.value; + + for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) { + var key = _Object$keys[_i4]; + + if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) { + return true; } } } - }, { - key: 'initContainer', - value: function initContainer() { - var topPagination = ['top', 'both'].indexOf(this.options.paginationVAlign) !== -1 ? '
    ' : ''; - var bottomPagination = ['bottom', 'both'].indexOf(this.options.paginationVAlign) !== -1 ? '
    ' : ''; + } catch (err) { + _iterator9.e(err); + } finally { + _iterator9.f(); + } - this.$container = $('\n
    \n
    \n ' + topPagination + '\n
    \n
    \n
    \n
    \n \n ' + this.options.formatLoadingMessage() + '\n \n \n
    \n
    \n \n
    \n ' + bottomPagination + '\n
    \n '); + return false; + }, + deepCopy: function deepCopy(arg) { + if (arg === undefined) { + return arg; + } + + return $__default['default'].extend(true, Array.isArray(arg) ? [] : {}, arg); + } + }; + + var BLOCK_ROWS = 50; + var CLUSTER_BLOCKS = 4; + + var VirtualScroll = /*#__PURE__*/function () { + function VirtualScroll(options) { + var _this = this; + + _classCallCheck(this, VirtualScroll); + + this.rows = options.rows; + this.scrollEl = options.scrollEl; + this.contentEl = options.contentEl; + this.callback = options.callback; + this.itemHeight = options.itemHeight; + this.cache = {}; + this.scrollTop = this.scrollEl.scrollTop; + this.initDOM(this.rows, options.fixedScroll); + this.scrollEl.scrollTop = this.scrollTop; + this.lastCluster = 0; + + var onScroll = function onScroll() { + if (_this.lastCluster !== (_this.lastCluster = _this.getNum())) { + _this.initDOM(_this.rows); + + _this.callback(); + } + }; + + this.scrollEl.addEventListener('scroll', onScroll, false); + + this.destroy = function () { + _this.contentEl.innerHtml = ''; + + _this.scrollEl.removeEventListener('scroll', onScroll, false); + }; + } + + _createClass(VirtualScroll, [{ + key: "initDOM", + value: function initDOM(rows, fixedScroll) { + if (typeof this.clusterHeight === 'undefined') { + this.cache.scrollTop = this.scrollEl.scrollTop; + this.cache.data = this.contentEl.innerHTML = rows[0] + rows[0] + rows[0]; + this.getRowsHeight(rows); + } + + var data = this.initData(rows, this.getNum(fixedScroll)); + var thisRows = data.rows.join(''); + var dataChanged = this.checkChanges('data', thisRows); + var topOffsetChanged = this.checkChanges('top', data.topOffset); + var bottomOffsetChanged = this.checkChanges('bottom', data.bottomOffset); + var html = []; + + if (dataChanged && topOffsetChanged) { + if (data.topOffset) { + html.push(this.getExtra('top', data.topOffset)); + } + + html.push(thisRows); + + if (data.bottomOffset) { + html.push(this.getExtra('bottom', data.bottomOffset)); + } + + this.contentEl.innerHTML = html.join(''); + + if (fixedScroll) { + this.contentEl.scrollTop = this.cache.scrollTop; + } + } else if (bottomOffsetChanged) { + this.contentEl.lastChild.style.height = "".concat(data.bottomOffset, "px"); + } + } + }, { + key: "getRowsHeight", + value: function getRowsHeight() { + if (typeof this.itemHeight === 'undefined') { + var nodes = this.contentEl.children; + var node = nodes[Math.floor(nodes.length / 2)]; + this.itemHeight = node.offsetHeight; + } + + this.blockHeight = this.itemHeight * BLOCK_ROWS; + this.clusterRows = BLOCK_ROWS * CLUSTER_BLOCKS; + this.clusterHeight = this.blockHeight * CLUSTER_BLOCKS; + } + }, { + key: "getNum", + value: function getNum(fixedScroll) { + this.scrollTop = fixedScroll ? this.cache.scrollTop : this.scrollEl.scrollTop; + return Math.floor(this.scrollTop / (this.clusterHeight - this.blockHeight)) || 0; + } + }, { + key: "initData", + value: function initData(rows, num) { + if (rows.length < BLOCK_ROWS) { + return { + topOffset: 0, + bottomOffset: 0, + rowsAbove: 0, + rows: rows + }; + } + + var start = Math.max((this.clusterRows - BLOCK_ROWS) * num, 0); + var end = start + this.clusterRows; + var topOffset = Math.max(start * this.itemHeight, 0); + var bottomOffset = Math.max((rows.length - end) * this.itemHeight, 0); + var thisRows = []; + var rowsAbove = start; + + if (topOffset < 1) { + rowsAbove++; + } + + for (var i = start; i < end; i++) { + rows[i] && thisRows.push(rows[i]); + } + + return { + topOffset: topOffset, + bottomOffset: bottomOffset, + rowsAbove: rowsAbove, + rows: thisRows + }; + } + }, { + key: "checkChanges", + value: function checkChanges(type, value) { + var changed = value !== this.cache[type]; + this.cache[type] = value; + return changed; + } + }, { + key: "getExtra", + value: function getExtra(className, height) { + var tag = document.createElement('tr'); + tag.className = "virtual-scroll-".concat(className); + + if (height) { + tag.style.height = "".concat(height, "px"); + } + + return tag.outerHTML; + } + }]); + + return VirtualScroll; + }(); + + var BootstrapTable = /*#__PURE__*/function () { + function BootstrapTable(el, options) { + _classCallCheck(this, BootstrapTable); + + this.options = options; + this.$el = $__default['default'](el); + this.$el_ = this.$el.clone(); + this.timeoutId_ = 0; + this.timeoutFooter_ = 0; + } + + _createClass(BootstrapTable, [{ + key: "init", + value: function init() { + this.initConstants(); + this.initLocale(); + this.initContainer(); + this.initTable(); + this.initHeader(); + this.initData(); + this.initHiddenRows(); + this.initToolbar(); + this.initPagination(); + this.initBody(); + this.initSearchText(); + this.initServer(); + } + }, { + key: "initConstants", + value: function initConstants() { + var opts = this.options; + this.constants = Constants.CONSTANTS; + this.constants.theme = $__default['default'].fn.bootstrapTable.theme; + this.constants.dataToggle = this.constants.html.dataToggle || 'data-toggle'; + var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : ''; + this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim(); + this.buttons = Utils.calculateObjectValue(this, opts.buttons, [], {}); + + if (_typeof(this.buttons) !== 'object') { + this.buttons = {}; + } + + if (typeof opts.icons === 'string') { + opts.icons = Utils.calculateObjectValue(null, opts.icons); + } + } + }, { + key: "initLocale", + value: function initLocale() { + if (this.options.locale) { + var locales = $__default['default'].fn.bootstrapTable.locales; + var parts = this.options.locale.split(/-|_/); + parts[0] = parts[0].toLowerCase(); + + if (parts[1]) { + parts[1] = parts[1].toUpperCase(); + } + + if (locales[this.options.locale]) { + $__default['default'].extend(this.options, locales[this.options.locale]); + } else if (locales[parts.join('-')]) { + $__default['default'].extend(this.options, locales[parts.join('-')]); + } else if (locales[parts[0]]) { + $__default['default'].extend(this.options, locales[parts[0]]); + } + } + } + }, { + key: "initContainer", + value: function initContainer() { + var topPagination = ['top', 'both'].includes(this.options.paginationVAlign) ? '
    ' : ''; + var bottomPagination = ['bottom', 'both'].includes(this.options.paginationVAlign) ? '
    ' : ''; + var loadingTemplate = Utils.calculateObjectValue(this.options, this.options.loadingTemplate, [this.options.formatLoadingMessage()]); + this.$container = $__default['default']("\n
    \n
    \n ").concat(topPagination, "\n
    \n
    \n
    \n
    \n ").concat(loadingTemplate, "\n
    \n
    \n
    \n
    \n ").concat(bottomPagination, "\n
    \n ")); + this.$container.insertAfter(this.$el); + this.$tableContainer = this.$container.find('.fixed-table-container'); + this.$tableHeader = this.$container.find('.fixed-table-header'); + this.$tableBody = this.$container.find('.fixed-table-body'); + this.$tableLoading = this.$container.find('.fixed-table-loading'); + this.$tableFooter = this.$el.find('tfoot'); // checking if custom table-toolbar exists or not + + if (this.options.buttonsToolbar) { + this.$toolbar = $__default['default']('body').find(this.options.buttonsToolbar); + } else { + this.$toolbar = this.$container.find('.fixed-table-toolbar'); + } + + this.$pagination = this.$container.find('.fixed-table-pagination'); + this.$tableBody.append(this.$el); + this.$container.after('
    '); + this.$el.addClass(this.options.classes); + this.$tableLoading.addClass(this.options.classes); + + if (this.options.height) { + this.$tableContainer.addClass('fixed-height'); + + if (this.options.showFooter) { + this.$tableContainer.addClass('has-footer'); + } + + if (this.options.classes.split(' ').includes('table-bordered')) { + this.$tableBody.append('
    '); + this.$tableBorder = this.$tableBody.find('.fixed-table-border'); + this.$tableLoading.addClass('fixed-table-border'); + } - this.$container.insertAfter(this.$el); - this.$tableContainer = this.$container.find('.fixed-table-container'); - this.$tableHeader = this.$container.find('.fixed-table-header'); - this.$tableBody = this.$container.find('.fixed-table-body'); - this.$tableLoading = this.$container.find('.fixed-table-loading'); this.$tableFooter = this.$container.find('.fixed-table-footer'); - // checking if custom table-toolbar exists or not - if (this.options.buttonsToolbar) { - this.$toolbar = $('body').find(this.options.buttonsToolbar); - } else { - this.$toolbar = this.$container.find('.fixed-table-toolbar'); - } - this.$pagination = this.$container.find('.fixed-table-pagination'); - - this.$tableBody.append(this.$el); - this.$container.after('
    '); - - this.$el.addClass(this.options.classes); - this.$tableLoading.addClass(this.options.classes); - - if (this.options.height) { - this.$tableContainer.addClass('fixed-height'); - - if (this.options.showFooter) { - this.$tableContainer.addClass('has-footer'); - } - - if (this.options.classes.split(' ').indexOf('table-bordered') !== -1) { - this.$tableBody.append('
    '); - this.$tableBorder = this.$tableBody.find('.fixed-table-border'); - this.$tableLoading.addClass('fixed-table-border'); - } - } } - }, { - key: 'initTable', - value: function initTable() { - var _this = this; + } + }, { + key: "initTable", + value: function initTable() { + var _this = this; - var columns = []; - var data = []; + var columns = []; + this.$header = this.$el.find('>thead'); - this.$header = this.$el.find('>thead'); - if (!this.$header.length) { - this.$header = $('').appendTo(this.$el); - } else if (this.options.theadClasses) { - this.$header.addClass(this.options.theadClasses); - } - this.$header.find('tr').each(function (i, el) { - var column = []; + if (!this.$header.length) { + this.$header = $__default['default']("")).appendTo(this.$el); + } else if (this.options.theadClasses) { + this.$header.addClass(this.options.theadClasses); + } - $(el).find('th').each(function (i, el) { - // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not - if (typeof $(el).data('field') !== 'undefined') { - $(el).data('field', '' + $(el).data('field')); - } - column.push($.extend({}, { - title: $(el).html(), - 'class': $(el).attr('class'), - titleTooltip: $(el).attr('title'), - rowspan: $(el).attr('rowspan') ? +$(el).attr('rowspan') : undefined, - colspan: $(el).attr('colspan') ? +$(el).attr('colspan') : undefined - }, $(el).data())); - }); - columns.push(column); + this._headerTrClasses = []; + this._headerTrStyles = []; + this.$header.find('tr').each(function (i, el) { + var $tr = $__default['default'](el); + var column = []; + $tr.find('th').each(function (i, el) { + var $th = $__default['default'](el); // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not + + if (typeof $th.data('field') !== 'undefined') { + $th.data('field', "".concat($th.data('field'))); + } + + column.push($__default['default'].extend({}, { + title: $th.html(), + class: $th.attr('class'), + titleTooltip: $th.attr('title'), + rowspan: $th.attr('rowspan') ? +$th.attr('rowspan') : undefined, + colspan: $th.attr('colspan') ? +$th.attr('colspan') : undefined + }, $th.data())); }); + columns.push(column); - if (!Array.isArray(this.options.columns[0])) { - this.options.columns = [this.options.columns]; + if ($tr.attr('class')) { + _this._headerTrClasses.push($tr.attr('class')); } - this.options.columns = $.extend(true, [], columns, this.options.columns); - this.columns = []; - this.fieldsColumnsIndex = []; - - Utils.setFieldIndex(this.options.columns); - - this.options.columns.forEach(function (columns, i) { - columns.forEach(function (_column, j) { - var column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, _column); - - if (typeof column.fieldIndex !== 'undefined') { - _this.columns[column.fieldIndex] = column; - _this.fieldsColumnsIndex[column.field] = column.fieldIndex; - } - - _this.options.columns[i][j] = column; - }); - }); - - // if options.data is setting, do not process tbody data - if (this.options.data.length) { - return; + if ($tr.attr('style')) { + _this._headerTrStyles.push($tr.attr('style')); } + }); - var m = []; - this.$el.find('>tbody>tr').each(function (y, el) { - var row = {}; + if (!Array.isArray(this.options.columns[0])) { + this.options.columns = [this.options.columns]; + } - // save tr's id, class and data-* attributes - row._id = $(el).attr('id'); - row._class = $(el).attr('class'); - row._data = Utils.getRealDataAttr($(el).data()); + this.options.columns = $__default['default'].extend(true, [], columns, this.options.columns); + this.columns = []; + this.fieldsColumnsIndex = []; + Utils.setFieldIndex(this.options.columns); + this.options.columns.forEach(function (columns, i) { + columns.forEach(function (_column, j) { + var column = $__default['default'].extend({}, BootstrapTable.COLUMN_DEFAULTS, _column); - $(el).find('>td').each(function (_x, el) { - var cspan = +$(el).attr('colspan') || 1; - var rspan = +$(el).attr('rowspan') || 1; - var x = _x; + if (typeof column.fieldIndex !== 'undefined') { + _this.columns[column.fieldIndex] = column; + _this.fieldsColumnsIndex[column.field] = column.fieldIndex; + } - // skip already occupied cells in current row - for (; m[y] && m[y][x]; x++) {} - // ignore - - - // mark matrix elements occupied by current cell with true - for (var tx = x; tx < x + cspan; tx++) { - for (var ty = y; ty < y + rspan; ty++) { - if (!m[ty]) { - // fill missing rows - m[ty] = []; - } - m[ty][tx] = true; - } - } - - var field = _this.columns[x].field; - - row[field] = $(el).html().trim(); - // save td's id, class and data-* attributes - row['_' + field + '_id'] = $(el).attr('id'); - row['_' + field + '_class'] = $(el).attr('class'); - row['_' + field + '_rowspan'] = $(el).attr('rowspan'); - row['_' + field + '_colspan'] = $(el).attr('colspan'); - row['_' + field + '_title'] = $(el).attr('title'); - row['_' + field + '_data'] = Utils.getRealDataAttr($(el).data()); - }); - data.push(row); + _this.options.columns[i][j] = column; }); - this.options.data = data; - if (data.length) { + }); // if options.data is setting, do not process tbody and tfoot data + + if (!this.options.data.length) { + var htmlData = Utils.trToData(this.columns, this.$el.find('>tbody>tr')); + + if (htmlData.length) { + this.options.data = htmlData; this.fromHtml = true; } } - }, { - key: 'initHeader', - value: function initHeader() { - var _this2 = this; - var visibleColumns = {}; + if (!(this.options.pagination && this.options.sidePagination !== 'server')) { + this.footerData = Utils.trToData(this.columns, this.$el.find('>tfoot>tr')); + } + + if (this.footerData) { + this.$el.find('tfoot').html(''); + } + + if (!this.options.showFooter || this.options.cardView) { + this.$tableFooter.hide(); + } else { + this.$tableFooter.show(); + } + } + }, { + key: "initHeader", + value: function initHeader() { + var _this2 = this; + + var visibleColumns = {}; + var headerHtml = []; + this.header = { + fields: [], + styles: [], + classes: [], + formatters: [], + detailFormatters: [], + events: [], + sorters: [], + sortNames: [], + cellStyles: [], + searchables: [] + }; + Utils.updateFieldGroup(this.options.columns); + this.options.columns.forEach(function (columns, i) { var html = []; + html.push("")); + var detailViewTemplate = ''; - this.header = { - fields: [], - styles: [], - classes: [], - formatters: [], - events: [], - sorters: [], - sortNames: [], - cellStyles: [], - searchables: [] - }; - - this.options.columns.forEach(function (columns, i) { - html.push(''); - - if (i === 0 && !_this2.options.cardView && _this2.options.detailView) { - html.push('\n
    \n \n '); - } - - columns.forEach(function (column, j) { - var text = ''; - - var halign = ''; // header align style - - var align = ''; // body align style - - var style = ''; - var class_ = Utils.sprintf(' class="%s"', column['class']); - var unitWidth = 'px'; - var width = column.width; - - if (column.width !== undefined && !_this2.options.cardView) { - if (typeof column.width === 'string') { - if (column.width.indexOf('%') !== -1) { - unitWidth = '%'; - } - } - } - if (column.width && typeof column.width === 'string') { - width = column.width.replace('%', '').replace('px', ''); - } - - halign = Utils.sprintf('text-align: %s; ', column.halign ? column.halign : column.align); - align = Utils.sprintf('text-align: %s; ', column.align); - style = Utils.sprintf('vertical-align: %s; ', column.valign); - style += Utils.sprintf('width: %s; ', (column.checkbox || column.radio) && !width ? !column.showSelectTitle ? '36px' : undefined : width ? width + unitWidth : undefined); - - if (typeof column.fieldIndex !== 'undefined') { - _this2.header.fields[column.fieldIndex] = column.field; - _this2.header.styles[column.fieldIndex] = align + style; - _this2.header.classes[column.fieldIndex] = class_; - _this2.header.formatters[column.fieldIndex] = column.formatter; - _this2.header.events[column.fieldIndex] = column.events; - _this2.header.sorters[column.fieldIndex] = column.sorter; - _this2.header.sortNames[column.fieldIndex] = column.sortName; - _this2.header.cellStyles[column.fieldIndex] = column.cellStyle; - _this2.header.searchables[column.fieldIndex] = column.searchable; - - if (!column.visible) { - return; - } - - if (_this2.options.cardView && !column.cardVisible) { - return; - } - - visibleColumns[column.field] = column; - } - - html.push(' 0 ? ' data-not-first-th' : '', '>'); - - html.push(Utils.sprintf('
    ', _this2.options.sortable && column.sortable ? 'sortable both' : '')); - - text = _this2.options.escape ? Utils.escapeHTML(column.title) : column.title; - - var title = text; - if (column.checkbox) { - text = ''; - if (!_this2.options.singleSelect && _this2.options.checkboxHeader) { - text = ''; - } - _this2.header.stateField = column.field; - } - if (column.radio) { - text = ''; - _this2.header.stateField = column.field; - _this2.options.singleSelect = true; - } - if (!text && column.showSelectTitle) { - text += title; - } - - html.push(text); - html.push('
    '); - html.push('
    '); - html.push('
    '); - html.push(''); - }); - html.push(''); - }); - - this.$header.html(html.join('')); - this.$header.find('th[data-field]').each(function (i, el) { - $(el).data(visibleColumns[$(el).data('field')]); - }); - this.$container.off('click', '.th-inner').on('click', '.th-inner', function (e) { - var $this = $(e.currentTarget); - - if (_this2.options.detailView && !$this.parent().hasClass('bs-checkbox')) { - if ($this.closest('.bootstrap-table')[0] !== _this2.$container[0]) { - return false; - } - } - - if (_this2.options.sortable && $this.parent().data().sortable) { - _this2.onSort(e); - } - }); - - this.$header.children().children().off('keypress').on('keypress', function (e) { - if (_this2.options.sortable && $(e.currentTarget).data().sortable) { - var code = e.keyCode || e.which; - if (code === 13) { - // Enter keycode - _this2.onSort(e); - } - } - }); - - $(window).off('resize.bootstrap-table'); - if (!this.options.showHeader || this.options.cardView) { - this.$header.hide(); - this.$tableHeader.hide(); - this.$tableLoading.css('top', 0); - } else { - this.$header.show(); - this.$tableHeader.show(); - this.$tableLoading.css('top', this.$header.outerHeight() + 1); - // Assign the correct sortable arrow - this.getCaret(); - $(window).on('resize.bootstrap-table', function (e) { - return _this2.resetWidth(e); - }); + if (i === 0 && Utils.hasDetailViewIcon(_this2.options)) { + var rowspan = _this2.options.columns.length > 1 ? " rowspan=\"".concat(_this2.options.columns.length, "\"") : ''; + detailViewTemplate = "\n
    \n "); } - this.$selectAll = this.$header.find('[name="btSelectAll"]'); - this.$selectAll.off('click').on('click', function (_ref12) { - var currentTarget = _ref12.currentTarget; - - var checked = $(currentTarget).prop('checked'); - _this2[checked ? 'checkAll' : 'uncheckAll'](); - _this2.updateSelected(); - }); - } - }, { - key: 'initFooter', - value: function initFooter() { - if (!this.options.showFooter || this.options.cardView) { - this.$tableFooter.hide(); - } else { - this.$tableFooter.show(); - } - } - }, { - key: 'initData', - value: function initData(data, type) { - if (type === 'append') { - this.options.data = this.options.data.concat(data); - } else if (type === 'prepend') { - this.options.data = [].concat(data).concat(this.options.data); - } else { - this.options.data = data || this.options.data; + if (detailViewTemplate && _this2.options.detailViewAlign !== 'right') { + html.push(detailViewTemplate); } - this.data = this.options.data; + columns.forEach(function (column, j) { + var class_ = Utils.sprintf(' class="%s"', column['class']); + var unitWidth = column.widthUnit; + var width = parseFloat(column.width); + var halign = Utils.sprintf('text-align: %s; ', column.halign ? column.halign : column.align); + var align = Utils.sprintf('text-align: %s; ', column.align); + var style = Utils.sprintf('vertical-align: %s; ', column.valign); + style += Utils.sprintf('width: %s; ', (column.checkbox || column.radio) && !width ? !column.showSelectTitle ? '36px' : undefined : width ? width + unitWidth : undefined); - if (this.options.sidePagination === 'server') { - return; - } - this.initSort(); - } - }, { - key: 'initSort', - value: function initSort() { - var _this3 = this; - - var name = this.options.sortName; - var order = this.options.sortOrder === 'desc' ? -1 : 1; - var index = this.header.fields.indexOf(this.options.sortName); - var timeoutId = 0; - - if (index !== -1) { - if (this.options.sortStable) { - this.data.forEach(function (row, i) { - if (!row.hasOwnProperty('_position')) { - row._position = i; - } - }); - } - - if (this.options.customSort) { - Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]); - } else { - this.data.sort(function (a, b) { - if (_this3.header.sortNames[index]) { - name = _this3.header.sortNames[index]; - } - var aa = Utils.getItemField(a, name, _this3.options.escape); - var bb = Utils.getItemField(b, name, _this3.options.escape); - var value = Utils.calculateObjectValue(_this3.header, _this3.header.sorters[index], [aa, bb, a, b]); - - if (value !== undefined) { - if (_this3.options.sortStable && value === 0) { - return order * (a._position - b._position); - } - return order * value; - } - - // Fix #161: undefined or null string sort bug. - if (aa === undefined || aa === null) { - aa = ''; - } - if (bb === undefined || bb === null) { - bb = ''; - } - - if (_this3.options.sortStable && aa === bb) { - aa = a._position; - bb = b._position; - } - - // IF both values are numeric, do a numeric comparison - if (Utils.isNumeric(aa) && Utils.isNumeric(bb)) { - // Convert numerical values form string to float. - aa = parseFloat(aa); - bb = parseFloat(bb); - if (aa < bb) { - return order * -1; - } - if (aa > bb) { - return order; - } - return 0; - } - - if (aa === bb) { - return 0; - } - - // If value is not a string, convert to string - if (typeof aa !== 'string') { - aa = aa.toString(); - } - - if (aa.localeCompare(bb) === -1) { - return order * -1; - } - - return order; - }); - } - - if (this.options.sortClass !== undefined) { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - _this3.$el.removeClass(_this3.options.sortClass); - var index = _this3.$header.find('[data-field="' + _this3.options.sortName + '"]').index(); - _this3.$el.find('tr td:nth-child(' + (index + 1) + ')').addClass(_this3.options.sortClass); - }, 250); - } - } - } - }, { - key: 'onSort', - value: function onSort(_ref13) { - var type = _ref13.type, - currentTarget = _ref13.currentTarget; - - var $this = type === 'keypress' ? $(currentTarget) : $(currentTarget).parent(); - var $this_ = this.$header.find('th').eq($this.index()); - - this.$header.add(this.$header_).find('span.order').remove(); - - if (this.options.sortName === $this.data('field')) { - this.options.sortOrder = this.options.sortOrder === 'asc' ? 'desc' : 'asc'; - } else { - this.options.sortName = $this.data('field'); - if (this.options.rememberOrder) { - this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc'; - } else { - this.options.sortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].order; - } - } - this.trigger('sort', this.options.sortName, this.options.sortOrder); - - $this.add($this_).data('order', this.options.sortOrder); - - // Assign the correct sortable arrow - this.getCaret(); - - if (this.options.sidePagination === 'server') { - this.initServer(this.options.silentSort); - return; - } - - this.initSort(); - this.initBody(); - } - }, { - key: 'initToolbar', - value: function initToolbar() { - var _this4 = this; - - var o = this.options; - var html = []; - var timeoutId = 0; - var $keepOpen = void 0; - var $search = void 0; - var switchableCount = 0; - - if (this.$toolbar.find('.bs-bars').children().length) { - $('body').append($(o.toolbar)); - } - this.$toolbar.html(''); - - if (typeof o.toolbar === 'string' || _typeof(o.toolbar) === 'object') { - $(Utils.sprintf('
    ', this.constants.classes.pull, o.toolbarAlign)).appendTo(this.$toolbar).append($(o.toolbar)); - } - - // showColumns, showToggle, showRefresh - html = ['
    ']; - - if (typeof o.icons === 'string') { - o.icons = Utils.calculateObjectValue(null, o.icons); - } - - if (o.showPaginationSwitch) { - html.push(''); - } - - if (o.showRefresh) { - html.push(''); - } - - if (o.showToggle) { - html.push(''); - } - - if (o.showFullscreen) { - html.push(''); - } - - if (o.showColumns) { - html.push('
    \n \n ' + this.constants.html.toobarDropdow[0]); - - this.columns.forEach(function (column, i) { - if (column.radio || column.checkbox) { - return; - } - - if (o.cardView && !column.cardVisible) { - return; - } - - var checked = column.visible ? ' checked="checked"' : ''; - - if (column.switchable) { - html.push(Utils.sprintf(_this4.constants.html.toobarDropdowItem, Utils.sprintf(' %s', column.field, i, checked, column.title))); - switchableCount++; - } - }); - html.push(this.constants.html.toobarDropdow[1], '
    '); - } - - html.push('
    '); - - // Fix #188: this.showToolbar is for extensions - if (this.showToolbar || html.length > 2) { - this.$toolbar.append(html.join('')); - } - - if (o.showPaginationSwitch) { - this.$toolbar.find('button[name="paginationSwitch"]').off('click').on('click', function () { - return _this4.togglePagination(); - }); - } - - if (o.showFullscreen) { - this.$toolbar.find('button[name="fullscreen"]').off('click').on('click', function () { - return _this4.toggleFullscreen(); - }); - } - - if (o.showRefresh) { - this.$toolbar.find('button[name="refresh"]').off('click').on('click', function () { - return _this4.refresh(); - }); - } - - if (o.showToggle) { - this.$toolbar.find('button[name="toggle"]').off('click').on('click', function () { - _this4.toggleView(); - }); - } - - if (o.showColumns) { - $keepOpen = this.$toolbar.find('.keep-open'); - - if (switchableCount <= o.minimumCountColumns) { - $keepOpen.find('input').prop('disabled', true); - } - - $keepOpen.find('li, label').off('click').on('click', function (e) { - e.stopImmediatePropagation(); - }); - $keepOpen.find('input').off('click').on('click', function (_ref14) { - var currentTarget = _ref14.currentTarget; - - var $this = $(currentTarget); - - _this4.toggleColumn($this.val(), $this.prop('checked'), false); - _this4.trigger('column-switch', $this.data('field'), $this.prop('checked')); - }); - } - - if (o.search) { - html = []; - html.push(''); - - this.$toolbar.append(html.join('')); - $search = this.$toolbar.find('.search input'); - $search.off('keyup drop blur').on('keyup drop blur', function (event) { - if (o.searchOnEnterKey && event.keyCode !== 13) { - return; - } - - if ([37, 38, 39, 40].indexOf(event.keyCode) !== -1) { - return; - } - - clearTimeout(timeoutId); // doesn't matter if it's 0 - timeoutId = setTimeout(function () { - _this4.onSearch(event); - }, o.searchTimeOut); - }); - - if (Utils.isIEBrowser()) { - $search.off('mouseup').on('mouseup', function (event) { - clearTimeout(timeoutId); // doesn't matter if it's 0 - timeoutId = setTimeout(function () { - _this4.onSearch(event); - }, o.searchTimeOut); - }); - } - } - } - }, { - key: 'onSearch', - value: function onSearch(_ref15) { - var currentTarget = _ref15.currentTarget, - firedByInitSearchText = _ref15.firedByInitSearchText; - - var text = $(currentTarget).val().trim(); - - // trim search input - if (this.options.trimOnSearch && $(currentTarget).val() !== text) { - $(currentTarget).val(text); - } - - if (text === this.searchText) { - return; - } - this.searchText = text; - this.options.searchText = text; - - if (!firedByInitSearchText) { - this.options.pageNumber = 1; - } - this.initSearch(); - if (firedByInitSearchText) { - if (this.options.sidePagination === 'client') { - this.updatePagination(); - } - } else { - this.updatePagination(); - } - this.trigger('search', text); - } - }, { - key: 'initSearch', - value: function initSearch() { - var _this5 = this; - - if (this.options.sidePagination !== 'server') { - if (this.options.customSearch) { - this.data = Utils.calculateObjectValue(this.options, this.options.customSearch, [this.options.data, this.searchText]); + if (typeof column.fieldIndex === 'undefined' && !column.visible) { return; } - var s = this.searchText && (this.options.escape ? Utils.escapeHTML(this.searchText) : this.searchText).toLowerCase(); - var f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns; + var headerStyle = Utils.calculateObjectValue(null, _this2.options.headerStyle, [column]); + var csses = []; + var classes = ''; - // Check filter - this.data = f ? this.options.data.filter(function (item, i) { - for (var key in f) { - if (Array.isArray(f[key]) && !(f[key].indexOf(item[key]) !== -1) || !Array.isArray(f[key]) && item[key] !== f[key]) { - return false; - } - } - return true; - }) : this.options.data; + if (headerStyle && headerStyle.css) { + for (var _i = 0, _Object$entries = Object.entries(headerStyle.css); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; - this.data = s ? this.data.filter(function (item, i) { - for (var j = 0; j < _this5.header.fields.length; j++) { - if (!_this5.header.searchables[j]) { - continue; - } - - var key = Utils.isNumeric(_this5.header.fields[j]) ? parseInt(_this5.header.fields[j], 10) : _this5.header.fields[j]; - var column = _this5.columns[_this5.fieldsColumnsIndex[key]]; - var value = void 0; - - if (typeof key === 'string') { - value = item; - var props = key.split('.'); - for (var _i10 = 0; _i10 < props.length; _i10++) { - if (value[props[_i10]] !== null) { - value = value[props[_i10]]; - } - } - } else { - value = item[key]; - } - - // Fix #142: respect searchForamtter boolean - if (column && column.searchFormatter) { - value = Utils.calculateObjectValue(column, _this5.header.formatters[j], [value, item, i], value); - } - - if (typeof value === 'string' || typeof value === 'number') { - if (_this5.options.strictSearch) { - if (('' + value).toLowerCase() === s) { - return true; - } - } else { - if (('' + value).toLowerCase().indexOf(s) !== -1) { - return true; - } - } - } - } - return false; - }) : this.data; - } - } - }, { - key: 'initPagination', - value: function initPagination() { - var _this6 = this; - - var o = this.options; - if (!o.pagination) { - this.$pagination.hide(); - return; - } - this.$pagination.show(); - - var html = []; - var $allSelected = false; - var i = void 0; - var from = void 0; - var to = void 0; - var $pageList = void 0; - var $pre = void 0; - var $next = void 0; - var $number = void 0; - var data = this.getData(); - var pageList = o.pageList; - - if (o.sidePagination !== 'server') { - o.totalRows = data.length; - } - - this.totalPages = 0; - if (o.totalRows) { - if (o.pageSize === o.formatAllRows()) { - o.pageSize = o.totalRows; - $allSelected = true; - } else if (o.pageSize === o.totalRows) { - // Fix #667 Table with pagination, - // multiple pages and a search this matches to one page throws exception - var pageLst = typeof o.pageList === 'string' ? o.pageList.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',') : o.pageList; - if (pageLst.indexOf(o.formatAllRows().toLowerCase()) !== -1) { - $allSelected = true; + csses.push("".concat(key, ": ").concat(value)); } } - this.totalPages = ~~((o.totalRows - 1) / o.pageSize) + 1; - - o.totalPages = this.totalPages; - } - if (this.totalPages > 0 && o.pageNumber > this.totalPages) { - o.pageNumber = this.totalPages; - } - - this.pageFrom = (o.pageNumber - 1) * o.pageSize + 1; - this.pageTo = o.pageNumber * o.pageSize; - if (this.pageTo > o.totalRows) { - this.pageTo = o.totalRows; - } - - var paginationInfo = o.onlyInfoPagination ? o.formatDetailPagination(o.totalRows) : o.formatShowingRows(this.pageFrom, this.pageTo, o.totalRows); - - html.push('
    \n \n ' + paginationInfo + '\n '); - - if (!o.onlyInfoPagination) { - html.push(''); - - var pageNumber = ['\n \n ' + this.constants.html.pageDropdown[0]]; - - if (typeof o.pageList === 'string') { - var list = o.pageList.replace('[', '').replace(']', '').replace(/ /g, '').split(','); - - pageList = []; - for (var _iterator9 = list, _isArray9 = Array.isArray(_iterator9), _i11 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { - var _ref16; - - if (_isArray9) { - if (_i11 >= _iterator9.length) break; - _ref16 = _iterator9[_i11++]; - } else { - _i11 = _iterator9.next(); - if (_i11.done) break; - _ref16 = _i11.value; - } - - var value = _ref16; - - pageList.push(value.toUpperCase() === o.formatAllRows().toUpperCase() || value.toUpperCase() === 'UNLIMITED' ? o.formatAllRows() : +value); - } + if (headerStyle && headerStyle.classes) { + classes = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], headerStyle.classes].join(' ') : headerStyle.classes); } - pageList.forEach(function (page, i) { - if (!o.smartDisplay || i === 0 || pageList[i - 1] < o.totalRows) { - var active = void 0; - if ($allSelected) { - active = page === o.formatAllRows() ? _this6.constants.classes.dropdownActive : ''; - } else { - active = page === o.pageSize ? _this6.constants.classes.dropdownActive : ''; - } - pageNumber.push(Utils.sprintf(_this6.constants.html.pageDropdownItem, active, page)); - } - }); - pageNumber.push(this.constants.html.pageDropdown[1] + ''); + if (typeof column.fieldIndex !== 'undefined') { + _this2.header.fields[column.fieldIndex] = column.field; + _this2.header.styles[column.fieldIndex] = align + style; + _this2.header.classes[column.fieldIndex] = class_; + _this2.header.formatters[column.fieldIndex] = column.formatter; + _this2.header.detailFormatters[column.fieldIndex] = column.detailFormatter; + _this2.header.events[column.fieldIndex] = column.events; + _this2.header.sorters[column.fieldIndex] = column.sorter; + _this2.header.sortNames[column.fieldIndex] = column.sortName; + _this2.header.cellStyles[column.fieldIndex] = column.cellStyle; + _this2.header.searchables[column.fieldIndex] = column.searchable; - html.push(o.formatRecordsPerPage(pageNumber.join(''))); - html.push('
    '); - - html.push(''); - } - this.$pagination.html(html.join('')); - - var dropupClass = ['bottom', 'both'].indexOf(o.paginationVAlign) !== -1 ? ' ' + this.constants.classes.dropup : ''; - this.$pagination.last().find('.page-list > span').addClass(dropupClass); - - if (!o.onlyInfoPagination) { - $pageList = this.$pagination.find('.page-list a'); - $pre = this.$pagination.find('.page-pre'); - $next = this.$pagination.find('.page-next'); - $number = this.$pagination.find('.page-item').not('.page-next, .page-pre'); - - if (o.smartDisplay) { - if (this.totalPages <= 1) { - this.$pagination.find('div.pagination').hide(); - } - if (pageList.length < 2 || o.totalRows <= pageList[0]) { - this.$pagination.find('span.page-list').hide(); - } - - // when data is empty, hide the pagination - this.$pagination[this.getData().length ? 'show' : 'hide'](); - } - - if (!o.paginationLoop) { - if (o.pageNumber === 1) { - $pre.addClass('disabled'); - } - if (o.pageNumber === this.totalPages) { - $next.addClass('disabled'); - } - } - - if ($allSelected) { - o.pageSize = o.formatAllRows(); - } - // removed the events for last and first, onPageNumber executeds the same logic - $pageList.off('click').on('click', function (e) { - return _this6.onPageListChange(e); - }); - $pre.off('click').on('click', function (e) { - return _this6.onPagePre(e); - }); - $next.off('click').on('click', function (e) { - return _this6.onPageNext(e); - }); - $number.off('click').on('click', function (e) { - return _this6.onPageNumber(e); - }); - } - } - }, { - key: 'updatePagination', - value: function updatePagination(event) { - // Fix #171: IE disabled button can be clicked bug. - if (event && $(event.currentTarget).hasClass('disabled')) { - return; - } - - if (!this.options.maintainSelected) { - this.resetRows(); - } - - this.initPagination(); - if (this.options.sidePagination === 'server') { - this.initServer(); - } else { - this.initBody(); - } - - this.trigger('page-change', this.options.pageNumber, this.options.pageSize); - } - }, { - key: 'onPageListChange', - value: function onPageListChange(event) { - event.preventDefault(); - var $this = $(event.currentTarget); - - $this.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive); - this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text(); - this.$toolbar.find('.page-size').text(this.options.pageSize); - - this.updatePagination(event); - return false; - } - }, { - key: 'onPagePre', - value: function onPagePre(event) { - event.preventDefault(); - if (this.options.pageNumber - 1 === 0) { - this.options.pageNumber = this.options.totalPages; - } else { - this.options.pageNumber--; - } - this.updatePagination(event); - return false; - } - }, { - key: 'onPageNext', - value: function onPageNext(event) { - event.preventDefault(); - if (this.options.pageNumber + 1 > this.options.totalPages) { - this.options.pageNumber = 1; - } else { - this.options.pageNumber++; - } - this.updatePagination(event); - return false; - } - }, { - key: 'onPageNumber', - value: function onPageNumber(event) { - event.preventDefault(); - if (this.options.pageNumber === +$(event.currentTarget).text()) { - return; - } - this.options.pageNumber = +$(event.currentTarget).text(); - this.updatePagination(event); - return false; - } - }, { - key: 'initRow', - value: function initRow(item, i, data, parentDom) { - var _this7 = this; - - var html = []; - var style = {}; - var csses = []; - var data_ = ''; - var attributes = {}; - var htmlAttributes = []; - - if (Utils.findIndex(this.hiddenRows, item) > -1) { - return; - } - - style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style); - - if (style && style.css) { - for (var _iterator10 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(style.css), _isArray10 = Array.isArray(_iterator10), _i12 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { - var _ref17; - - if (_isArray10) { - if (_i12 >= _iterator10.length) break; - _ref17 = _iterator10[_i12++]; - } else { - _i12 = _iterator10.next(); - if (_i12.done) break; - _ref17 = _i12.value; - } - - var _ref18 = _ref17, - _ref19 = _slicedToArray(_ref18, 2), - key = _ref19[0], - value = _ref19[1]; - - csses.push(key + ': ' + value); - } - } - - attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes); - - if (attributes) { - for (var _iterator11 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(attributes), _isArray11 = Array.isArray(_iterator11), _i13 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { - var _ref20; - - if (_isArray11) { - if (_i13 >= _iterator11.length) break; - _ref20 = _iterator11[_i13++]; - } else { - _i13 = _iterator11.next(); - if (_i13.done) break; - _ref20 = _i13.value; - } - - var _ref21 = _ref20, - _ref22 = _slicedToArray(_ref21, 2), - _key2 = _ref22[0], - _value2 = _ref22[1]; - - htmlAttributes.push(_key2 + '="' + Utils.escapeHTML(_value2) + '"'); - } - } - - if (item._data && !Utils.isEmptyObject(item._data)) { - for (var _iterator12 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(item._data), _isArray12 = Array.isArray(_iterator12), _i14 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { - var _ref23; - - if (_isArray12) { - if (_i14 >= _iterator12.length) break; - _ref23 = _iterator12[_i14++]; - } else { - _i14 = _iterator12.next(); - if (_i14.done) break; - _ref23 = _i14.value; - } - - var _ref24 = _ref23, - _ref25 = _slicedToArray(_ref24, 2), - k = _ref25[0], - v = _ref25[1]; - - // ignore data-index - if (k === 'index') { + if (!column.visible) { return; } - data_ += ' data-' + k + '="' + v + '"'; - } - } - html.push(''); - - if (this.options.cardView) { - html.push('
    '); - } - - if (!this.options.cardView && this.options.detailView) { - html.push(''); - - if (Utils.calculateObjectValue(null, this.options.detailFilter, [i, item])) { - html.push('\n \n ' + Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen) + '\n \n '); - } - - html.push(''); - } - - this.header.fields.forEach(function (field, j) { - var text = ''; - var value_ = Utils.getItemField(item, field, _this7.options.escape); - var value = ''; - var type = ''; - var cellStyle = {}; - var id_ = ''; - var class_ = _this7.header.classes[j]; - var style_ = ''; - var data_ = ''; - var rowspan_ = ''; - var colspan_ = ''; - var title_ = ''; - var column = _this7.columns[j]; - - if (_this7.fromHtml && typeof value_ === 'undefined') { - if (!column.checkbox && !column.radio) { + if (_this2.options.cardView && !column.cardVisible) { return; } + + visibleColumns[column.field] = column; } - if (!column.visible) { - return; - } + html.push(" 0 ? ' data-not-first-th' : '', '>'); + html.push(Utils.sprintf('
    ', _this2.options.sortable && column.sortable ? 'sortable both' : '')); + var text = _this2.options.escape ? Utils.escapeHTML(column.title) : column.title; + var title = text; - if (_this7.options.cardView && !column.cardVisible) { - return; - } + if (column.checkbox) { + text = ''; - if (column.escape) { - value_ = Utils.escapeHTML(value_); - } - - if (csses.concat([_this7.header.styles[j]]).length) { - style_ = ' style="' + csses.concat([_this7.header.styles[j]]).join('; ') + '"'; - } - // handle td's id and class - if (item['_' + field + '_id']) { - id_ = Utils.sprintf(' id="%s"', item['_' + field + '_id']); - } - if (item['_' + field + '_class']) { - class_ = Utils.sprintf(' class="%s"', item['_' + field + '_class']); - } - if (item['_' + field + '_rowspan']) { - rowspan_ = Utils.sprintf(' rowspan="%s"', item['_' + field + '_rowspan']); - } - if (item['_' + field + '_colspan']) { - colspan_ = Utils.sprintf(' colspan="%s"', item['_' + field + '_colspan']); - } - if (item['_' + field + '_title']) { - title_ = Utils.sprintf(' title="%s"', item['_' + field + '_title']); - } - cellStyle = Utils.calculateObjectValue(_this7.header, _this7.header.cellStyles[j], [value_, item, i, field], cellStyle); - if (cellStyle.classes) { - class_ = ' class="' + cellStyle.classes + '"'; - } - if (cellStyle.css) { - var csses_ = []; - for (var _iterator13 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(cellStyle.css), _isArray13 = Array.isArray(_iterator13), _i15 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { - var _ref26; - - if (_isArray13) { - if (_i15 >= _iterator13.length) break; - _ref26 = _iterator13[_i15++]; - } else { - _i15 = _iterator13.next(); - if (_i15.done) break; - _ref26 = _i15.value; - } - - var _ref27 = _ref26, - _ref28 = _slicedToArray(_ref27, 2), - _key3 = _ref28[0], - _value3 = _ref28[1]; - - csses_.push(_key3 + ': ' + _value3); + if (!_this2.options.singleSelect && _this2.options.checkboxHeader) { + text = ''; } - style_ = ' style="' + csses_.concat(_this7.header.styles[j]).join('; ') + '"'; + + _this2.header.stateField = column.field; } - value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_); - - if (item['_' + field + '_data'] && !Utils.isEmptyObject(item['_' + field + '_data'])) { - for (var _iterator14 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(item['_' + field + '_data']), _isArray14 = Array.isArray(_iterator14), _i16 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { - var _ref29; - - if (_isArray14) { - if (_i16 >= _iterator14.length) break; - _ref29 = _iterator14[_i16++]; - } else { - _i16 = _iterator14.next(); - if (_i16.done) break; - _ref29 = _i16.value; - } - - var _ref30 = _ref29, - _ref31 = _slicedToArray(_ref30, 2), - _k2 = _ref31[0], - _v = _ref31[1]; - - // ignore data-index - if (_k2 === 'index') { - return; - } - data_ += ' data-' + _k2 + '="' + _v + '"'; - } + if (column.radio) { + text = ''; + _this2.header.stateField = column.field; } - if (column.checkbox || column.radio) { - type = column.checkbox ? 'checkbox' : type; - type = column.radio ? 'radio' : type; - - var c = column['class'] || ''; - var isChecked = value === true || value_ || value && value.checked; - var isDisabled = !column.checkboxEnabled || value && value.disabled; - - text = [_this7.options.cardView ? '
    ' : '', '', _this7.header.formatters[j] && typeof value === 'string' ? value : '', _this7.options.cardView ? '
    ' : ''].join(''); - - item[_this7.header.stateField] = value === true || !!value_ || value && value.checked; - } else { - value = typeof value === 'undefined' || value === null ? _this7.options.undefinedText : value; - - if (_this7.options.cardView) { - var cardTitle = _this7.options.showHeader ? '' + Utils.getFieldTitle(_this7.columns, field) + '' : ''; - - text = '
    ' + cardTitle + '' + value + '
    '; - - if (_this7.options.smartDisplay && value === '') { - text = '
    '; - } - } else { - text = '' + value + ''; - } + if (!text && column.showSelectTitle) { + text += title; } html.push(text); + html.push('
    '); + html.push('
    '); + html.push('
    '); + html.push(''); }); - if (this.options.cardView) { - html.push('
    '); + if (detailViewTemplate && _this2.options.detailViewAlign === 'right') { + html.push(detailViewTemplate); } + html.push(''); - return html.join(''); + if (html.length > 3) { + headerHtml.push(html.join('')); + } + }); + this.$header.html(headerHtml.join('')); + this.$header.find('th[data-field]').each(function (i, el) { + $__default['default'](el).data(visibleColumns[$__default['default'](el).data('field')]); + }); + this.$container.off('click', '.th-inner').on('click', '.th-inner', function (e) { + var $this = $__default['default'](e.currentTarget); + + if (_this2.options.detailView && !$this.parent().hasClass('bs-checkbox')) { + if ($this.closest('.bootstrap-table')[0] !== _this2.$container[0]) { + return false; + } + } + + if (_this2.options.sortable && $this.parent().data().sortable) { + _this2.onSort(e); + } + }); + this.$header.children().children().off('keypress').on('keypress', function (e) { + if (_this2.options.sortable && $__default['default'](e.currentTarget).data().sortable) { + var code = e.keyCode || e.which; + + if (code === 13) { + // Enter keycode + _this2.onSort(e); + } + } + }); + var resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id')); + $__default['default'](window).off(resizeEvent); + + if (!this.options.showHeader || this.options.cardView) { + this.$header.hide(); + this.$tableHeader.hide(); + this.$tableLoading.css('top', 0); + } else { + this.$header.show(); + this.$tableHeader.show(); + this.$tableLoading.css('top', this.$header.outerHeight() + 1); // Assign the correct sortable arrow + + this.getCaret(); + $__default['default'](window).on(resizeEvent, function () { + return _this2.resetView(); + }); } - }, { - key: 'initBody', - value: function initBody(fixedScroll) { - var _this8 = this; - var data = this.getData(); + this.$selectAll = this.$header.find('[name="btSelectAll"]'); + this.$selectAll.off('click').on('click', function (e) { + e.stopPropagation(); + var checked = $__default['default'](e.currentTarget).prop('checked'); - this.trigger('pre-body', data); + _this2[checked ? 'checkAll' : 'uncheckAll'](); - this.$body = this.$el.find('>tbody'); - if (!this.$body.length) { - this.$body = $('').appendTo(this.$el); + _this2.updateSelected(); + }); + } + }, { + key: "initData", + value: function initData(data, type) { + if (type === 'append') { + this.options.data = this.options.data.concat(data); + } else if (type === 'prepend') { + this.options.data = [].concat(data).concat(this.options.data); + } else { + data = data || Utils.deepCopy(this.options.data); + this.options.data = Array.isArray(data) ? data : data[this.options.dataField]; + } + + this.data = _toConsumableArray(this.options.data); + + if (this.options.sortReset) { + this.unsortedData = _toConsumableArray(this.data); + } + + if (this.options.sidePagination === 'server') { + return; + } + + this.initSort(); + } + }, { + key: "initSort", + value: function initSort() { + var _this3 = this; + + var name = this.options.sortName; + var order = this.options.sortOrder === 'desc' ? -1 : 1; + var index = this.header.fields.indexOf(this.options.sortName); + var timeoutId = 0; + + if (index !== -1) { + if (this.options.sortStable) { + this.data.forEach(function (row, i) { + if (!row.hasOwnProperty('_position')) { + row._position = i; + } + }); } - // Fix #389 Bootstrap-table-flatJSON is not working - if (!this.options.pagination || this.options.sidePagination === 'server') { - this.pageFrom = 1; - this.pageTo = data.length; - } - - var trFragments = $(document.createDocumentFragment()); - var hasTr = false; - - for (var i = this.pageFrom - 1; i < this.pageTo; i++) { - var item = data[i]; - var tr = this.initRow(item, i, data, trFragments); - hasTr = hasTr || !!tr; - if (tr && typeof tr === 'string') { - trFragments.append(tr); - } - } - - // show no records - if (!hasTr) { - this.$body.html('' + Utils.sprintf('%s', this.$header.find('th').length, this.options.formatNoMatches()) + ''); + if (this.options.customSort) { + Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]); } else { - this.$body.html(trFragments); + this.data.sort(function (a, b) { + if (_this3.header.sortNames[index]) { + name = _this3.header.sortNames[index]; + } + + var aa = Utils.getItemField(a, name, _this3.options.escape); + var bb = Utils.getItemField(b, name, _this3.options.escape); + var value = Utils.calculateObjectValue(_this3.header, _this3.header.sorters[index], [aa, bb, a, b]); + + if (value !== undefined) { + if (_this3.options.sortStable && value === 0) { + return order * (a._position - b._position); + } + + return order * value; + } + + return Utils.sort(aa, bb, order, _this3.options.sortStable, a._position, b._position); + }); } - if (!fixedScroll) { - this.scrollTo(0); + if (this.options.sortClass !== undefined) { + clearTimeout(timeoutId); + timeoutId = setTimeout(function () { + _this3.$el.removeClass(_this3.options.sortClass); + + var index = _this3.$header.find("[data-field=\"".concat(_this3.options.sortName, "\"]")).index(); + + _this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass); + }, 250); + } + } else if (this.options.sortReset) { + this.data = _toConsumableArray(this.unsortedData); + } + } + }, { + key: "onSort", + value: function onSort(_ref) { + var type = _ref.type, + currentTarget = _ref.currentTarget; + var $this = type === 'keypress' ? $__default['default'](currentTarget) : $__default['default'](currentTarget).parent(); + var $this_ = this.$header.find('th').eq($this.index()); + this.$header.add(this.$header_).find('span.order').remove(); + + if (this.options.sortName === $this.data('field')) { + var currentSortOrder = this.options.sortOrder; + + if (currentSortOrder === undefined) { + this.options.sortOrder = 'asc'; + } else if (currentSortOrder === 'asc') { + this.options.sortOrder = 'desc'; + } else if (this.options.sortOrder === 'desc') { + this.options.sortOrder = this.options.sortReset ? undefined : 'asc'; } - // click to select by column - this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (_ref32) { - var currentTarget = _ref32.currentTarget, - type = _ref32.type, - target = _ref32.target; + if (this.options.sortOrder === undefined) { + this.options.sortName = undefined; + } + } else { + this.options.sortName = $this.data('field'); - var $td = $(currentTarget); - var $tr = $td.parent(); - var $cardviewArr = $(target).parents('.card-views').children(); - var $cardviewTarget = $(target).parents('.card-view'); - var item = _this8.data[$tr.data('index')]; - var index = _this8.options.cardView ? $cardviewArr.index($cardviewTarget) : $td[0].cellIndex; - var fields = _this8.getVisibleFields(); - var field = fields[_this8.options.detailView && !_this8.options.cardView ? index - 1 : index]; - var column = _this8.columns[_this8.fieldsColumnsIndex[field]]; - var value = Utils.getItemField(item, field, _this8.options.escape); + if (this.options.rememberOrder) { + this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc'; + } else { + this.options.sortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].sortOrder || this.columns[this.fieldsColumnsIndex[$this.data('field')]].order; + } + } - if ($td.find('.detail-icon').length) { - return; + this.trigger('sort', this.options.sortName, this.options.sortOrder); + $this.add($this_).data('order', this.options.sortOrder); // Assign the correct sortable arrow + + this.getCaret(); + + if (this.options.sidePagination === 'server' && this.options.serverSort) { + this.options.pageNumber = 1; + this.initServer(this.options.silentSort); + return; + } + + this.initSort(); + this.initBody(); + } + }, { + key: "initToolbar", + value: function initToolbar() { + var _this4 = this; + + var opts = this.options; + var html = []; + var timeoutId = 0; + var $keepOpen; + var switchableCount = 0; + + if (this.$toolbar.find('.bs-bars').children().length) { + $__default['default']('body').append($__default['default'](opts.toolbar)); + } + + this.$toolbar.html(''); + + if (typeof opts.toolbar === 'string' || _typeof(opts.toolbar) === 'object') { + $__default['default'](Utils.sprintf('
    ', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($__default['default'](opts.toolbar)); + } // showColumns, showToggle, showRefresh + + + html = ["
    ")]; + + if (typeof opts.buttonsOrder === 'string') { + opts.buttonsOrder = opts.buttonsOrder.replace(/\[|\]| |'/g, '').split(','); + } + + this.buttons = Object.assign(this.buttons, { + paginationSwitch: { + text: opts.pagination ? opts.formatPaginationSwitchUp() : opts.formatPaginationSwitchDown(), + icon: opts.pagination ? opts.icons.paginationSwitchDown : opts.icons.paginationSwitchUp, + render: false, + event: this.togglePagination, + attributes: { + 'aria-label': opts.formatPaginationSwitch(), + title: opts.formatPaginationSwitch() } + }, + refresh: { + text: opts.formatRefresh(), + icon: opts.icons.refresh, + render: false, + event: this.refresh, + attributes: { + 'aria-label': opts.formatRefresh(), + title: opts.formatRefresh() + } + }, + toggle: { + text: opts.formatToggle(), + icon: opts.icons.toggleOff, + render: false, + event: this.toggleView, + attributes: { + 'aria-label': opts.formatToggleOn(), + title: opts.formatToggleOn() + } + }, + fullscreen: { + text: opts.formatFullscreen(), + icon: opts.icons.fullscreen, + render: false, + event: this.toggleFullscreen, + attributes: { + 'aria-label': opts.formatFullscreen(), + title: opts.formatFullscreen() + } + }, + columns: { + render: false, + html: function html() { + var html = []; + html.push("
    \n \n ").concat(_this4.constants.html.toolbarDropdown[0])); - _this8.trigger(type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td); - _this8.trigger(type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field); + if (opts.showColumnsSearch) { + html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('', _this4.constants.classes.input, opts.formatSearch()))); + html.push(_this4.constants.html.toolbarDropdownSeparator); + } - // if click to select - then trigger the checkbox/radio click - if (type === 'click' && _this8.options.clickToSelect && column.clickToSelect && !Utils.calculateObjectValue(_this8.options, _this8.options.ignoreClickToSelectOn, [target])) { - var $selectItem = $tr.find(Utils.sprintf('[name="%s"]', _this8.options.selectItemName)); - if ($selectItem.length) { - $selectItem[0].click(); // #144: .trigger('click') bug + if (opts.showColumnsToggleAll) { + var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) { + return !_this4.isSelectionColumn(column); + }).length; + + html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf(' %s', allFieldsVisible ? 'checked="checked"' : '', opts.formatColumnsToggleAll()))); + html.push(_this4.constants.html.toolbarDropdownSeparator); + } + + var visibleColumns = 0; + + _this4.columns.forEach(function (column) { + if (column.visible) { + visibleColumns++; + } + }); + + _this4.columns.forEach(function (column, i) { + if (_this4.isSelectionColumn(column)) { + return; + } + + if (opts.cardView && !column.cardVisible) { + return; + } + + var checked = column.visible ? ' checked="checked"' : ''; + var disabled = visibleColumns <= opts.minimumCountColumns && checked ? ' disabled="disabled"' : ''; + + if (column.switchable) { + html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf(' %s', column.field, i, checked, disabled, column.title))); + switchableCount++; + } + }); + + html.push(_this4.constants.html.toolbarDropdown[1], '
    '); + return html.join(''); + } + } + }); + var buttonsHtml = {}; + + for (var _i2 = 0, _Object$entries2 = Object.entries(this.buttons); _i2 < _Object$entries2.length; _i2++) { + var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2), + buttonName = _Object$entries2$_i[0], + buttonConfig = _Object$entries2$_i[1]; + + var buttonHtml = void 0; + + if (buttonConfig.hasOwnProperty('html')) { + if (typeof buttonConfig.html === 'function') { + buttonHtml = buttonConfig.html(); + } else if (typeof buttonConfig.html === 'string') { + buttonHtml = buttonConfig.html; + } + } else { + buttonHtml = "'; + } + + buttonsHtml[buttonName] = buttonHtml; + var optionName = "show".concat(buttonName.charAt(0).toUpperCase()).concat(buttonName.substring(1)); + var showOption = opts[optionName]; + + if ((!buttonConfig.hasOwnProperty('render') || buttonConfig.hasOwnProperty('render') && buttonConfig.render) && (showOption === undefined || showOption === true)) { + opts[optionName] = true; + } + + if (!opts.buttonsOrder.includes(buttonName)) { + opts.buttonsOrder.push(buttonName); + } + } // Adding the button html to the final toolbar html when the showOption is true + + + var _iterator = _createForOfIteratorHelper(opts.buttonsOrder), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var button = _step.value; + var _showOption = opts["show".concat(button.charAt(0).toUpperCase()).concat(button.substring(1))]; + + if (_showOption) { + html.push(buttonsHtml[button]); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + html.push('
    '); // Fix #188: this.showToolbar is for extensions + + if (this.showToolbar || html.length > 2) { + this.$toolbar.append(html.join('')); + } + + for (var _i4 = 0, _Object$entries4 = Object.entries(this.buttons); _i4 < _Object$entries4.length; _i4++) { + var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2), + _buttonName = _Object$entries4$_i[0], + _buttonConfig = _Object$entries4$_i[1]; + + if (_buttonConfig.hasOwnProperty('event')) { + if (typeof _buttonConfig.event === 'function' || typeof _buttonConfig.event === 'string') { + var _ret = function () { + var event = typeof _buttonConfig.event === 'string' ? window[_buttonConfig.event] : _buttonConfig.event; + + _this4.$toolbar.find("button[name=\"".concat(_buttonName, "\"]")).off('click').on('click', function () { + return event.call(_this4); + }); + + return "continue"; + }(); + + if (_ret === "continue") continue; } var _loop = function _loop() { - if (_isArray15) { - if (_i17 >= _iterator15.length) return 'break'; - _ref33 = _iterator15[_i17++]; - } else { - _i17 = _iterator15.next(); - if (_i17.done) return 'break'; - _ref33 = _i17.value; - } + var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i5], 2), + eventType = _Object$entries5$_i[0], + eventFunction = _Object$entries5$_i[1]; - var _ref34 = _ref33, - _ref35 = _slicedToArray(_ref34, 2), - key = _ref35[0], - event = _ref35[1]; + var event = typeof eventFunction === 'string' ? window[eventFunction] : eventFunction; - _this8.$body.find('>tr:not(.no-records-found)').each(function (i, tr) { - var $tr = $(tr); - var $td = $tr.find(_this8.options.cardView ? '.card-view' : 'td').eq(fieldIndex); - var index = key.indexOf(' '); - var name = key.substring(0, index); - var el = key.substring(index + 1); - - $td.find(el).off(name).on(name, function (e) { - var index = $tr.data('index'); - var row = _this8.data[index]; - var value = row[field]; - - event.apply(_this8, [e, value, row, index]); - }); + _this4.$toolbar.find("button[name=\"".concat(_buttonName, "\"]")).off(eventType).on(eventType, function () { + return event.call(_this4); }); }; - for (var _iterator15 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(events), _isArray15 = Array.isArray(_iterator15), _i17 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { - var _ref33; - - var _ret = _loop(); - - if (_ret === 'break') break; + for (var _i5 = 0, _Object$entries5 = Object.entries(_buttonConfig.event); _i5 < _Object$entries5.length; _i5++) { + _loop(); } + } + } + + if (opts.showColumns) { + $keepOpen = this.$toolbar.find('.keep-open'); + var $checkboxes = $keepOpen.find('input[type="checkbox"]:not(".toggle-all")'); + var $toggleAll = $keepOpen.find('input[type="checkbox"].toggle-all'); + + if (switchableCount <= opts.minimumCountColumns) { + $keepOpen.find('input').prop('disabled', true); + } + + $keepOpen.find('li, label').off('click').on('click', function (e) { + e.stopImmediatePropagation(); + }); + $checkboxes.off('click').on('click', function (_ref2) { + var currentTarget = _ref2.currentTarget; + var $this = $__default['default'](currentTarget); + + _this4._toggleColumn($this.val(), $this.prop('checked'), false); + + _this4.trigger('column-switch', $this.data('field'), $this.prop('checked')); + + $toggleAll.prop('checked', $checkboxes.filter(':checked').length === _this4.columns.filter(function (column) { + return !_this4.isSelectionColumn(column); + }).length); + }); + $toggleAll.off('click').on('click', function (_ref3) { + var currentTarget = _ref3.currentTarget; + + _this4._toggleAllColumns($__default['default'](currentTarget).prop('checked')); }); - this.updateSelected(); - this.resetView(); + if (opts.showColumnsSearch) { + var $columnsSearch = $keepOpen.find('[name="columnsSearch"]'); + var $listItems = $keepOpen.find('.dropdown-item-marker'); + $columnsSearch.on('keyup paste change', function (_ref4) { + var currentTarget = _ref4.currentTarget; + var $this = $__default['default'](currentTarget); + var searchValue = $this.val().toLowerCase(); + $listItems.show(); + $checkboxes.each(function (i, el) { + var $checkbox = $__default['default'](el); + var $listItem = $checkbox.parents('.dropdown-item-marker'); + var text = $listItem.text().toLowerCase(); - this.trigger('post-body', data); + if (!text.includes(searchValue)) { + $listItem.hide(); + } + }); + }); + } } - }, { - key: 'initServer', - value: function initServer(silent, query, url) { - var _this9 = this; - var data = {}; - var index = this.header.fields.indexOf(this.options.sortName); + var handleInputEvent = function handleInputEvent($searchInput) { + var eventTriggers = 'keyup drop blur mouseup'; + $searchInput.off(eventTriggers).on(eventTriggers, function (event) { + if (opts.searchOnEnterKey && event.keyCode !== 13) { + return; + } - var params = { - searchText: this.searchText, - sortName: this.options.sortName, - sortOrder: this.options.sortOrder + if ([37, 38, 39, 40].includes(event.keyCode)) { + return; + } + + clearTimeout(timeoutId); // doesn't matter if it's 0 + + timeoutId = setTimeout(function () { + _this4.onSearch({ + currentTarget: event.currentTarget + }); + }, opts.searchTimeOut); + }); + }; // Fix #4516: this.showSearchClearButton is for extensions + + + if ((opts.search || this.showSearchClearButton) && typeof opts.searchSelector !== 'string') { + html = []; + var showSearchButton = Utils.sprintf(this.constants.html.searchButton, this.constants.buttonsClass, opts.formatSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.search) : '', opts.showButtonText ? opts.formatSearch() : ''); + var showSearchClearButton = Utils.sprintf(this.constants.html.searchClearButton, this.constants.buttonsClass, opts.formatClearSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.clearSearch) : '', opts.showButtonText ? opts.formatClearSearch() : ''); + var searchInputHtml = ""); + var searchInputFinalHtml = searchInputHtml; + + if (opts.showSearchButton || opts.showSearchClearButton) { + var _buttonsHtml = (opts.showSearchButton ? showSearchButton : '') + (opts.showSearchClearButton ? showSearchClearButton : ''); + + searchInputFinalHtml = opts.search ? Utils.sprintf(this.constants.html.inputGroup, searchInputHtml, _buttonsHtml) : _buttonsHtml; + } + + html.push(Utils.sprintf("\n
    \n %s\n
    \n "), searchInputFinalHtml)); + this.$toolbar.append(html.join('')); + var $searchInput = Utils.getSearchInput(this); + + if (opts.showSearchButton) { + this.$toolbar.find('.search button[name=search]').off('click').on('click', function () { + clearTimeout(timeoutId); // doesn't matter if it's 0 + + timeoutId = setTimeout(function () { + _this4.onSearch({ + currentTarget: $searchInput + }); + }, opts.searchTimeOut); + }); + + if (opts.searchOnEnterKey) { + handleInputEvent($searchInput); + } + } else { + handleInputEvent($searchInput); + } + + if (opts.showSearchClearButton) { + this.$toolbar.find('.search button[name=clearSearch]').click(function () { + _this4.resetSearch(); + }); + } + } else if (typeof opts.searchSelector === 'string') { + var _$searchInput = Utils.getSearchInput(this); + + handleInputEvent(_$searchInput); + } + } + }, { + key: "onSearch", + value: function onSearch() { + var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + currentTarget = _ref5.currentTarget, + firedByInitSearchText = _ref5.firedByInitSearchText; + + var overwriteSearchText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (currentTarget !== undefined && $__default['default'](currentTarget).length && overwriteSearchText) { + var text = $__default['default'](currentTarget).val().trim(); + + if (this.options.trimOnSearch && $__default['default'](currentTarget).val() !== text) { + $__default['default'](currentTarget).val(text); + } + + if (this.searchText === text) { + return; + } + + if (currentTarget === Utils.getSearchInput(this)[0] || $__default['default'](currentTarget).hasClass('search-input')) { + this.searchText = text; + this.options.searchText = text; + } + } + + if (!firedByInitSearchText) { + this.options.pageNumber = 1; + } + + this.initSearch(); + + if (firedByInitSearchText) { + if (this.options.sidePagination === 'client') { + this.updatePagination(); + } + } else { + this.updatePagination(); + } + + this.trigger('search', this.searchText); + } + }, { + key: "initSearch", + value: function initSearch() { + var _this5 = this; + + this.filterOptions = this.filterOptions || this.options.filterOptions; + + if (this.options.sidePagination !== 'server') { + if (this.options.customSearch) { + this.data = Utils.calculateObjectValue(this.options, this.options.customSearch, [this.options.data, this.searchText, this.filterColumns]); + + if (this.options.sortReset) { + this.unsortedData = _toConsumableArray(this.data); + } + + return; + } + + var s = this.searchText && (this.fromHtml ? Utils.escapeHTML(this.searchText) : this.searchText).toLowerCase(); + var f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns; + + if (this.options.searchAccentNeutralise) { + s = Utils.normalizeAccent(s); + } // Check filter + + + if (typeof this.filterOptions.filterAlgorithm === 'function') { + this.data = this.options.data.filter(function (item) { + return _this5.filterOptions.filterAlgorithm.apply(null, [item, f]); + }); + } else if (typeof this.filterOptions.filterAlgorithm === 'string') { + this.data = f ? this.options.data.filter(function (item) { + var filterAlgorithm = _this5.filterOptions.filterAlgorithm; + + if (filterAlgorithm === 'and') { + for (var key in f) { + if (Array.isArray(f[key]) && !f[key].includes(item[key]) || !Array.isArray(f[key]) && item[key] !== f[key]) { + return false; + } + } + } else if (filterAlgorithm === 'or') { + var match = false; + + for (var _key in f) { + if (Array.isArray(f[_key]) && f[_key].includes(item[_key]) || !Array.isArray(f[_key]) && item[_key] === f[_key]) { + match = true; + } + } + + return match; + } + + return true; + }) : _toConsumableArray(this.options.data); + } + + var visibleFields = this.getVisibleFields(); + this.data = s ? this.data.filter(function (item, i) { + for (var j = 0; j < _this5.header.fields.length; j++) { + if (!_this5.header.searchables[j] || _this5.options.visibleSearch && visibleFields.indexOf(_this5.header.fields[j]) === -1) { + continue; + } + + var key = Utils.isNumeric(_this5.header.fields[j]) ? parseInt(_this5.header.fields[j], 10) : _this5.header.fields[j]; + var column = _this5.columns[_this5.fieldsColumnsIndex[key]]; + var value = void 0; + + if (typeof key === 'string') { + value = item; + var props = key.split('.'); + + for (var _i6 = 0; _i6 < props.length; _i6++) { + if (value[props[_i6]] !== null) { + value = value[props[_i6]]; + } + } + } else { + value = item[key]; + } + + if (_this5.options.searchAccentNeutralise) { + value = Utils.normalizeAccent(value); + } // Fix #142: respect searchFormatter boolean + + + if (column && column.searchFormatter) { + value = Utils.calculateObjectValue(column, _this5.header.formatters[j], [value, item, i, column.field], value); + } + + if (typeof value === 'string' || typeof value === 'number') { + if (_this5.options.strictSearch) { + if ("".concat(value).toLowerCase() === s) { + return true; + } + } else { + var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(-?\d+)?|(-?\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm; + var matches = largerSmallerEqualsRegex.exec(_this5.searchText); + var comparisonCheck = false; + + if (matches) { + var operator = matches[1] || "".concat(matches[5], "l"); + var comparisonValue = matches[2] || matches[3]; + var int = parseInt(value, 10); + var comparisonInt = parseInt(comparisonValue, 10); + + switch (operator) { + case '>': + case ' comparisonInt; + break; + + case '<': + case '>l': + comparisonCheck = int < comparisonInt; + break; + + case '<=': + case '=<': + case '>=l': + case '=>l': + comparisonCheck = int <= comparisonInt; + break; + + case '>=': + case '=>': + case '<=l': + case '== comparisonInt; + break; + } + } + + if (comparisonCheck || "".concat(value).toLowerCase().includes(s)) { + return true; + } + } + } + } + + return false; + }) : this.data; + + if (this.options.sortReset) { + this.unsortedData = _toConsumableArray(this.data); + } + + this.initSort(); + } + } + }, { + key: "initPagination", + value: function initPagination() { + var _this6 = this; + + var opts = this.options; + + if (!opts.pagination) { + this.$pagination.hide(); + return; + } + + this.$pagination.show(); + var html = []; + var allSelected = false; + var i; + var from; + var to; + var $pageList; + var $pre; + var $next; + var $number; + var data = this.getData({ + includeHiddenRows: false + }); + var pageList = opts.pageList; + + if (typeof pageList === 'string') { + pageList = pageList.replace(/\[|\]| /g, '').toLowerCase().split(','); + } + + pageList = pageList.map(function (value) { + if (typeof value === 'string') { + return value.toLowerCase() === opts.formatAllRows().toLowerCase() || ['all', 'unlimited'].includes(value.toLowerCase()) ? opts.formatAllRows() : +value; + } + + return value; + }); + this.paginationParts = opts.paginationParts; + + if (typeof this.paginationParts === 'string') { + this.paginationParts = this.paginationParts.replace(/\[|\]| |'/g, '').split(','); + } + + if (opts.sidePagination !== 'server') { + opts.totalRows = data.length; + } + + this.totalPages = 0; + + if (opts.totalRows) { + if (opts.pageSize === opts.formatAllRows()) { + opts.pageSize = opts.totalRows; + allSelected = true; + } + + this.totalPages = ~~((opts.totalRows - 1) / opts.pageSize) + 1; + opts.totalPages = this.totalPages; + } + + if (this.totalPages > 0 && opts.pageNumber > this.totalPages) { + opts.pageNumber = this.totalPages; + } + + this.pageFrom = (opts.pageNumber - 1) * opts.pageSize + 1; + this.pageTo = opts.pageNumber * opts.pageSize; + + if (this.pageTo > opts.totalRows) { + this.pageTo = opts.totalRows; + } + + if (this.options.pagination && this.options.sidePagination !== 'server') { + this.options.totalNotFiltered = this.options.data.length; + } + + if (!this.options.showExtendedPagination) { + this.options.totalNotFiltered = undefined; + } + + if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) { + html.push("
    ")); + } + + if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort')) { + var paginationInfo = this.paginationParts.includes('pageInfoShort') ? opts.formatDetailPagination(opts.totalRows) : opts.formatShowingRows(this.pageFrom, this.pageTo, opts.totalRows, opts.totalNotFiltered); + html.push("\n ".concat(paginationInfo, "\n ")); + } + + if (this.paginationParts.includes('pageSize')) { + html.push('
    '); + var pageNumber = ["
    \n \n ").concat(this.constants.html.pageDropdown[0])]; + pageList.forEach(function (page, i) { + if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows || page === opts.formatAllRows()) { + var active; + + if (allSelected) { + active = page === opts.formatAllRows() ? _this6.constants.classes.dropdownActive : ''; + } else { + active = page === opts.pageSize ? _this6.constants.classes.dropdownActive : ''; + } + + pageNumber.push(Utils.sprintf(_this6.constants.html.pageDropdownItem, active, page)); + } + }); + pageNumber.push("".concat(this.constants.html.pageDropdown[1], "
    ")); + html.push(opts.formatRecordsPerPage(pageNumber.join(''))); + } + + if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) { + html.push('
    '); + } + + if (this.paginationParts.includes('pageList')) { + html.push("
    "), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', opts.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', opts.formatSRPaginationPreText(), opts.paginationPreText)); + + if (this.totalPages < opts.paginationSuccessivelySize) { + from = 1; + to = this.totalPages; + } else { + from = opts.pageNumber - opts.paginationPagesBySide; + to = from + opts.paginationPagesBySide * 2; + } + + if (opts.pageNumber < opts.paginationSuccessivelySize - 1) { + to = opts.paginationSuccessivelySize; + } + + if (opts.paginationSuccessivelySize > this.totalPages - from) { + from = from - (opts.paginationSuccessivelySize - (this.totalPages - from)) + 1; + } + + if (from < 1) { + from = 1; + } + + if (to > this.totalPages) { + to = this.totalPages; + } + + var middleSize = Math.round(opts.paginationPagesBySide / 2); + + var pageItem = function pageItem(i) { + var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + return Utils.sprintf(_this6.constants.html.paginationItem, classes + (i === opts.pageNumber ? " ".concat(_this6.constants.classes.paginationActive) : ''), opts.formatSRPaginationPageText(i), i); }; - if (this.header.sortNames[index]) { - params.sortName = this.header.sortNames[index]; + if (from > 1) { + var max = opts.paginationPagesBySide; + if (max >= from) max = from - 1; + + for (i = 1; i <= max; i++) { + html.push(pageItem(i)); + } + + if (from - 1 === max + 1) { + i = from - 1; + html.push(pageItem(i)); + } else if (from - 1 > max) { + if (from - opts.paginationPagesBySide * 2 > opts.paginationPagesBySide && opts.paginationUseIntermediate) { + i = Math.round((from - middleSize) / 2 + middleSize); + html.push(pageItem(i, ' page-intermediate')); + } else { + html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-first-separator disabled', '', '...')); + } + } } + for (i = from; i <= to; i++) { + html.push(pageItem(i)); + } + + if (this.totalPages > to) { + var min = this.totalPages - (opts.paginationPagesBySide - 1); + if (to >= min) min = to + 1; + + if (to + 1 === min - 1) { + i = to + 1; + html.push(pageItem(i)); + } else if (min > to + 1) { + if (this.totalPages - to > opts.paginationPagesBySide * 2 && opts.paginationUseIntermediate) { + i = Math.round((this.totalPages - middleSize - to) / 2 + to); + html.push(pageItem(i, ' page-intermediate')); + } else { + html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-last-separator disabled', '', '...')); + } + } + + for (i = min; i <= this.totalPages; i++) { + html.push(pageItem(i)); + } + } + + html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-next', opts.formatSRPaginationNextText(), opts.paginationNextText)); + html.push(this.constants.html.pagination[1], '
    '); + } + + this.$pagination.html(html.join('')); + var dropupClass = ['bottom', 'both'].includes(opts.paginationVAlign) ? " ".concat(this.constants.classes.dropup) : ''; + this.$pagination.last().find('.page-list > div').addClass(dropupClass); + + if (!opts.onlyInfoPagination) { + $pageList = this.$pagination.find('.page-list a'); + $pre = this.$pagination.find('.page-pre'); + $next = this.$pagination.find('.page-next'); + $number = this.$pagination.find('.page-item').not('.page-next, .page-pre, .page-last-separator, .page-first-separator'); + + if (this.totalPages <= 1) { + this.$pagination.find('div.pagination').hide(); + } + + if (opts.smartDisplay) { + if (pageList.length < 2 || opts.totalRows <= pageList[0]) { + this.$pagination.find('span.page-list').hide(); + } + } // when data is empty, hide the pagination + + + this.$pagination[this.getData().length ? 'show' : 'hide'](); + + if (!opts.paginationLoop) { + if (opts.pageNumber === 1) { + $pre.addClass('disabled'); + } + + if (opts.pageNumber === this.totalPages) { + $next.addClass('disabled'); + } + } + + if (allSelected) { + opts.pageSize = opts.formatAllRows(); + } // removed the events for last and first, onPageNumber executeds the same logic + + + $pageList.off('click').on('click', function (e) { + return _this6.onPageListChange(e); + }); + $pre.off('click').on('click', function (e) { + return _this6.onPagePre(e); + }); + $next.off('click').on('click', function (e) { + return _this6.onPageNext(e); + }); + $number.off('click').on('click', function (e) { + return _this6.onPageNumber(e); + }); + } + } + }, { + key: "updatePagination", + value: function updatePagination(event) { + // Fix #171: IE disabled button can be clicked bug. + if (event && $__default['default'](event.currentTarget).hasClass('disabled')) { + return; + } + + if (!this.options.maintainMetaData) { + this.resetRows(); + } + + this.initPagination(); + this.trigger('page-change', this.options.pageNumber, this.options.pageSize); + + if (this.options.sidePagination === 'server') { + this.initServer(); + } else { + this.initBody(); + } + } + }, { + key: "onPageListChange", + value: function onPageListChange(event) { + event.preventDefault(); + var $this = $__default['default'](event.currentTarget); + $this.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive); + this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text(); + this.$toolbar.find('.page-size').text(this.options.pageSize); + this.updatePagination(event); + return false; + } + }, { + key: "onPagePre", + value: function onPagePre(event) { + event.preventDefault(); + + if (this.options.pageNumber - 1 === 0) { + this.options.pageNumber = this.options.totalPages; + } else { + this.options.pageNumber--; + } + + this.updatePagination(event); + return false; + } + }, { + key: "onPageNext", + value: function onPageNext(event) { + event.preventDefault(); + + if (this.options.pageNumber + 1 > this.options.totalPages) { + this.options.pageNumber = 1; + } else { + this.options.pageNumber++; + } + + this.updatePagination(event); + return false; + } + }, { + key: "onPageNumber", + value: function onPageNumber(event) { + event.preventDefault(); + + if (this.options.pageNumber === +$__default['default'](event.currentTarget).text()) { + return; + } + + this.options.pageNumber = +$__default['default'](event.currentTarget).text(); + this.updatePagination(event); + return false; + } // eslint-disable-next-line no-unused-vars + + }, { + key: "initRow", + value: function initRow(item, i, data, trFragments) { + var _this7 = this; + + var html = []; + var style = {}; + var csses = []; + var data_ = ''; + var attributes = {}; + var htmlAttributes = []; + + if (Utils.findIndex(this.hiddenRows, item) > -1) { + return; + } + + style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style); + + if (style && style.css) { + for (var _i7 = 0, _Object$entries6 = Object.entries(style.css); _i7 < _Object$entries6.length; _i7++) { + var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i7], 2), + key = _Object$entries6$_i[0], + value = _Object$entries6$_i[1]; + + csses.push("".concat(key, ": ").concat(value)); + } + } + + attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes); + + if (attributes) { + for (var _i8 = 0, _Object$entries7 = Object.entries(attributes); _i8 < _Object$entries7.length; _i8++) { + var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2), + _key2 = _Object$entries7$_i[0], + _value = _Object$entries7$_i[1]; + + htmlAttributes.push("".concat(_key2, "=\"").concat(Utils.escapeHTML(_value), "\"")); + } + } + + if (item._data && !Utils.isEmptyObject(item._data)) { + for (var _i9 = 0, _Object$entries8 = Object.entries(item._data); _i9 < _Object$entries8.length; _i9++) { + var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2), + k = _Object$entries8$_i[0], + v = _Object$entries8$_i[1]; + + // ignore data-index + if (k === 'index') { + return; + } + + data_ += " data-".concat(k, "='").concat(_typeof(v) === 'object' ? JSON.stringify(v) : v, "'"); + } + } + + html.push(''); + + if (this.options.cardView) { + html.push("
    ")); + } + + var detailViewTemplate = ''; + + if (Utils.hasDetailViewIcon(this.options)) { + detailViewTemplate = ''; + + if (Utils.calculateObjectValue(null, this.options.detailFilter, [i, item])) { + detailViewTemplate += "\n \n ".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen), "\n \n "); + } + + detailViewTemplate += ''; + } + + if (detailViewTemplate && this.options.detailViewAlign !== 'right') { + html.push(detailViewTemplate); + } + + this.header.fields.forEach(function (field, j) { + var text = ''; + var value_ = Utils.getItemField(item, field, _this7.options.escape); + var value = ''; + var type = ''; + var cellStyle = {}; + var id_ = ''; + var class_ = _this7.header.classes[j]; + var style_ = ''; + var styleToAdd_ = ''; + var data_ = ''; + var rowspan_ = ''; + var colspan_ = ''; + var title_ = ''; + var column = _this7.columns[j]; + + if ((_this7.fromHtml || _this7.autoMergeCells) && typeof value_ === 'undefined') { + if (!column.checkbox && !column.radio) { + return; + } + } + + if (!column.visible) { + return; + } + + if (_this7.options.cardView && !column.cardVisible) { + return; + } + + if (column.escape) { + value_ = Utils.escapeHTML(value_); + } // Style concat + + + if (csses.concat([_this7.header.styles[j]]).length) { + styleToAdd_ += "".concat(csses.concat([_this7.header.styles[j]]).join('; ')); + } + + if (item["_".concat(field, "_style")]) { + styleToAdd_ += "".concat(item["_".concat(field, "_style")]); + } + + if (styleToAdd_) { + style_ = " style=\"".concat(styleToAdd_, "\""); + } // Style concat + // handle id and class of td + + + if (item["_".concat(field, "_id")]) { + id_ = Utils.sprintf(' id="%s"', item["_".concat(field, "_id")]); + } + + if (item["_".concat(field, "_class")]) { + class_ = Utils.sprintf(' class="%s"', item["_".concat(field, "_class")]); + } + + if (item["_".concat(field, "_rowspan")]) { + rowspan_ = Utils.sprintf(' rowspan="%s"', item["_".concat(field, "_rowspan")]); + } + + if (item["_".concat(field, "_colspan")]) { + colspan_ = Utils.sprintf(' colspan="%s"', item["_".concat(field, "_colspan")]); + } + + if (item["_".concat(field, "_title")]) { + title_ = Utils.sprintf(' title="%s"', item["_".concat(field, "_title")]); + } + + cellStyle = Utils.calculateObjectValue(_this7.header, _this7.header.cellStyles[j], [value_, item, i, field], cellStyle); + + if (cellStyle.classes) { + class_ = " class=\"".concat(cellStyle.classes, "\""); + } + + if (cellStyle.css) { + var csses_ = []; + + for (var _i10 = 0, _Object$entries9 = Object.entries(cellStyle.css); _i10 < _Object$entries9.length; _i10++) { + var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i10], 2), + _key3 = _Object$entries9$_i[0], + _value2 = _Object$entries9$_i[1]; + + csses_.push("".concat(_key3, ": ").concat(_value2)); + } + + style_ = " style=\"".concat(csses_.concat(_this7.header.styles[j]).join('; '), "\""); + } + + value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_); + + if (!(column.checkbox || column.radio)) { + value = typeof value === 'undefined' || value === null ? _this7.options.undefinedText : value; + } + + if (column.searchable && _this7.searchText && _this7.options.searchHighlight) { + var defValue = ''; + var regExp = new RegExp("(".concat(_this7.searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), ")"), 'gim'); + var marker = '$1'; + var isHTML = value && /<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(value); + + if (isHTML) { + // value can contains a HTML tags + var textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent; + var textReplaced = textContent.replace(regExp, marker); + defValue = value.replace(new RegExp("(>\\s*)(".concat(textContent, ")(\\s*)"), 'gm'), "$1".concat(textReplaced, "$3")); + } else { + // but usually not + defValue = value.toString().replace(regExp, marker); + } + + value = Utils.calculateObjectValue(column, column.searchHighlightFormatter, [value, _this7.searchText], defValue); + } + + if (item["_".concat(field, "_data")] && !Utils.isEmptyObject(item["_".concat(field, "_data")])) { + for (var _i11 = 0, _Object$entries10 = Object.entries(item["_".concat(field, "_data")]); _i11 < _Object$entries10.length; _i11++) { + var _Object$entries10$_i = _slicedToArray(_Object$entries10[_i11], 2), + _k = _Object$entries10$_i[0], + _v = _Object$entries10$_i[1]; + + // ignore data-index + if (_k === 'index') { + return; + } + + data_ += " data-".concat(_k, "=\"").concat(_v, "\""); + } + } + + if (column.checkbox || column.radio) { + type = column.checkbox ? 'checkbox' : type; + type = column.radio ? 'radio' : type; + var c = column['class'] || ''; + var isChecked = Utils.isObject(value) && value.hasOwnProperty('checked') ? value.checked : (value === true || value_) && value !== false; + var isDisabled = !column.checkboxEnabled || value && value.disabled; + text = [_this7.options.cardView ? "
    ") : ""), ""), _this7.header.formatters[j] && typeof value === 'string' ? value : '', _this7.options.cardView ? '
    ' : ''].join(''); + item[_this7.header.stateField] = value === true || !!value_ || value && value.checked; + } else if (_this7.options.cardView) { + var cardTitle = _this7.options.showHeader ? "").concat(Utils.getFieldTitle(_this7.columns, field), "") : ''; + text = "
    ".concat(cardTitle, "").concat(value, "
    "); + + if (_this7.options.smartDisplay && value === '') { + text = '
    '; + } + } else { + text = "").concat(value, ""); + } + + html.push(text); + }); + + if (detailViewTemplate && this.options.detailViewAlign === 'right') { + html.push(detailViewTemplate); + } + + if (this.options.cardView) { + html.push('
    '); + } + + html.push(''); + return html.join(''); + } + }, { + key: "initBody", + value: function initBody(fixedScroll) { + var _this8 = this; + + var data = this.getData(); + this.trigger('pre-body', data); + this.$body = this.$el.find('>tbody'); + + if (!this.$body.length) { + this.$body = $__default['default']('').appendTo(this.$el); + } // Fix #389 Bootstrap-table-flatJSON is not working + + + if (!this.options.pagination || this.options.sidePagination === 'server') { + this.pageFrom = 1; + this.pageTo = data.length; + } + + var rows = []; + var trFragments = $__default['default'](document.createDocumentFragment()); + var hasTr = false; + this.autoMergeCells = Utils.checkAutoMergeCells(data.slice(this.pageFrom - 1, this.pageTo)); + + for (var i = this.pageFrom - 1; i < this.pageTo; i++) { + var item = data[i]; + var tr = this.initRow(item, i, data, trFragments); + hasTr = hasTr || !!tr; + + if (tr && typeof tr === 'string') { + if (!this.options.virtualScroll) { + trFragments.append(tr); + } else { + rows.push(tr); + } + } + } // show no records + + + if (!hasTr) { + this.$body.html("".concat(Utils.sprintf('%s', this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options), this.options.formatNoMatches()), "")); + } else if (!this.options.virtualScroll) { + this.$body.html(trFragments); + } else { + if (this.virtualScroll) { + this.virtualScroll.destroy(); + } + + this.virtualScroll = new VirtualScroll({ + rows: rows, + fixedScroll: fixedScroll, + scrollEl: this.$tableBody[0], + contentEl: this.$body[0], + itemHeight: this.options.virtualScrollItemHeight, + callback: function callback() { + _this8.fitHeader(); + + _this8.initBodyEvent(); + } + }); + } + + if (!fixedScroll) { + this.scrollTo(0); + } + + this.initBodyEvent(); + this.updateSelected(); + this.initFooter(); + this.resetView(); + + if (this.options.sidePagination !== 'server') { + this.options.totalRows = data.length; + } + + this.trigger('post-body', data); + } + }, { + key: "initBodyEvent", + value: function initBodyEvent() { + var _this9 = this; + + // click to select by column + this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) { + var $td = $__default['default'](e.currentTarget); + var $tr = $td.parent(); + var $cardViewArr = $__default['default'](e.target).parents('.card-views').children(); + var $cardViewTarget = $__default['default'](e.target).parents('.card-view'); + var rowIndex = $tr.data('index'); + var item = _this9.data[rowIndex]; + var index = _this9.options.cardView ? $cardViewArr.index($cardViewTarget) : $td[0].cellIndex; + + var fields = _this9.getVisibleFields(); + + var field = fields[index - Utils.getDetailViewIndexOffset(_this9.options)]; + var column = _this9.columns[_this9.fieldsColumnsIndex[field]]; + var value = Utils.getItemField(item, field, _this9.options.escape); + + if ($td.find('.detail-icon').length) { + return; + } + + _this9.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td); + + _this9.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field); // if click to select - then trigger the checkbox/radio click + + + if (e.type === 'click' && _this9.options.clickToSelect && column.clickToSelect && !Utils.calculateObjectValue(_this9.options, _this9.options.ignoreClickToSelectOn, [e.target])) { + var $selectItem = $tr.find(Utils.sprintf('[name="%s"]', _this9.options.selectItemName)); + + if ($selectItem.length) { + $selectItem[0].click(); + } + } + + if (e.type === 'click' && _this9.options.detailViewByClick) { + _this9.toggleDetailView(rowIndex, _this9.header.detailFormatters[_this9.fieldsColumnsIndex[field]]); + } + }).off('mousedown').on('mousedown', function (e) { + // https://github.com/jquery/jquery/issues/1741 + _this9.multipleSelectRowCtrlKey = e.ctrlKey || e.metaKey; + _this9.multipleSelectRowShiftKey = e.shiftKey; + }); + this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function (e) { + e.preventDefault(); + + _this9.toggleDetailView($__default['default'](e.currentTarget).parent().parent().data('index')); + + return false; + }); + this.$selectItem = this.$body.find(Utils.sprintf('[name="%s"]', this.options.selectItemName)); + this.$selectItem.off('click').on('click', function (e) { + e.stopImmediatePropagation(); + var $this = $__default['default'](e.currentTarget); + + _this9._toggleCheck($this.prop('checked'), $this.data('index')); + }); + this.header.events.forEach(function (_events, i) { + var events = _events; + + if (!events) { + return; + } // fix bug, if events is defined with namespace + + + if (typeof events === 'string') { + events = Utils.calculateObjectValue(null, events); + } + + var field = _this9.header.fields[i]; + + var fieldIndex = _this9.getVisibleFields().indexOf(field); + + if (fieldIndex === -1) { + return; + } + + fieldIndex += Utils.getDetailViewIndexOffset(_this9.options); + + var _loop2 = function _loop2(key) { + if (!events.hasOwnProperty(key)) { + return "continue"; + } + + var event = events[key]; + + _this9.$body.find('>tr:not(.no-records-found)').each(function (i, tr) { + var $tr = $__default['default'](tr); + var $td = $tr.find(_this9.options.cardView ? '.card-views>.card-view' : '>td').eq(fieldIndex); + var index = key.indexOf(' '); + var name = key.substring(0, index); + var el = key.substring(index + 1); + $td.find(el).off(name).on(name, function (e) { + var index = $tr.data('index'); + var row = _this9.data[index]; + var value = row[field]; + event.apply(_this9, [e, value, row, index]); + }); + }); + }; + + for (var key in events) { + var _ret2 = _loop2(key); + + if (_ret2 === "continue") continue; + } + }); + } + }, { + key: "initServer", + value: function initServer(silent, query, url) { + var _this10 = this; + + var data = {}; + var index = this.header.fields.indexOf(this.options.sortName); + var params = { + searchText: this.searchText, + sortName: this.options.sortName, + sortOrder: this.options.sortOrder + }; + + if (this.header.sortNames[index]) { + params.sortName = this.header.sortNames[index]; + } + + if (this.options.pagination && this.options.sidePagination === 'server') { + params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; + params.pageNumber = this.options.pageNumber; + } + + if (!(url || this.options.url) && !this.options.ajax) { + return; + } + + if (this.options.queryParamsType === 'limit') { + params = { + search: params.searchText, + sort: params.sortName, + order: params.sortOrder + }; + if (this.options.pagination && this.options.sidePagination === 'server') { - params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; - params.pageNumber = this.options.pageNumber; + params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1); + params.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; + + if (params.limit === 0) { + delete params.limit; + } } + } - if (!(url || this.options.url) && !this.options.ajax) { - return; - } + if (this.options.search && this.options.sidePagination === 'server' && this.columns.filter(function (column) { + return !column.searchable; + }).length) { + params.searchable = []; - if (this.options.queryParamsType === 'limit') { - params = { - search: params.searchText, - sort: params.sortName, - order: params.sortOrder - }; + var _iterator2 = _createForOfIteratorHelper(this.columns), + _step2; - if (this.options.pagination && this.options.sidePagination === 'server') { - params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1); - params.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; - if (params.limit === 0) { - delete params.limit; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var column = _step2.value; + + if (!column.checkbox && column.searchable && (this.options.visibleSearch && column.visible || !this.options.visibleSearch)) { + params.searchable.push(column.field); } } - } - - if (!Utils.isEmptyObject(this.filterColumnsPartial)) { - params.filter = JSON.stringify(this.filterColumnsPartial, null); - } - - data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data); - - $.extend(data, query || {}); - - // false to stop request - if (data === false) { - return; - } - - if (!silent) { - this.showLoading(); - } - var request = $.extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), { - type: this.options.method, - url: url || this.options.url, - data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data, - cache: this.options.cache, - contentType: this.options.contentType, - dataType: this.options.dataType, - success: function success(_res) { - var res = Utils.calculateObjectValue(_this9.options, _this9.options.responseHandler, [_res], _res); - - _this9.load(res); - _this9.trigger('load-success', res); - if (!silent) { - _this9.hideLoading(); - } - }, - error: function error(jqXHR) { - var data = []; - if (_this9.options.sidePagination === 'server') { - data = {}; - data[_this9.options.totalField] = 0; - data[_this9.options.dataField] = []; - } - _this9.load(data); - _this9.trigger('load-error', jqXHR.status, jqXHR); - if (!silent) _this9.$tableLoading.hide(); - } - }); - - if (this.options.ajax) { - Utils.calculateObjectValue(this, this.options.ajax, [request], null); - } else { - if (this._xhr && this._xhr.readyState !== 4) { - this._xhr.abort(); - } - this._xhr = $.ajax(request); - } - - return data; - } - }, { - key: 'initSearchText', - value: function initSearchText() { - if (this.options.search) { - this.searchText = ''; - if (this.options.searchText !== '') { - var $search = this.$toolbar.find('.search input'); - $search.val(this.options.searchText); - this.onSearch({ currentTarget: $search, firedByInitSearchText: true }); - } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); } } - }, { - key: 'getCaret', - value: function getCaret() { - var _this10 = this; - this.$header.find('th').each(function (i, th) { - $(th).find('.sortable').removeClass('desc asc').addClass($(th).data('field') === _this10.options.sortName ? _this10.options.sortOrder : 'both'); - }); + if (!Utils.isEmptyObject(this.filterColumnsPartial)) { + params.filter = JSON.stringify(this.filterColumnsPartial, null); } - }, { - key: 'updateSelected', - value: function updateSelected() { - var checkAll = this.$selectItem.filter(':enabled').length && this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length; - this.$selectAll.add(this.$selectAll_).prop('checked', checkAll); + $__default['default'].extend(params, query || {}); + data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data); // false to stop request - this.$selectItem.each(function (i, el) { - $(el).closest('tr')[$(el).prop('checked') ? 'addClass' : 'removeClass']('selected'); - }); + if (data === false) { + return; } - }, { - key: 'updateRows', - value: function updateRows() { - var _this11 = this; - this.$selectItem.each(function (i, el) { - _this11.data[$(el).data('index')][_this11.header.stateField] = $(el).prop('checked'); - }); + if (!silent) { + this.showLoading(); } - }, { - key: 'resetRows', - value: function resetRows() { - for (var _iterator16 = this.data, _isArray16 = Array.isArray(_iterator16), _i18 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) { - var _ref36; - if (_isArray16) { - if (_i18 >= _iterator16.length) break; - _ref36 = _iterator16[_i18++]; - } else { - _i18 = _iterator16.next(); - if (_i18.done) break; - _ref36 = _i18.value; + var request = $__default['default'].extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), { + type: this.options.method, + url: url || this.options.url, + data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data, + cache: this.options.cache, + contentType: this.options.contentType, + dataType: this.options.dataType, + success: function success(_res, textStatus, jqXHR) { + var res = Utils.calculateObjectValue(_this10.options, _this10.options.responseHandler, [_res, jqXHR], _res); + + _this10.load(res); + + _this10.trigger('load-success', res, jqXHR && jqXHR.status, jqXHR); + + if (!silent) { + _this10.hideLoading(); } - var row = _ref36; + if (_this10.options.sidePagination === 'server' && res[_this10.options.totalField] > 0 && !res[_this10.options.dataField].length) { + _this10.updatePagination(); + } + }, + error: function error(jqXHR) { + var data = []; + if (_this10.options.sidePagination === 'server') { + data = {}; + data[_this10.options.totalField] = 0; + data[_this10.options.dataField] = []; + } + + _this10.load(data); + + _this10.trigger('load-error', jqXHR && jqXHR.status, jqXHR); + + if (!silent) _this10.$tableLoading.hide(); + } + }); + + if (this.options.ajax) { + Utils.calculateObjectValue(this, this.options.ajax, [request], null); + } else { + if (this._xhr && this._xhr.readyState !== 4) { + this._xhr.abort(); + } + + this._xhr = $__default['default'].ajax(request); + } + + return data; + } + }, { + key: "initSearchText", + value: function initSearchText() { + if (this.options.search) { + this.searchText = ''; + + if (this.options.searchText !== '') { + var $search = Utils.getSearchInput(this); + $search.val(this.options.searchText); + this.onSearch({ + currentTarget: $search, + firedByInitSearchText: true + }); + } + } + } + }, { + key: "getCaret", + value: function getCaret() { + var _this11 = this; + + this.$header.find('th').each(function (i, th) { + $__default['default'](th).find('.sortable').removeClass('desc asc').addClass($__default['default'](th).data('field') === _this11.options.sortName ? _this11.options.sortOrder : 'both'); + }); + } + }, { + key: "updateSelected", + value: function updateSelected() { + var checkAll = this.$selectItem.filter(':enabled').length && this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length; + this.$selectAll.add(this.$selectAll_).prop('checked', checkAll); + this.$selectItem.each(function (i, el) { + $__default['default'](el).closest('tr')[$__default['default'](el).prop('checked') ? 'addClass' : 'removeClass']('selected'); + }); + } + }, { + key: "updateRows", + value: function updateRows() { + var _this12 = this; + + this.$selectItem.each(function (i, el) { + _this12.data[$__default['default'](el).data('index')][_this12.header.stateField] = $__default['default'](el).prop('checked'); + }); + } + }, { + key: "resetRows", + value: function resetRows() { + var _iterator3 = _createForOfIteratorHelper(this.data), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var row = _step3.value; this.$selectAll.prop('checked', false); this.$selectItem.prop('checked', false); + if (this.header.stateField) { row[this.header.stateField] = false; } } - this.initHiddenRows(); + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); } - }, { - key: 'trigger', - value: function trigger(_name) { - var _options; - var name = _name + '.bs.table'; + this.initHiddenRows(); + } + }, { + key: "trigger", + value: function trigger(_name) { + var _this$options, _this$options2; - for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key4 = 1; _key4 < _len2; _key4++) { - args[_key4 - 1] = arguments[_key4]; - } + var name = "".concat(_name, ".bs.table"); - (_options = this.options)[BootstrapTable.EVENTS[name]].apply(_options, args); - this.$el.trigger($.Event(name), args); - - this.options.onAll(name, args); - this.$el.trigger($.Event('all.bs.table'), [name, args]); + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key4 = 1; _key4 < _len; _key4++) { + args[_key4 - 1] = arguments[_key4]; } - }, { - key: 'resetHeader', - value: function resetHeader() { - var _this12 = this; - // fix #61: the hidden table reset header bug. - // fix bug: get $el.css('width') error sometime (height = 500) - clearTimeout(this.timeoutId_); + (_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, [].concat(args, [this])); + + this.$el.trigger($__default['default'].Event(name, { + sender: this + }), args); + + (_this$options2 = this.options).onAll.apply(_this$options2, [name].concat([].concat(args, [this]))); + + this.$el.trigger($__default['default'].Event('all.bs.table', { + sender: this + }), [name, args]); + } + }, { + key: "resetHeader", + value: function resetHeader() { + var _this13 = this; + + // fix #61: the hidden table reset header bug. + // fix bug: get $el.css('width') error sometime (height = 500) + clearTimeout(this.timeoutId_); + this.timeoutId_ = setTimeout(function () { + return _this13.fitHeader(); + }, this.$el.is(':hidden') ? 100 : 0); + } + }, { + key: "fitHeader", + value: function fitHeader() { + var _this14 = this; + + if (this.$el.is(':hidden')) { this.timeoutId_ = setTimeout(function () { - return _this12.fitHeader(); - }, this.$el.is(':hidden') ? 100 : 0); + return _this14.fitHeader(); + }, 100); + return; } - }, { - key: 'fitHeader', - value: function fitHeader() { - var _this13 = this; - if (this.$el.is(':hidden')) { - this.timeoutId_ = setTimeout(function () { - return _this13.fitHeader(); - }, 100); - return; - } + var fixedBody = this.$tableBody.get(0); + var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; + this.$el.css('margin-top', -this.$header.outerHeight()); + var focused = $__default['default'](':focus'); - var fixedBody = this.$tableBody.get(0); - var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; + if (focused.length > 0) { + var $th = focused.parents('th'); - this.$el.css('margin-top', -this.$header.outerHeight()); + if ($th.length > 0) { + var dataField = $th.attr('data-field'); - var focused = $(':focus'); - if (focused.length > 0) { - var $th = focused.parents('th'); - if ($th.length > 0) { - var dataField = $th.attr('data-field'); - if (dataField !== undefined) { - var $headerTh = this.$header.find('[data-field=\'' + dataField + '\']'); - if ($headerTh.length > 0) { - $headerTh.find(':input').addClass('focus-temp'); - } + if (dataField !== undefined) { + var $headerTh = this.$header.find("[data-field='".concat(dataField, "']")); + + if ($headerTh.length > 0) { + $headerTh.find(':input').addClass('focus-temp'); } } } + } - this.$header_ = this.$header.clone(true, true); - this.$selectAll_ = this.$header_.find('[name="btSelectAll"]'); - this.$tableHeader.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).html('').attr('class', this.$el.attr('class')).append(this.$header_); + this.$header_ = this.$header.clone(true, true); + this.$selectAll_ = this.$header_.find('[name="btSelectAll"]'); + this.$tableHeader.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).html('').attr('class', this.$el.attr('class')).append(this.$header_); + this.$tableLoading.css('width', this.$el.outerWidth()); + var focusedTemp = $__default['default']('.focus-temp:visible:eq(0)'); - this.$tableLoading.css('width', this.$el.outerWidth()); + if (focusedTemp.length > 0) { + focusedTemp.focus(); + this.$header.find('.focus-temp').removeClass('focus-temp'); + } // fix bug: $.data() is not working as expected after $.append() - var focusedTemp = $('.focus-temp:visible:eq(0)'); - if (focusedTemp.length > 0) { - focusedTemp.focus(); - this.$header.find('.focus-temp').removeClass('focus-temp'); - } - // fix bug: $.data() is not working as expected after $.append() - this.$header.find('th[data-field]').each(function (i, el) { - _this13.$header_.find(Utils.sprintf('th[data-field="%s"]', $(el).data('field'))).data($(el).data()); - }); + this.$header.find('th[data-field]').each(function (i, el) { + _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', $__default['default'](el).data('field'))).data($__default['default'](el).data()); + }); + var visibleFields = this.getVisibleFields(); + var $ths = this.$header_.find('th'); + var $tr = this.$body.find('>tr:not(.no-records-found,.virtual-scroll-top)').eq(0); - var visibleFields = this.getVisibleFields(); - var $ths = this.$header_.find('th'); - var $tr = this.$body.find('>tr:first-child:not(.no-records-found)'); + while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { + $tr = $tr.next(); + } - while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { - $tr = $tr.next(); - } + var trLength = $tr.find('> *').length; + $tr.find('> *').each(function (i, el) { + var $this = $__default['default'](el); - $tr.find('> *').each(function (i, el) { - var $this = $(el); - var index = i; + if (Utils.hasDetailViewIcon(_this14.options)) { + if (i === 0 && _this14.options.detailViewAlign !== 'right' || i === trLength - 1 && _this14.options.detailViewAlign === 'right') { + var $thDetail = $ths.filter('.detail'); - if (_this13.options.detailView && !_this13.options.cardView) { - if (i === 0) { - var $thDetail = $ths.filter('.detail'); - var _zoomWidth = $thDetail.width() - $thDetail.find('.fht-cell').width(); - $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth); - } - index = i - 1; - } + var _zoomWidth = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width(); - if (index === -1) { + $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth); return; } + } - var $th = _this13.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index])); - if ($th.length > 1) { - $th = $($ths[$this[0].cellIndex]); - } + var index = i - Utils.getDetailViewIndexOffset(_this14.options); - var zoomWidth = $th.width() - $th.find('.fht-cell').width(); - $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); - }); + var $th = _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index])); - this.horizontalScroll(); - this.trigger('post-header'); + if ($th.length > 1) { + $th = $__default['default']($ths[$this[0].cellIndex]); + } + + var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width(); + $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); + }); + this.horizontalScroll(); + this.trigger('post-header'); + } + }, { + key: "initFooter", + value: function initFooter() { + if (!this.options.showFooter || this.options.cardView) { + // do nothing + return; } - }, { - key: 'resetFooter', - value: function resetFooter() { - var data = this.getData(); - var html = []; - if (!this.options.showFooter || this.options.cardView) { - // do nothing - return; - } + var data = this.getData(); + var html = []; + var detailTemplate = ''; - if (!this.options.cardView && this.options.detailView) { - html.push('
    '); - } + if (Utils.hasDetailViewIcon(this.options)) { + detailTemplate = '
    '; + } - for (var _iterator17 = this.columns, _isArray17 = Array.isArray(_iterator17), _i19 = 0, _iterator17 = _isArray17 ? _iterator17 : _iterator17[Symbol.iterator]();;) { - var _ref37; + if (detailTemplate && this.options.detailViewAlign !== 'right') { + html.push(detailTemplate); + } - if (_isArray17) { - if (_i19 >= _iterator17.length) break; - _ref37 = _iterator17[_i19++]; - } else { - _i19 = _iterator17.next(); - if (_i19.done) break; - _ref37 = _i19.value; - } - - var column = _ref37; + var _iterator4 = _createForOfIteratorHelper(this.columns), + _step4; + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var column = _step4.value; var falign = ''; - var valign = ''; var csses = []; var style = {}; var class_ = Utils.sprintf(' class="%s"', column['class']); - if (!column.visible) { + if (!column.visible || this.footerData && this.footerData.length > 0 && !(column.field in this.footerData[0])) { continue; } @@ -2656,1112 +6117,1293 @@ falign = Utils.sprintf('text-align: %s; ', column.falign ? column.falign : column.align); valign = Utils.sprintf('vertical-align: %s; ', column.valign); - style = Utils.calculateObjectValue(null, this.options.footerStyle, [column]); if (style && style.css) { - for (var _iterator18 = function (target) { - return Object.keys(target).map(function (key) { - return [key, target[key]]; - }); - }(style.css), _isArray18 = Array.isArray(_iterator18), _i20 = 0, _iterator18 = _isArray18 ? _iterator18 : _iterator18[Symbol.iterator]();;) { - var _ref38; + for (var _i12 = 0, _Object$entries11 = Object.entries(style.css); _i12 < _Object$entries11.length; _i12++) { + var _Object$entries11$_i = _slicedToArray(_Object$entries11[_i12], 2), + key = _Object$entries11$_i[0], + _value3 = _Object$entries11$_i[1]; - if (_isArray18) { - if (_i20 >= _iterator18.length) break; - _ref38 = _iterator18[_i20++]; - } else { - _i20 = _iterator18.next(); - if (_i20.done) break; - _ref38 = _i20.value; - } - - var _ref39 = _ref38, - _ref40 = _slicedToArray(_ref39, 2), - _key5 = _ref40[0], - value = _ref40[1]; - - csses.push(_key5 + ': ' + value); + csses.push("".concat(key, ": ").concat(_value3)); } } + if (style && style.classes) { class_ = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], style.classes].join(' ') : style.classes); } - html.push(''); + html.push(' 0) { + colspan = this.footerData[0]["_".concat(column.field, "_colspan")] || 0; + } + + if (colspan) { + html.push(" colspan=\"".concat(colspan, "\" ")); + } + + html.push('>'); html.push('
    '); + var value = ''; - html.push(Utils.calculateObjectValue(column, column.footerFormatter, [data], '')); + if (this.footerData && this.footerData.length > 0) { + value = this.footerData[0][column.field] || ''; + } + html.push(Utils.calculateObjectValue(column, column.footerFormatter, [data, value], value)); html.push('
    '); html.push('
    '); html.push('
    '); html.push(''); } - - this.$tableFooter.find('tr').html(html.join('')); - this.$tableFooter.show(); - this.fitFooter(); + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); } - }, { - key: 'fitFooter', - value: function fitFooter() { - var _this14 = this; - if (this.$el.is(':hidden')) { - setTimeout(function () { - return _this14.fitFooter(); - }, 100); - return; - } + if (detailTemplate && this.options.detailViewAlign === 'right') { + html.push(detailTemplate); + } - var fixedBody = this.$tableBody.get(0); - var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; + if (!this.options.height && !this.$tableFooter.length) { + this.$el.append(''); + this.$tableFooter = this.$el.find('tfoot'); + } - this.$tableFooter.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).attr('class', this.$el.attr('class')); + if (!this.$tableFooter.find('tr').length) { + this.$tableFooter.html('
    '); + } - var visibleFields = this.getVisibleFields(); - var $ths = this.$tableFooter.find('th'); - var $tr = this.$body.find('>tr:first-child:not(.no-records-found)'); + this.$tableFooter.find('tr').html(html.join('')); + this.trigger('post-footer', this.$tableFooter); + } + }, { + key: "fitFooter", + value: function fitFooter() { + var _this15 = this; - while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { - $tr = $tr.next(); - } + if (this.$el.is(':hidden')) { + setTimeout(function () { + return _this15.fitFooter(); + }, 100); + return; + } - $tr.find('> *').each(function (i, el) { - var $this = $(el); - var index = i; + var fixedBody = this.$tableBody.get(0); + var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; + this.$tableFooter.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).attr('class', this.$el.attr('class')); + var $ths = this.$tableFooter.find('th'); + var $tr = this.$body.find('>tr:first-child:not(.no-records-found)'); + $ths.find('.fht-cell').width('auto'); - if (_this14.options.detailView && !_this14.options.cardView) { - if (i === 0) { - var $thDetail = $ths.filter('.detail'); - var _zoomWidth2 = $thDetail.width() - $thDetail.find('.fht-cell').width(); - $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth2); - } - index = i - 1; - } + while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { + $tr = $tr.next(); + } - if (index === -1) { + var trLength = $tr.find('> *').length; + $tr.find('> *').each(function (i, el) { + var $this = $__default['default'](el); + + if (Utils.hasDetailViewIcon(_this15.options)) { + if (i === 0 && _this15.options.detailViewAlign === 'left' || i === trLength - 1 && _this15.options.detailViewAlign === 'right') { + var $thDetail = $ths.filter('.detail'); + + var _zoomWidth2 = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width(); + + $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth2); return; } - - var $th = $ths.eq(i); - var zoomWidth = $th.width() - $th.find('.fht-cell').width(); - $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); - }); - - this.horizontalScroll(); - } - }, { - key: 'horizontalScroll', - value: function horizontalScroll() { - var _this15 = this; - - // horizontal scroll event - // TODO: it's probably better improving the layout than binding to scroll event - - this.trigger('scroll-body'); - this.$tableBody.off('scroll').on('scroll', function (_ref41) { - var currentTarget = _ref41.currentTarget; - - if (_this15.options.showHeader && _this15.options.height) { - _this15.$tableHeader.scrollLeft($(currentTarget).scrollLeft()); - } - - if (_this15.options.showFooter && !_this15.options.cardView) { - _this15.$tableFooter.scrollLeft($(currentTarget).scrollLeft()); - } - }); - } - }, { - key: 'toggleColumn', - value: function toggleColumn(index, checked, needUpdate) { - if (index === -1) { - return; } - this.columns[index].visible = checked; - this.initHeader(); - this.initSearch(); - this.initPagination(); - this.initBody(); - if (this.options.showColumns) { - var $items = this.$toolbar.find('.keep-open input').prop('disabled', false); + var $th = $ths.eq(i); + var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width(); + $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); + }); + this.horizontalScroll(); + } + }, { + key: "horizontalScroll", + value: function horizontalScroll() { + var _this16 = this; - if (needUpdate) { - $items.filter(Utils.sprintf('[value="%s"]', index)).prop('checked', checked); - } + // horizontal scroll event + // TODO: it's probably better improving the layout than binding to scroll event + this.$tableBody.off('scroll').on('scroll', function () { + var scrollLeft = _this16.$tableBody.scrollLeft(); - if ($items.filter(':checked').length <= this.options.minimumCountColumns) { - $items.filter(':checked').prop('disabled', true); - } + if (_this16.options.showHeader && _this16.options.height) { + _this16.$tableHeader.scrollLeft(scrollLeft); } - } - }, { - key: 'getVisibleFields', - value: function getVisibleFields() { - var visibleFields = []; - for (var _iterator19 = this.header.fields, _isArray19 = Array.isArray(_iterator19), _i21 = 0, _iterator19 = _isArray19 ? _iterator19 : _iterator19[Symbol.iterator]();;) { - var _ref42; + if (_this16.options.showFooter && !_this16.options.cardView) { + _this16.$tableFooter.scrollLeft(scrollLeft); + } - if (_isArray19) { - if (_i21 >= _iterator19.length) break; - _ref42 = _iterator19[_i21++]; - } else { - _i21 = _iterator19.next(); - if (_i21.done) break; - _ref42 = _i21.value; - } + _this16.trigger('scroll-body', _this16.$tableBody); + }); + } + }, { + key: "getVisibleFields", + value: function getVisibleFields() { + var visibleFields = []; - var field = _ref42; + var _iterator5 = _createForOfIteratorHelper(this.header.fields), + _step5; + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var field = _step5.value; var column = this.columns[this.fieldsColumnsIndex[field]]; - if (!column.visible) { + if (!column || !column.visible) { continue; } + visibleFields.push(field); } - return visibleFields; + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); } - }, { - key: 'resetView', - value: function resetView(params) { - var padding = 0; - if (params && params.height) { - this.options.height = params.height; + return visibleFields; + } + }, { + key: "initHiddenRows", + value: function initHiddenRows() { + this.hiddenRows = []; + } // PUBLIC FUNCTION DEFINITION + // ======================= + + }, { + key: "getOptions", + value: function getOptions() { + // deep copy and remove data + var options = $__default['default'].extend({}, this.options); + delete options.data; + return $__default['default'].extend(true, {}, options); + } + }, { + key: "refreshOptions", + value: function refreshOptions(options) { + // If the objects are equivalent then avoid the call of destroy / init methods + if (Utils.compareObjects(this.options, options, true)) { + return; + } + + this.options = $__default['default'].extend(this.options, options); + this.trigger('refresh-options', this.options); + this.destroy(); + this.init(); + } + }, { + key: "getData", + value: function getData(params) { + var _this17 = this; + + var data = this.options.data; + + if ((this.searchText || this.options.customSearch || this.options.sortName !== undefined || this.enableCustomSort || // Fix #4616: this.enableCustomSort is for extensions + !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) { + data = this.data; + } + + if (params && params.useCurrentPage) { + data = data.slice(this.pageFrom - 1, this.pageTo); + } + + if (params && !params.includeHiddenRows) { + var hiddenRows = this.getHiddenRows(); + data = data.filter(function (row) { + return Utils.findIndex(hiddenRows, row) === -1; + }); + } + + if (params && params.formatted) { + data.forEach(function (row) { + for (var _i13 = 0, _Object$entries12 = Object.entries(row); _i13 < _Object$entries12.length; _i13++) { + var _Object$entries12$_i = _slicedToArray(_Object$entries12[_i13], 2), + key = _Object$entries12$_i[0], + value = _Object$entries12$_i[1]; + + var column = _this17.columns[_this17.fieldsColumnsIndex[key]]; + + if (!column) { + return; + } + + row[key] = Utils.calculateObjectValue(column, _this17.header.formatters[column.fieldIndex], [value, row, row.index, column.field], value); + } + }); + } + + return data; + } + }, { + key: "getSelections", + value: function getSelections() { + var _this18 = this; + + return (this.options.maintainMetaData ? this.options.data : this.data).filter(function (row) { + return row[_this18.header.stateField] === true; + }); + } + }, { + key: "load", + value: function load(_data) { + var fixedScroll = false; + var data = _data; // #431: support pagination + + if (this.options.pagination && this.options.sidePagination === 'server') { + this.options.totalRows = data[this.options.totalField]; + this.options.totalNotFiltered = data[this.options.totalNotFilteredField]; + this.footerData = data[this.options.footerField] ? [data[this.options.footerField]] : undefined; + } + + fixedScroll = data.fixedScroll; + data = Array.isArray(data) ? data : data[this.options.dataField]; + this.initData(data); + this.initSearch(); + this.initPagination(); + this.initBody(fixedScroll); + } + }, { + key: "append", + value: function append(data) { + this.initData(data, 'append'); + this.initSearch(); + this.initPagination(); + this.initSort(); + this.initBody(true); + } + }, { + key: "prepend", + value: function prepend(data) { + this.initData(data, 'prepend'); + this.initSearch(); + this.initPagination(); + this.initSort(); + this.initBody(true); + } + }, { + key: "remove", + value: function remove(params) { + var removed = 0; + + for (var i = this.options.data.length - 1; i >= 0; i--) { + var row = this.options.data[i]; + + if (!row.hasOwnProperty(params.field) && params.field !== '$index') { + continue; } - this.$selectAll.prop('checked', this.$selectItem.length > 0 && this.$selectItem.length === this.$selectItem.filter(':checked').length); - - if (this.options.cardView) { - // remove the element css - this.$el.css('margin-top', '0'); - this.$tableContainer.css('padding-bottom', '0'); - this.$tableFooter.hide(); - return; + if (!row.hasOwnProperty(params.field) && params.field === '$index' && params.values.includes(i) || params.values.includes(row[params.field])) { + removed++; + this.options.data.splice(i, 1); } + } - if (this.options.showHeader && this.options.height) { - this.$tableHeader.show(); - this.resetHeader(); - padding += this.$header.outerHeight(true); + if (!removed) { + return; + } + + if (this.options.sidePagination === 'server') { + this.options.totalRows -= removed; + this.data = _toConsumableArray(this.options.data); + } + + this.initSearch(); + this.initPagination(); + this.initSort(); + this.initBody(true); + } + }, { + key: "removeAll", + value: function removeAll() { + if (this.options.data.length > 0) { + this.options.data.splice(0, this.options.data.length); + this.initSearch(); + this.initPagination(); + this.initBody(true); + } + } + }, { + key: "insertRow", + value: function insertRow(params) { + if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) { + return; + } + + this.options.data.splice(params.index, 0, params.row); + this.initSearch(); + this.initPagination(); + this.initSort(); + this.initBody(true); + } + }, { + key: "updateRow", + value: function updateRow(params) { + var allParams = Array.isArray(params) ? params : [params]; + + var _iterator6 = _createForOfIteratorHelper(allParams), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var _params = _step6.value; + + if (!_params.hasOwnProperty('index') || !_params.hasOwnProperty('row')) { + continue; + } + + if (_params.hasOwnProperty('replace') && _params.replace) { + this.options.data[_params.index] = _params.row; + } else { + $__default['default'].extend(this.options.data[_params.index], _params.row); + } + } + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + + this.initSearch(); + this.initPagination(); + this.initSort(); + this.initBody(true); + } + }, { + key: "getRowByUniqueId", + value: function getRowByUniqueId(_id) { + var uniqueId = this.options.uniqueId; + var len = this.options.data.length; + var id = _id; + var dataRow = null; + var i; + var row; + var rowUniqueId; + + for (i = len - 1; i >= 0; i--) { + row = this.options.data[i]; + + if (row.hasOwnProperty(uniqueId)) { + // uniqueId is a column + rowUniqueId = row[uniqueId]; + } else if (row._data && row._data.hasOwnProperty(uniqueId)) { + // uniqueId is a row data property + rowUniqueId = row._data[uniqueId]; } else { - this.$tableHeader.hide(); - this.trigger('post-header'); + continue; } - if (this.options.showFooter) { - this.resetFooter(); - if (this.options.height) { - padding += this.$tableFooter.outerHeight(true); + if (typeof rowUniqueId === 'string') { + id = id.toString(); + } else if (typeof rowUniqueId === 'number') { + if (Number(rowUniqueId) === rowUniqueId && rowUniqueId % 1 === 0) { + id = parseInt(id); + } else if (rowUniqueId === Number(rowUniqueId) && rowUniqueId !== 0) { + id = parseFloat(id); } } - if (this.options.height) { - var toolbarHeight = this.$toolbar.outerHeight(true); - var paginationHeight = this.$pagination.outerHeight(true); - var height = this.options.height - toolbarHeight - paginationHeight; - var tableHeight = this.$tableBody.find('table').outerHeight(true); - this.$tableContainer.css('height', height + 'px'); - this.$tableBorder && this.$tableBorder.css('height', height - tableHeight - padding - 1 + 'px'); - } - - // Assign the correct sortable arrow - this.getCaret(); - this.$tableContainer.css('padding-bottom', padding + 'px'); - this.trigger('reset-view'); - } - }, { - key: 'getData', - value: function getData(useCurrentPage) { - var data = this.options.data; - if (this.searchText || this.options.sortName || !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) { - data = this.data; - } - - if (useCurrentPage) { - return data.slice(this.pageFrom - 1, this.pageTo); - } - - return data; - } - }, { - key: 'load', - value: function load(_data) { - var fixedScroll = false; - var data = _data; - - // #431: support pagination - if (this.options.pagination && this.options.sidePagination === 'server') { - this.options.totalRows = data[this.options.totalField]; - } - - fixedScroll = data.fixedScroll; - data = Array.isArray(data) ? data : data[this.options.dataField]; - - this.initData(data); - this.initSearch(); - this.initPagination(); - this.initBody(fixedScroll); - } - }, { - key: 'append', - value: function append(data) { - this.initData(data, 'append'); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: 'prepend', - value: function prepend(data) { - this.initData(data, 'prepend'); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: 'remove', - value: function remove(params) { - var len = this.options.data.length; - var i = void 0; - var row = void 0; - - if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) { - return; - } - - for (i = len - 1; i >= 0; i--) { - row = this.options.data[i]; - - if (!row.hasOwnProperty(params.field)) { - continue; - } - if (params.values.indexOf(row[params.field]) !== -1) { - this.options.data.splice(i, 1); - if (this.options.sidePagination === 'server') { - this.options.totalRows -= 1; - } - } - } - - if (len === this.options.data.length) { - return; - } - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: 'removeAll', - value: function removeAll() { - if (this.options.data.length > 0) { - this.options.data.splice(0, this.options.data.length); - this.initSearch(); - this.initPagination(); - this.initBody(true); + if (rowUniqueId === id) { + dataRow = row; + break; } } - }, { - key: 'getRowByUniqueId', - value: function getRowByUniqueId(_id) { - var uniqueId = this.options.uniqueId; - var len = this.options.data.length; - var id = _id; - var dataRow = null; - var i = void 0; - var row = void 0; - var rowUniqueId = void 0; - for (i = len - 1; i >= 0; i--) { - row = this.options.data[i]; + return dataRow; + } + }, { + key: "updateByUniqueId", + value: function updateByUniqueId(params) { + var allParams = Array.isArray(params) ? params : [params]; - if (row.hasOwnProperty(uniqueId)) { - // uniqueId is a column - rowUniqueId = row[uniqueId]; - } else if (row._data && row._data.hasOwnProperty(uniqueId)) { - // uniqueId is a row data property - rowUniqueId = row._data[uniqueId]; - } else { + var _iterator7 = _createForOfIteratorHelper(allParams), + _step7; + + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var _params2 = _step7.value; + + if (!_params2.hasOwnProperty('id') || !_params2.hasOwnProperty('row')) { continue; } - if (typeof rowUniqueId === 'string') { - id = id.toString(); - } else if (typeof rowUniqueId === 'number') { - if (Number(rowUniqueId) === rowUniqueId && rowUniqueId % 1 === 0) { - id = parseInt(id); - } else if (rowUniqueId === Number(rowUniqueId) && rowUniqueId !== 0) { - id = parseFloat(id); - } - } - - if (rowUniqueId === id) { - dataRow = row; - break; - } - } - - return dataRow; - } - }, { - key: 'removeByUniqueId', - value: function removeByUniqueId(id) { - var len = this.options.data.length; - var row = this.getRowByUniqueId(id); - - if (row) { - this.options.data.splice(this.options.data.indexOf(row), 1); - } - - if (len === this.options.data.length) { - return; - } - - this.initSearch(); - this.initPagination(); - this.initBody(true); - } - }, { - key: 'updateByUniqueId', - value: function updateByUniqueId(params) { - var allParams = Array.isArray(params) ? params : [params]; - - for (var _iterator20 = allParams, _isArray20 = Array.isArray(_iterator20), _i22 = 0, _iterator20 = _isArray20 ? _iterator20 : _iterator20[Symbol.iterator]();;) { - var _ref43; - - if (_isArray20) { - if (_i22 >= _iterator20.length) break; - _ref43 = _iterator20[_i22++]; - } else { - _i22 = _iterator20.next(); - if (_i22.done) break; - _ref43 = _i22.value; - } - - var _params = _ref43; - - if (!_params.hasOwnProperty('id') || !_params.hasOwnProperty('row')) { - continue; - } - - var rowId = this.options.data.indexOf(this.getRowByUniqueId(_params.id)); + var rowId = this.options.data.indexOf(this.getRowByUniqueId(_params2.id)); if (rowId === -1) { continue; } - $.extend(this.options.data[rowId], _params.row); - } - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); + if (_params2.hasOwnProperty('replace') && _params2.replace) { + this.options.data[rowId] = _params2.row; + } else { + $__default['default'].extend(this.options.data[rowId], _params2.row); + } + } + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); } - }, { - key: 'refreshColumnTitle', - value: function refreshColumnTitle(params) { - if (!params.hasOwnProperty('field') || !params.hasOwnProperty('title')) { + + this.initSearch(); + this.initPagination(); + this.initSort(); + this.initBody(true); + } + }, { + key: "removeByUniqueId", + value: function removeByUniqueId(id) { + var len = this.options.data.length; + var row = this.getRowByUniqueId(id); + + if (row) { + this.options.data.splice(this.options.data.indexOf(row), 1); + } + + if (len === this.options.data.length) { + return; + } + + if (this.options.sidePagination === 'server') { + this.options.totalRows -= 1; + this.data = _toConsumableArray(this.options.data); + } + + this.initSearch(); + this.initPagination(); + this.initBody(true); + } + }, { + key: "updateCell", + value: function updateCell(params) { + if (!params.hasOwnProperty('index') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) { + return; + } + + this.data[params.index][params.field] = params.value; + + if (params.reinit === false) { + return; + } + + this.initSort(); + this.initBody(true); + } + }, { + key: "updateCellByUniqueId", + value: function updateCellByUniqueId(params) { + var _this19 = this; + + var allParams = Array.isArray(params) ? params : [params]; + allParams.forEach(function (_ref6) { + var id = _ref6.id, + field = _ref6.field, + value = _ref6.value; + + var rowId = _this19.options.data.indexOf(_this19.getRowByUniqueId(id)); + + if (rowId === -1) { return; } - this.columns[this.fieldsColumnsIndex[params.field]].title = this.options.escape ? Utils.escapeHTML(params.title) : params.title; + _this19.options.data[rowId][field] = value; + }); - if (this.columns[this.fieldsColumnsIndex[params.field]].visible) { - var header = this.options.height !== undefined ? this.$tableHeader : this.$header; - header.find('th[data-field]').each(function (i, el) { - if ($(el).data('field') === params.field) { - $($(el).find('.th-inner')[0]).text(params.title); - return false; + if (params.reinit === false) { + return; + } + + this.initSort(); + this.initBody(true); + } + }, { + key: "showRow", + value: function showRow(params) { + this._toggleRow(params, true); + } + }, { + key: "hideRow", + value: function hideRow(params) { + this._toggleRow(params, false); + } + }, { + key: "_toggleRow", + value: function _toggleRow(params, visible) { + var row; + + if (params.hasOwnProperty('index')) { + row = this.getData()[params.index]; + } else if (params.hasOwnProperty('uniqueId')) { + row = this.getRowByUniqueId(params.uniqueId); + } + + if (!row) { + return; + } + + var index = Utils.findIndex(this.hiddenRows, row); + + if (!visible && index === -1) { + this.hiddenRows.push(row); + } else if (visible && index > -1) { + this.hiddenRows.splice(index, 1); + } + + this.initBody(true); + this.initPagination(); + } + }, { + key: "getHiddenRows", + value: function getHiddenRows(show) { + if (show) { + this.initHiddenRows(); + this.initBody(true); + this.initPagination(); + return; + } + + var data = this.getData(); + var rows = []; + + var _iterator8 = _createForOfIteratorHelper(data), + _step8; + + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var row = _step8.value; + + if (this.hiddenRows.includes(row)) { + rows.push(row); + } + } + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); + } + + this.hiddenRows = rows; + return rows; + } + }, { + key: "showColumn", + value: function showColumn(field) { + var _this20 = this; + + var fields = Array.isArray(field) ? field : [field]; + fields.forEach(function (field) { + _this20._toggleColumn(_this20.fieldsColumnsIndex[field], true, true); + }); + } + }, { + key: "hideColumn", + value: function hideColumn(field) { + var _this21 = this; + + var fields = Array.isArray(field) ? field : [field]; + fields.forEach(function (field) { + _this21._toggleColumn(_this21.fieldsColumnsIndex[field], false, true); + }); + } + }, { + key: "_toggleColumn", + value: function _toggleColumn(index, checked, needUpdate) { + if (index === -1 || this.columns[index].visible === checked) { + return; + } + + this.columns[index].visible = checked; + this.initHeader(); + this.initSearch(); + this.initPagination(); + this.initBody(); + + if (this.options.showColumns) { + var $items = this.$toolbar.find('.keep-open input:not(".toggle-all")').prop('disabled', false); + + if (needUpdate) { + $items.filter(Utils.sprintf('[value="%s"]', index)).prop('checked', checked); + } + + if ($items.filter(':checked').length <= this.options.minimumCountColumns) { + $items.filter(':checked').prop('disabled', true); + } + } + } + }, { + key: "getVisibleColumns", + value: function getVisibleColumns() { + var _this22 = this; + + return this.columns.filter(function (column) { + return column.visible && !_this22.isSelectionColumn(column); + }); + } + }, { + key: "getHiddenColumns", + value: function getHiddenColumns() { + return this.columns.filter(function (_ref7) { + var visible = _ref7.visible; + return !visible; + }); + } + }, { + key: "isSelectionColumn", + value: function isSelectionColumn(column) { + return column.radio || column.checkbox; + } + }, { + key: "showAllColumns", + value: function showAllColumns() { + this._toggleAllColumns(true); + } + }, { + key: "hideAllColumns", + value: function hideAllColumns() { + this._toggleAllColumns(false); + } + }, { + key: "_toggleAllColumns", + value: function _toggleAllColumns(visible) { + var _this23 = this; + + var _iterator9 = _createForOfIteratorHelper(this.columns.slice().reverse()), + _step9; + + try { + for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { + var column = _step9.value; + + if (column.switchable) { + if (!visible && this.options.showColumns && this.getVisibleColumns().length === this.options.minimumCountColumns) { + continue; + } + + column.visible = visible; + } + } + } catch (err) { + _iterator9.e(err); + } finally { + _iterator9.f(); + } + + this.initHeader(); + this.initSearch(); + this.initPagination(); + this.initBody(); + + if (this.options.showColumns) { + var $items = this.$toolbar.find('.keep-open input[type="checkbox"]:not(".toggle-all")').prop('disabled', false); + + if (visible) { + $items.prop('checked', visible); + } else { + $items.get().reverse().forEach(function (item) { + if ($items.filter(':checked').length > _this23.options.minimumCountColumns) { + $__default['default'](item).prop('checked', visible); } }); } - } - }, { - key: 'insertRow', - value: function insertRow(params) { - if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) { - return; + + if ($items.filter(':checked').length <= this.options.minimumCountColumns) { + $items.filter(':checked').prop('disabled', true); } - this.options.data.splice(params.index, 0, params.row); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); } - }, { - key: 'updateRow', - value: function updateRow(params) { - var allParams = Array.isArray(params) ? params : [params]; + } + }, { + key: "mergeCells", + value: function mergeCells(options) { + var row = options.index; + var col = this.getVisibleFields().indexOf(options.field); + var rowspan = options.rowspan || 1; + var colspan = options.colspan || 1; + var i; + var j; + var $tr = this.$body.find('>tr'); + col += Utils.getDetailViewIndexOffset(this.options); + var $td = $tr.eq(row).find('>td').eq(col); - for (var _iterator21 = allParams, _isArray21 = Array.isArray(_iterator21), _i23 = 0, _iterator21 = _isArray21 ? _iterator21 : _iterator21[Symbol.iterator]();;) { - var _ref44; + if (row < 0 || col < 0 || row >= this.data.length) { + return; + } - if (_isArray21) { - if (_i23 >= _iterator21.length) break; - _ref44 = _iterator21[_i23++]; - } else { - _i23 = _iterator21.next(); - if (_i23.done) break; - _ref44 = _i23.value; - } - - var _params2 = _ref44; - - if (!_params2.hasOwnProperty('index') || !_params2.hasOwnProperty('row')) { - continue; - } - $.extend(this.options.data[_params2.index], _params2.row); + for (i = row; i < row + rowspan; i++) { + for (j = col; j < col + colspan; j++) { + $tr.eq(i).find('>td').eq(j).hide(); } - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); } - }, { - key: 'initHiddenRows', - value: function initHiddenRows() { - this.hiddenRows = []; + + $td.attr('rowspan', rowspan).attr('colspan', colspan).show(); + } + }, { + key: "checkAll", + value: function checkAll() { + this._toggleCheckAll(true); + } + }, { + key: "uncheckAll", + value: function uncheckAll() { + this._toggleCheckAll(false); + } + }, { + key: "_toggleCheckAll", + value: function _toggleCheckAll(checked) { + var rowsBefore = this.getSelections(); + this.$selectAll.add(this.$selectAll_).prop('checked', checked); + this.$selectItem.filter(':enabled').prop('checked', checked); + this.updateRows(); + this.updateSelected(); + var rowsAfter = this.getSelections(); + + if (checked) { + this.trigger('check-all', rowsAfter, rowsBefore); + return; } - }, { - key: 'showRow', - value: function showRow(params) { - this.toggleRow(params, true); - } - }, { - key: 'hideRow', - value: function hideRow(params) { - this.toggleRow(params, false); - } - }, { - key: 'toggleRow', - value: function toggleRow(params, visible) { - var row = void 0; - if (params.hasOwnProperty('index')) { - row = this.getData()[params.index]; - } else if (params.hasOwnProperty('uniqueId')) { - row = this.getRowByUniqueId(params.uniqueId); - } + this.trigger('uncheck-all', rowsAfter, rowsBefore); + } + }, { + key: "checkInvert", + value: function checkInvert() { + var $items = this.$selectItem.filter(':enabled'); + var checked = $items.filter(':checked'); + $items.each(function (i, el) { + $__default['default'](el).prop('checked', !$__default['default'](el).prop('checked')); + }); + this.updateRows(); + this.updateSelected(); + this.trigger('uncheck-some', checked); + checked = this.getSelections(); + this.trigger('check-some', checked); + } + }, { + key: "check", + value: function check(index) { + this._toggleCheck(true, index); + } + }, { + key: "uncheck", + value: function uncheck(index) { + this._toggleCheck(false, index); + } + }, { + key: "_toggleCheck", + value: function _toggleCheck(checked, index) { + var $el = this.$selectItem.filter("[data-index=\"".concat(index, "\"]")); + var row = this.data[index]; - if (!row) { - return; - } - - var index = Utils.findIndex(this.hiddenRows, row); - - if (!visible && index === -1) { - this.hiddenRows.push(row); - } else if (visible && index > -1) { - this.hiddenRows.splice(index, 1); - } - this.initBody(true); - } - }, { - key: 'getHiddenRows', - value: function getHiddenRows(show) { - if (show) { - this.initHiddenRows(); - this.initBody(true); - return; - } - var data = this.getData(); - var rows = []; - - for (var _iterator22 = data, _isArray22 = Array.isArray(_iterator22), _i24 = 0, _iterator22 = _isArray22 ? _iterator22 : _iterator22[Symbol.iterator]();;) { - var _ref45; - - if (_isArray22) { - if (_i24 >= _iterator22.length) break; - _ref45 = _iterator22[_i24++]; - } else { - _i24 = _iterator22.next(); - if (_i24.done) break; - _ref45 = _i24.value; - } - - var row = _ref45; - - if (this.hiddenRows.indexOf(row) !== -1) { - rows.push(row); - } - } - this.hiddenRows = rows; - return rows; - } - }, { - key: 'mergeCells', - value: function mergeCells(options) { - var row = options.index; - var col = this.getVisibleFields().indexOf(options.field); - var rowspan = options.rowspan || 1; - var colspan = options.colspan || 1; - var i = void 0; - var j = void 0; - var $tr = this.$body.find('>tr'); - - if (this.options.detailView && !this.options.cardView) { - col += 1; - } - - var $td = $tr.eq(row).find('>td').eq(col); - - if (row < 0 || col < 0 || row >= this.data.length) { - return; - } - - for (i = row; i < row + rowspan; i++) { - for (j = col; j < col + colspan; j++) { - $tr.eq(i).find('>td').eq(j).hide(); - } - } - - $td.attr('rowspan', rowspan).attr('colspan', colspan).show(); - } - }, { - key: 'updateCell', - value: function updateCell(params) { - if (!params.hasOwnProperty('index') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) { - return; - } - this.data[params.index][params.field] = params.value; - - if (params.reinit === false) { - return; - } - this.initSort(); - this.initBody(true); - } - }, { - key: 'updateCellById', - value: function updateCellById(params) { - var _this16 = this; - - if (!params.hasOwnProperty('id') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) { - return; - } - var allParams = Array.isArray(params) ? params : [params]; - - allParams.forEach(function (_ref46) { - var id = _ref46.id, - field = _ref46.field, - value = _ref46.value; - - var rowId = _this16.options.data.indexOf(_this16.getRowByUniqueId(id)); - - if (rowId === -1) { - return; - } - _this16.data[rowId][field] = value; - }); - - if (params.reinit === false) { - return; - } - this.initSort(); - this.initBody(true); - } - }, { - key: 'getOptions', - value: function getOptions() { - return this.options; - } - }, { - key: 'getSelections', - value: function getSelections() { - var _this17 = this; - - // fix #2424: from html with checkbox - return this.options.data.filter(function (row) { - return row[_this17.header.stateField] === true; - }); - } - }, { - key: 'getAllSelections', - value: function getAllSelections() { - var _this18 = this; - - return this.options.data.filter(function (row) { - return row[_this18.header.stateField]; - }); - } - }, { - key: 'checkAll', - value: function checkAll() { - this.checkAll_(true); - } - }, { - key: 'uncheckAll', - value: function uncheckAll() { - this.checkAll_(false); - } - }, { - key: 'checkInvert', - value: function checkInvert() { - var $items = this.$selectItem.filter(':enabled'); - var checked = $items.filter(':checked'); - $items.each(function (i, el) { - $(el).prop('checked', !$(el).prop('checked')); - }); - this.updateRows(); - this.updateSelected(); - this.trigger('uncheck-some', checked); - checked = this.getSelections(); - this.trigger('check-some', checked); - } - }, { - key: 'checkAll_', - value: function checkAll_(checked) { - var rows = void 0; - if (!checked) { - rows = this.getSelections(); - } - this.$selectAll.add(this.$selectAll_).prop('checked', checked); - this.$selectItem.filter(':enabled').prop('checked', checked); - this.updateRows(); - if (checked) { - rows = this.getSelections(); - } - this.trigger(checked ? 'check-all' : 'uncheck-all', rows); - } - }, { - key: 'check', - value: function check(index) { - this.check_(true, index); - } - }, { - key: 'uncheck', - value: function uncheck(index) { - this.check_(false, index); - } - }, { - key: 'check_', - value: function check_(checked, index) { - var $el = this.$selectItem.filter('[data-index="' + index + '"]'); - var row = this.data[index]; - - if ($el.is(':radio') || this.options.singleSelect) { - for (var _iterator23 = this.options.data, _isArray23 = Array.isArray(_iterator23), _i25 = 0, _iterator23 = _isArray23 ? _iterator23 : _iterator23[Symbol.iterator]();;) { - var _ref47; - - if (_isArray23) { - if (_i25 >= _iterator23.length) break; - _ref47 = _iterator23[_i25++]; - } else { - _i25 = _iterator23.next(); - if (_i25.done) break; - _ref47 = _i25.value; - } - - var r = _ref47; + if ($el.is(':radio') || this.options.singleSelect || this.options.multipleSelectRow && !this.multipleSelectRowCtrlKey && !this.multipleSelectRowShiftKey) { + var _iterator10 = _createForOfIteratorHelper(this.options.data), + _step10; + try { + for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { + var r = _step10.value; r[this.header.stateField] = false; } - this.$selectItem.filter(':checked').not($el).prop('checked', false); + } catch (err) { + _iterator10.e(err); + } finally { + _iterator10.f(); } - row[this.header.stateField] = checked; - $el.prop('checked', checked); - this.updateSelected(); - this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el); + this.$selectItem.filter(':checked').not($el).prop('checked', false); } - }, { - key: 'checkBy', - value: function checkBy(obj) { - this.checkBy_(true, obj); - } - }, { - key: 'uncheckBy', - value: function uncheckBy(obj) { - this.checkBy_(false, obj); - } - }, { - key: 'checkBy_', - value: function checkBy_(checked, obj) { - var _this19 = this; - if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) { - return; + row[this.header.stateField] = checked; + + if (this.options.multipleSelectRow) { + if (this.multipleSelectRowShiftKey && this.multipleSelectRowLastSelectedIndex >= 0) { + var _ref8 = this.multipleSelectRowLastSelectedIndex < index ? [this.multipleSelectRowLastSelectedIndex, index] : [index, this.multipleSelectRowLastSelectedIndex], + _ref9 = _slicedToArray(_ref8, 2), + fromIndex = _ref9[0], + toIndex = _ref9[1]; + + for (var i = fromIndex + 1; i < toIndex; i++) { + this.data[i][this.header.stateField] = true; + this.$selectItem.filter("[data-index=\"".concat(i, "\"]")).prop('checked', true); + } } - var rows = []; - this.options.data.forEach(function (row, i) { - if (!row.hasOwnProperty(obj.field)) { + this.multipleSelectRowCtrlKey = false; + this.multipleSelectRowShiftKey = false; + this.multipleSelectRowLastSelectedIndex = checked ? index : -1; + } + + $el.prop('checked', checked); + this.updateSelected(); + this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el); + } + }, { + key: "checkBy", + value: function checkBy(obj) { + this._toggleCheckBy(true, obj); + } + }, { + key: "uncheckBy", + value: function uncheckBy(obj) { + this._toggleCheckBy(false, obj); + } + }, { + key: "_toggleCheckBy", + value: function _toggleCheckBy(checked, obj) { + var _this24 = this; + + if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) { + return; + } + + var rows = []; + this.data.forEach(function (row, i) { + if (!row.hasOwnProperty(obj.field)) { + return false; + } + + if (obj.values.includes(row[obj.field])) { + var $el = _this24.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i)); + + $el = checked ? $el.not(':checked') : $el.filter(':checked'); + + if (!$el.length) { + return; + } + + $el.prop('checked', checked); + row[_this24.header.stateField] = checked; + rows.push(row); + + _this24.trigger(checked ? 'check' : 'uncheck', row, $el); + } + }); + this.updateSelected(); + this.trigger(checked ? 'check-some' : 'uncheck-some', rows); + } + }, { + key: "refresh", + value: function refresh(params) { + if (params && params.url) { + this.options.url = params.url; + } + + if (params && params.pageNumber) { + this.options.pageNumber = params.pageNumber; + } + + if (params && params.pageSize) { + this.options.pageSize = params.pageSize; + } + + this.trigger('refresh', this.initServer(params && params.silent, params && params.query, params && params.url)); + } + }, { + key: "destroy", + value: function destroy() { + this.$el.insertBefore(this.$container); + $__default['default'](this.options.toolbar).insertBefore(this.$el); + this.$container.next().remove(); + this.$container.remove(); + this.$el.html(this.$el_.html()).css('margin-top', '0').attr('class', this.$el_.attr('class') || ''); // reset the class + } + }, { + key: "resetView", + value: function resetView(params) { + var padding = 0; + + if (params && params.height) { + this.options.height = params.height; + } + + this.$selectAll.prop('checked', this.$selectItem.length > 0 && this.$selectItem.length === this.$selectItem.filter(':checked').length); + this.$tableContainer.toggleClass('has-card-view', this.options.cardView); + + if (!this.options.cardView && this.options.showHeader && this.options.height) { + this.$tableHeader.show(); + this.resetHeader(); + padding += this.$header.outerHeight(true) + 1; + } else { + this.$tableHeader.hide(); + this.trigger('post-header'); + } + + if (!this.options.cardView && this.options.showFooter) { + this.$tableFooter.show(); + this.fitFooter(); + + if (this.options.height) { + padding += this.$tableFooter.outerHeight(true); + } + } + + if (this.$container.hasClass('fullscreen')) { + this.$tableContainer.css('height', ''); + this.$tableContainer.css('width', ''); + } else if (this.options.height) { + if (this.$tableBorder) { + this.$tableBorder.css('width', ''); + this.$tableBorder.css('height', ''); + } + + var toolbarHeight = this.$toolbar.outerHeight(true); + var paginationHeight = this.$pagination.outerHeight(true); + var height = this.options.height - toolbarHeight - paginationHeight; + var $bodyTable = this.$tableBody.find('>table'); + var tableHeight = $bodyTable.outerHeight(); + this.$tableContainer.css('height', "".concat(height, "px")); + + if (this.$tableBorder && $bodyTable.is(':visible')) { + var tableBorderHeight = height - tableHeight - 2; + + if (this.$tableBody[0].scrollWidth - this.$tableBody.innerWidth()) { + tableBorderHeight -= Utils.getScrollBarWidth(); + } + + this.$tableBorder.css('width', "".concat($bodyTable.outerWidth(), "px")); + this.$tableBorder.css('height', "".concat(tableBorderHeight, "px")); + } + } + + if (this.options.cardView) { + // remove the element css + this.$el.css('margin-top', '0'); + this.$tableContainer.css('padding-bottom', '0'); + this.$tableFooter.hide(); + } else { + // Assign the correct sortable arrow + this.getCaret(); + this.$tableContainer.css('padding-bottom', "".concat(padding, "px")); + } + + this.trigger('reset-view'); + } + }, { + key: "showLoading", + value: function showLoading() { + this.$tableLoading.toggleClass('open', true); + var fontSize = this.options.loadingFontSize; + + if (this.options.loadingFontSize === 'auto') { + fontSize = this.$tableLoading.width() * 0.04; + fontSize = Math.max(12, fontSize); + fontSize = Math.min(32, fontSize); + fontSize = "".concat(fontSize, "px"); + } + + this.$tableLoading.find('.loading-text').css('font-size', fontSize); + } + }, { + key: "hideLoading", + value: function hideLoading() { + this.$tableLoading.toggleClass('open', false); + } + }, { + key: "togglePagination", + value: function togglePagination() { + this.options.pagination = !this.options.pagination; + var icon = this.options.showButtonIcons ? this.options.pagination ? this.options.icons.paginationSwitchDown : this.options.icons.paginationSwitchUp : ''; + var text = this.options.showButtonText ? this.options.pagination ? this.options.formatPaginationSwitchUp() : this.options.formatPaginationSwitchDown() : ''; + this.$toolbar.find('button[name="paginationSwitch"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)); + this.updatePagination(); + } + }, { + key: "toggleFullscreen", + value: function toggleFullscreen() { + this.$el.closest('.bootstrap-table').toggleClass('fullscreen'); + this.resetView(); + } + }, { + key: "toggleView", + value: function toggleView() { + this.options.cardView = !this.options.cardView; + this.initHeader(); + var icon = this.options.showButtonIcons ? this.options.cardView ? this.options.icons.toggleOn : this.options.icons.toggleOff : ''; + var text = this.options.showButtonText ? this.options.cardView ? this.options.formatToggleOff() : this.options.formatToggleOn() : ''; + this.$toolbar.find('button[name="toggle"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)); + this.initBody(); + this.trigger('toggle', this.options.cardView); + } + }, { + key: "resetSearch", + value: function resetSearch(text) { + var $search = Utils.getSearchInput(this); + $search.val(text || ''); + this.onSearch({ + currentTarget: $search + }); + } + }, { + key: "filterBy", + value: function filterBy(columns, options) { + this.filterOptions = Utils.isEmptyObject(options) ? this.options.filterOptions : $__default['default'].extend(this.options.filterOptions, options); + this.filterColumns = Utils.isEmptyObject(columns) ? {} : columns; + this.options.pageNumber = 1; + this.initSearch(); + this.updatePagination(); + } + }, { + key: "scrollTo", + value: function scrollTo(params) { + var options = { + unit: 'px', + value: 0 + }; + + if (_typeof(params) === 'object') { + options = Object.assign(options, params); + } else if (typeof params === 'string' && params === 'bottom') { + options.value = this.$tableBody[0].scrollHeight; + } else if (typeof params === 'string' || typeof params === 'number') { + options.value = params; + } + + var scrollTo = options.value; + + if (options.unit === 'rows') { + scrollTo = 0; + this.$body.find("> tr:lt(".concat(options.value, ")")).each(function (i, el) { + scrollTo += $__default['default'](el).outerHeight(true); + }); + } + + this.$tableBody.scrollTop(scrollTo); + } + }, { + key: "getScrollPosition", + value: function getScrollPosition() { + return this.$tableBody.scrollTop(); + } + }, { + key: "selectPage", + value: function selectPage(page) { + if (page > 0 && page <= this.options.totalPages) { + this.options.pageNumber = page; + this.updatePagination(); + } + } + }, { + key: "prevPage", + value: function prevPage() { + if (this.options.pageNumber > 1) { + this.options.pageNumber--; + this.updatePagination(); + } + } + }, { + key: "nextPage", + value: function nextPage() { + if (this.options.pageNumber < this.options.totalPages) { + this.options.pageNumber++; + this.updatePagination(); + } + } + }, { + key: "toggleDetailView", + value: function toggleDetailView(index, _columnDetailFormatter) { + var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"]', index)); + + if ($tr.next().is('tr.detail-view')) { + this.collapseRow(index); + } else { + this.expandRow(index, _columnDetailFormatter); + } + + this.resetView(); + } + }, { + key: "expandRow", + value: function expandRow(index, _columnDetailFormatter) { + var row = this.data[index]; + var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index)); + + if ($tr.next().is('tr.detail-view')) { + return; + } + + if (this.options.detailViewIcon) { + $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailClose)); + } + + $tr.after(Utils.sprintf('', $tr.children('td').length)); + var $element = $tr.next().find('td'); + var detailFormatter = _columnDetailFormatter || this.options.detailFormatter; + var content = Utils.calculateObjectValue(this.options, detailFormatter, [index, row, $element], ''); + + if ($element.length === 1) { + $element.append(content); + } + + this.trigger('expand-row', index, row, $element); + } + }, { + key: "expandRowByUniqueId", + value: function expandRowByUniqueId(uniqueId) { + var row = this.getRowByUniqueId(uniqueId); + + if (!row) { + return; + } + + this.expandRow(this.data.indexOf(row)); + } + }, { + key: "collapseRow", + value: function collapseRow(index) { + var row = this.data[index]; + var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index)); + + if (!$tr.next().is('tr.detail-view')) { + return; + } + + if (this.options.detailViewIcon) { + $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen)); + } + + this.trigger('collapse-row', index, row, $tr.next()); + $tr.next().remove(); + } + }, { + key: "collapseRowByUniqueId", + value: function collapseRowByUniqueId(uniqueId) { + var row = this.getRowByUniqueId(uniqueId); + + if (!row) { + return; + } + + this.collapseRow(this.data.indexOf(row)); + } + }, { + key: "expandAllRows", + value: function expandAllRows() { + var trs = this.$body.find('> tr[data-index][data-has-detail-view]'); + + for (var i = 0; i < trs.length; i++) { + this.expandRow($__default['default'](trs[i]).data('index')); + } + } + }, { + key: "collapseAllRows", + value: function collapseAllRows() { + var trs = this.$body.find('> tr[data-index][data-has-detail-view]'); + + for (var i = 0; i < trs.length; i++) { + this.collapseRow($__default['default'](trs[i]).data('index')); + } + } + }, { + key: "updateColumnTitle", + value: function updateColumnTitle(params) { + if (!params.hasOwnProperty('field') || !params.hasOwnProperty('title')) { + return; + } + + this.columns[this.fieldsColumnsIndex[params.field]].title = this.options.escape ? Utils.escapeHTML(params.title) : params.title; + + if (this.columns[this.fieldsColumnsIndex[params.field]].visible) { + this.$header.find('th[data-field]').each(function (i, el) { + if ($__default['default'](el).data('field') === params.field) { + $__default['default']($__default['default'](el).find('.th-inner')[0]).text(params.title); return false; } - if (obj.values.indexOf(row[obj.field]) !== -1) { - var $el = _this19.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i)).prop('checked', checked); - row[_this19.header.stateField] = checked; - rows.push(row); - _this19.trigger(checked ? 'check' : 'uncheck', row, $el); - } }); - this.updateSelected(); - this.trigger(checked ? 'check-some' : 'uncheck-some', rows); - } - }, { - key: 'destroy', - value: function destroy() { - this.$el.insertBefore(this.$container); - $(this.options.toolbar).insertBefore(this.$el); - this.$container.next().remove(); - this.$container.remove(); - this.$el.html(this.$el_.html()).css('margin-top', '0').attr('class', this.$el_.attr('class') || ''); // reset the class - } - }, { - key: 'showLoading', - value: function showLoading() { - this.$tableLoading.css('display', 'flex'); - } - }, { - key: 'hideLoading', - value: function hideLoading() { - this.$tableLoading.css('display', 'none'); - } - }, { - key: 'togglePagination', - value: function togglePagination() { - this.options.pagination = !this.options.pagination; - this.$toolbar.find('button[name="paginationSwitch"]').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.pagination ? this.options.icons.paginationSwitchDown : this.options.icons.paginationSwitchUp)); - this.updatePagination(); - } - }, { - key: 'toggleFullscreen', - value: function toggleFullscreen() { - this.$el.closest('.bootstrap-table').toggleClass('fullscreen'); this.resetView(); } - }, { - key: 'refresh', - value: function refresh(params) { - if (params && params.url) { - this.options.url = params.url; - } - if (params && params.pageNumber) { - this.options.pageNumber = params.pageNumber; - } - if (params && params.pageSize) { - this.options.pageSize = params.pageSize; - } - this.trigger('refresh', this.initServer(params && params.silent, params && params.query, params && params.url)); - } - }, { - key: 'resetWidth', - value: function resetWidth() { - if (this.options.showHeader && this.options.height) { - this.fitHeader(); - } - if (this.options.showFooter && !this.options.cardView) { - this.fitFooter(); - } - } - }, { - key: 'showColumn', - value: function showColumn(field) { - this.toggleColumn(this.fieldsColumnsIndex[field], true, true); - } - }, { - key: 'hideColumn', - value: function hideColumn(field) { - this.toggleColumn(this.fieldsColumnsIndex[field], false, true); - } - }, { - key: 'getHiddenColumns', - value: function getHiddenColumns() { - return this.columns.filter(function (_ref48) { - var visible = _ref48.visible; - return !visible; - }); - } - }, { - key: 'getVisibleColumns', - value: function getVisibleColumns() { - return this.columns.filter(function (_ref49) { - var visible = _ref49.visible; - return visible; - }); - } - }, { - key: 'toggleAllColumns', - value: function toggleAllColumns(visible) { - for (var _iterator24 = this.columns, _isArray24 = Array.isArray(_iterator24), _i26 = 0, _iterator24 = _isArray24 ? _iterator24 : _iterator24[Symbol.iterator]();;) { - var _ref50; - - if (_isArray24) { - if (_i26 >= _iterator24.length) break; - _ref50 = _iterator24[_i26++]; - } else { - _i26 = _iterator24.next(); - if (_i26.done) break; - _ref50 = _i26.value; - } - - var column = _ref50; - - column.visible = visible; - } - - this.initHeader(); - this.initSearch(); - this.initPagination(); - this.initBody(); - if (this.options.showColumns) { - var $items = this.$toolbar.find('.keep-open input').prop('disabled', false); - - if ($items.filter(':checked').length <= this.options.minimumCountColumns) { - $items.filter(':checked').prop('disabled', true); - } - } - } - }, { - key: 'showAllColumns', - value: function showAllColumns() { - this.toggleAllColumns(true); - } - }, { - key: 'hideAllColumns', - value: function hideAllColumns() { - this.toggleAllColumns(false); - } - }, { - key: 'filterBy', - value: function filterBy(columns) { - this.filterColumns = Utils.isEmptyObject(columns) ? {} : columns; - this.options.pageNumber = 1; - this.initSearch(); - this.updatePagination(); - } - }, { - key: 'scrollTo', - value: function scrollTo(_value) { - if (typeof _value === 'undefined') { - return this.$tableBody.scrollTop(); - } - - var value = _value; - if (typeof _value === 'string' && _value === 'bottom') { - value = this.$tableBody[0].scrollHeight; - } - this.$tableBody.scrollTop(value); - } - }, { - key: 'getScrollPosition', - value: function getScrollPosition() { - return this.scrollTo(); - } - }, { - key: 'selectPage', - value: function selectPage(page) { - if (page > 0 && page <= this.options.totalPages) { - this.options.pageNumber = page; - this.updatePagination(); - } - } - }, { - key: 'prevPage', - value: function prevPage() { - if (this.options.pageNumber > 1) { - this.options.pageNumber--; - this.updatePagination(); - } - } - }, { - key: 'nextPage', - value: function nextPage() { - if (this.options.pageNumber < this.options.totalPages) { - this.options.pageNumber++; - this.updatePagination(); - } - } - }, { - key: 'toggleView', - value: function toggleView() { - this.options.cardView = !this.options.cardView; - this.initHeader(); - // Fixed remove toolbar when click cardView button. - // this.initToolbar(); - this.$toolbar.find('button[name="toggle"]').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.cardView ? this.options.icons.toggleOn : this.options.icons.toggleOff)); - this.initBody(); - this.trigger('toggle', this.options.cardView); - } - }, { - key: 'refreshOptions', - value: function refreshOptions(options) { - // If the objects are equivalent then avoid the call of destroy / init methods - if (Utils.compareObjects(this.options, options, true)) { - return; - } - this.options = $.extend(this.options, options); - this.trigger('refresh-options', this.options); - this.destroy(); - this.init(); - } - }, { - key: 'resetSearch', - value: function resetSearch(text) { - var $search = this.$toolbar.find('.search input'); - $search.val(text || ''); - this.onSearch({ currentTarget: $search }); - } - }, { - key: 'expandRow_', - value: function expandRow_(expand, index) { - var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"]', index)); - if ($tr.next().is('tr.detail-view') === !expand) { - $tr.find('> td > .detail-icon').click(); - } - } - }, { - key: 'expandRow', - value: function expandRow(index) { - this.expandRow_(true, index); - } - }, { - key: 'collapseRow', - value: function collapseRow(index) { - this.expandRow_(false, index); - } - }, { - key: 'expandAllRows', - value: function expandAllRows(isSubTable) { - var _this20 = this; - - if (isSubTable) { - var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"]', 0)); - var detailIcon = null; - var executeInterval = false; - var idInterval = -1; - - if (!$tr.next().is('tr.detail-view')) { - $tr.find('> td > .detail-icon').click(); - executeInterval = true; - } else if (!$tr.next().next().is('tr.detail-view')) { - $tr.next().find('.detail-icon').click(); - executeInterval = true; - } - - if (executeInterval) { - try { - idInterval = setInterval(function () { - detailIcon = _this20.$body.find('tr.detail-view').last().find('.detail-icon'); - if (detailIcon.length > 0) { - detailIcon.click(); - } else { - clearInterval(idInterval); - } - }, 1); - } catch (ex) { - clearInterval(idInterval); - } - } - } else { - var trs = this.$body.children(); - for (var i = 0; i < trs.length; i++) { - this.expandRow_(true, $(trs[i]).data('index')); - } - } - } - }, { - key: 'collapseAllRows', - value: function collapseAllRows(isSubTable) { - if (isSubTable) { - this.expandRow_(false, 0); - } else { - var trs = this.$body.children(); - for (var i = 0; i < trs.length; i++) { - this.expandRow_(false, $(trs[i]).data('index')); - } - } - } - }, { - key: 'updateFormatText', - value: function updateFormatText(name, text) { - if (this.options[Utils.sprintf('format%s', name)]) { - if (typeof text === 'string') { - this.options[Utils.sprintf('format%s', name)] = function () { - return text; - }; - } else if (typeof text === 'function') { - this.options[Utils.sprintf('format%s', name)] = text; - } - } - this.initToolbar(); - this.initPagination(); - this.initBody(); - } - }]); - - return BootstrapTable; - }(); - - BootstrapTable.DEFAULTS = DEFAULTS; - BootstrapTable.LOCALES = LOCALES; - BootstrapTable.COLUMN_DEFAULTS = COLUMN_DEFAULTS; - BootstrapTable.EVENTS = EVENTS; - - // BOOTSTRAP TABLE PLUGIN DEFINITION - // ======================= - - var allowedMethods = ['getOptions', 'getSelections', 'getAllSelections', 'getData', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'updateCell', 'updateByUniqueId', 'removeByUniqueId', 'getRowByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'mergeCells', 'refreshColumnTitle', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'resetView', 'resetWidth', 'destroy', 'showLoading', 'hideLoading', 'showColumn', 'hideColumn', 'getHiddenColumns', 'getVisibleColumns', 'showAllColumns', 'hideAllColumns', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'togglePagination', 'toggleView', 'refreshOptions', 'resetSearch', 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows', 'updateFormatText', 'updateCellById']; - - $.BootstrapTable = BootstrapTable; - $.fn.bootstrapTable = function (option) { - for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key6 = 1; _key6 < _len3; _key6++) { - args[_key6 - 1] = arguments[_key6]; } + }, { + key: "updateFormatText", + value: function updateFormatText(formatName, text) { + if (!/^format/.test(formatName) || !this.options[formatName]) { + return; + } - var value = void 0; + if (typeof text === 'string') { + this.options[formatName] = function () { + return text; + }; + } else if (typeof text === 'function') { + this.options[formatName] = text; + } - this.each(function (i, el) { - var data = $(el).data('bootstrap.table'); - var options = $.extend({}, BootstrapTable.DEFAULTS, $(el).data(), (typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object' && option); + this.initToolbar(); + this.initPagination(); + this.initBody(); + } + }]); - if (typeof option === 'string') { - var _data2; + return BootstrapTable; + }(); - if (!(allowedMethods.indexOf(option) !== -1)) { - throw new Error('Unknown method: ' + option); - } + BootstrapTable.VERSION = Constants.VERSION; + BootstrapTable.DEFAULTS = Constants.DEFAULTS; + BootstrapTable.LOCALES = Constants.LOCALES; + BootstrapTable.COLUMN_DEFAULTS = Constants.COLUMN_DEFAULTS; + BootstrapTable.METHODS = Constants.METHODS; + BootstrapTable.EVENTS = Constants.EVENTS; // BOOTSTRAP TABLE PLUGIN DEFINITION + // ======================= - if (!data) { - return; - } + $__default['default'].BootstrapTable = BootstrapTable; - value = (_data2 = data)[option].apply(_data2, args); + $__default['default'].fn.bootstrapTable = function (option) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key5 = 1; _key5 < _len2; _key5++) { + args[_key5 - 1] = arguments[_key5]; + } - if (option === 'destroy') { - $(el).removeData('bootstrap.table'); - } + var value; + this.each(function (i, el) { + var data = $__default['default'](el).data('bootstrap.table'); + var options = $__default['default'].extend({}, BootstrapTable.DEFAULTS, $__default['default'](el).data(), _typeof(option) === 'object' && option); + + if (typeof option === 'string') { + var _data2; + + if (!Constants.METHODS.includes(option)) { + throw new Error("Unknown method: ".concat(option)); } if (!data) { - $(el).data('bootstrap.table', data = new $.BootstrapTable(el, options)); + return; } - }); - return typeof value === 'undefined' ? this : value; - }; + value = (_data2 = data)[option].apply(_data2, args); - $.fn.bootstrapTable.Constructor = BootstrapTable; - $.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS; - $.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS; - $.fn.bootstrapTable.locales = BootstrapTable.LOCALES; - $.fn.bootstrapTable.methods = allowedMethods; - $.fn.bootstrapTable.utils = Utils; + if (option === 'destroy') { + $__default['default'](el).removeData('bootstrap.table'); + } + } - // BOOTSTRAP TABLE INIT - // ======================= - - $(function () { - $('[data-toggle="table"]').bootstrapTable(); + if (!data) { + data = new $__default['default'].BootstrapTable(el, options); + $__default['default'](el).data('bootstrap.table', data); + data.init(); + } }); - })(jQuery); -}); \ No newline at end of file + return typeof value === 'undefined' ? this : value; + }; + + $__default['default'].fn.bootstrapTable.Constructor = BootstrapTable; + $__default['default'].fn.bootstrapTable.theme = Constants.THEME; + $__default['default'].fn.bootstrapTable.VERSION = Constants.VERSION; + $__default['default'].fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS; + $__default['default'].fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS; + $__default['default'].fn.bootstrapTable.events = BootstrapTable.EVENTS; + $__default['default'].fn.bootstrapTable.locales = BootstrapTable.LOCALES; + $__default['default'].fn.bootstrapTable.methods = BootstrapTable.METHODS; + $__default['default'].fn.bootstrapTable.utils = Utils; // BOOTSTRAP TABLE INIT + // ======================= + + $__default['default'](function () { + $__default['default']('[data-toggle="table"]').bootstrapTable(); + }); + + return BootstrapTable; + +}))); From 887adf35f4234a20298a4fd45c27d951b371f641 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 29 May 2021 23:59:27 +1000 Subject: [PATCH 53/68] Add simple tile grid view for part list --- InvenTree/templates/base.html | 4 +-- InvenTree/templates/js/part.js | 65 ++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 07b1a1d34b..3cc9b33619 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -124,14 +124,14 @@ - - + + diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index f28bef059e..52f54dfa36 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -278,6 +278,58 @@ function loadParametricPartTable(table, options={}) { } +function partGridTile(part) { + // Generate a "grid tile" view for a particular part + + // Rows for table view + var rows = ''; + + if (part.IPN) { + rows += `{% trans "IPN" %}${part.IPN}`; + } + + rows += `{% trans "Stock" %}${part.in_stock}`; + + if (part.on_order) { + rows += `{$ trans "On Order" %}${part.on_order}`; + } + + if (part.building) { + rows += `{% trans "Building" %}${part.building}`; + } + + var html = ` + +
    +
    +
    + + ${part.full_name} + + ${makePartIcons(part)} +
    + ${part.description} +
    +
    +
    +
    + +
    +
    + + ${rows} +
    +
    +
    +
    +
    +
    + `; + + return html; +} + + function loadPartTable(table, url, options={}) { /* Load part listing data into specified table. * @@ -289,6 +341,7 @@ function loadPartTable(table, url, options={}) { * query: extra query params for API request * buttons: If provided, link buttons to selection status of this table * disableFilters: If true, disable custom filters + * gridView: If true, display as grid rather than standard table */ // Ensure category detail is included @@ -452,6 +505,18 @@ function loadPartTable(table, url, options={}) { formatNoMatches: function() { return '{% trans "No parts found" %}'; }, columns: columns, showColumns: true, + showCustomView: true, + showCustomViewButton: true, + customView: function(data) { + + var html = ''; + + data.forEach(function(row) { + html += partGridTile(row); + }); + + return `
    ${html}
    `; + } }); if (options.buttons) { From ee95cf5c2179e893cd44936f2b0c821e6605c22b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 30 May 2021 00:10:46 +1000 Subject: [PATCH 54/68] Clicking on thumbnail shows modal image --- InvenTree/templates/js/modals.js | 1 + InvenTree/templates/js/part.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/js/modals.js b/InvenTree/templates/js/modals.js index f447fdce72..c8ebd90eb4 100644 --- a/InvenTree/templates/js/modals.js +++ b/InvenTree/templates/js/modals.js @@ -978,6 +978,7 @@ function showModalImage(image_url) { // Set image content $('#modal-image').attr('src', image_url); + modal.hide(); modal.show(); modal.animate({ diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index 52f54dfa36..a5b6def921 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -288,7 +288,13 @@ function partGridTile(part) { rows += `{% trans "IPN" %}${part.IPN}`; } - rows += `{% trans "Stock" %}${part.in_stock}`; + var stock = `${part.in_stock}`; + + if (!part.in_stock) { + stock = `{% trans "No Stock" %}`; + } + + rows += `{% trans "Stock" %}${stock}`; if (part.on_order) { rows += `{$ trans "On Order" %}${part.on_order}`; @@ -313,7 +319,7 @@ function partGridTile(part) {
    - +
    From e846c744f4454c6fab3bde108aa4cd13e5371da5 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 30 May 2021 00:23:05 +1000 Subject: [PATCH 55/68] Buttons to toggle between list and grid views --- InvenTree/part/templates/part/category.html | 24 +++++++++++++++++++++ InvenTree/templates/js/part.js | 7 +++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 2e6ebb7fca..c6fa5e84d6 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -128,6 +128,13 @@
  • {% trans "Export Data" %}
  • + + +
    @@ -169,6 +176,22 @@ toggleId: '#category-menu-toggle', }); + $('#view-list').hide(); + + $('#view-list').click(function() { + $('#view-list').hide(); + $('#view-grid').show(); + + $('#part-table').bootstrapTable('toggleCustomView'); + }); + + $('#view-grid').click(function() { + $('#view-grid').hide(); + $('#view-list').show(); + + $('#part-table').bootstrapTable('toggleCustomView'); + }); + $("#cat-create").click(function() { launchModalForm( "{% url 'category-create' %}", @@ -273,6 +296,7 @@ }, buttons: ['#part-options'], checkbox: true, + gridView: true, }, ); diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index a5b6def921..5c2840b121 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -347,7 +347,6 @@ function loadPartTable(table, url, options={}) { * query: extra query params for API request * buttons: If provided, link buttons to selection status of this table * disableFilters: If true, disable custom filters - * gridView: If true, display as grid rather than standard table */ // Ensure category detail is included @@ -511,8 +510,8 @@ function loadPartTable(table, url, options={}) { formatNoMatches: function() { return '{% trans "No parts found" %}'; }, columns: columns, showColumns: true, - showCustomView: true, - showCustomViewButton: true, + showCustomView: false, + showCustomViewButton: false, customView: function(data) { var html = ''; @@ -524,7 +523,7 @@ function loadPartTable(table, url, options={}) { return `
    ${html}
    `; } }); - + if (options.buttons) { linkButtonsToSelection($(table), options.buttons); } From f1ca17286f2be2e6d0835097b32af44c288983e7 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 30 May 2021 00:38:59 +1000 Subject: [PATCH 56/68] Save grid / list selection to local storage settings --- InvenTree/part/templates/part/category.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index c6fa5e84d6..44cbeac99f 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -176,13 +176,12 @@ toggleId: '#category-menu-toggle', }); - $('#view-list').hide(); - $('#view-list').click(function() { $('#view-list').hide(); $('#view-grid').show(); $('#part-table').bootstrapTable('toggleCustomView'); + inventreeSave('part-grid-view', ''); }); $('#view-grid').click(function() { @@ -190,6 +189,7 @@ $('#view-list').show(); $('#part-table').bootstrapTable('toggleCustomView'); + inventreeSave('part-grid-view', 1); }); $("#cat-create").click(function() { @@ -300,4 +300,11 @@ }, ); + if (inventreeLoad("part-grid-view")) { + $('#view-grid').hide(); + $('#part-table').bootstrapTable('toggleCustomView'); + } else { + $('#view-list').hide(); + } + {% endblock %} \ No newline at end of file From b10410ca1f9e43b8586d491579b180bf9081ac34 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 31 May 2021 12:47:07 +1000 Subject: [PATCH 57/68] Update bootstrap-table library Updated javascript / css to latest version --- .../bootstrap-table-en-US.min.js | 0 .../bootstrap-table.css | 267 +- .../bootstrap-table.js | 0 .../addrbar/bootstrap-table-addrbar.js | 1829 +++++++- .../addrbar/bootstrap-table-addrbar.min.js | 10 + .../bootstrap-table-auto-refresh.js | 1247 +++++- .../bootstrap-table-auto-refresh.min.js | 10 + .../cookie/bootstrap-table-cookie.js | 2733 ++++++++++-- .../cookie/bootstrap-table-cookie.min.js | 10 + .../copy-rows/bootstrap-table-copy-rows.js | 1285 +++++- .../bootstrap-table-copy-rows.min.js | 10 + .../bootstrap-table-custom-view.min.js | 10 + .../defer-url/bootstrap-table-defer-url.js | 885 +++- .../bootstrap-table-defer-url.min.js | 10 + .../editable/bootstrap-table-editable.js | 1997 ++++++++- .../editable/bootstrap-table-editable.min.js | 10 + .../export/bootstrap-table-export.js | 2375 +++++++++- .../export/bootstrap-table-export.min.js | 10 + .../bootstrap-table-filter-control.css | 8 +- .../bootstrap-table-filter-control.js | 3839 +++++++++++++---- .../bootstrap-table-filter-control.min.css | 10 + .../bootstrap-table-filter-control.min.js | 10 + .../extensions/filter-control/utils.js | 2434 +++++++++++ .../extensions/filter-control/utils.min.js | 10 + .../bootstrap-table-fixed-columns.css | 26 +- .../bootstrap-table-fixed-columns.js | 1707 +++++++- .../bootstrap-table-fixed-columns.min.css | 10 + .../bootstrap-table-fixed-columns.min.js | 10 + .../group-by-v2/bootstrap-table-group-by.css | 13 +- .../group-by-v2/bootstrap-table-group-by.js | 1774 +++++++- .../bootstrap-table-group-by.min.css | 10 + .../bootstrap-table-group-by.min.js | 10 + .../bootstrap-table-i18n-enhance.js | 180 +- .../bootstrap-table-i18n-enhance.min.js | 10 + .../key-events/bootstrap-table-key-events.js | 1532 ++++++- .../bootstrap-table-key-events.min.js | 10 + .../mobile/bootstrap-table-mobile.js | 1385 +++++- .../mobile/bootstrap-table-mobile.min.js | 10 + .../bootstrap-table-multiple-sort.js | 2074 +++++++-- .../bootstrap-table-multiple-sort.min.js | 10 + .../bootstrap-table-page-jump-to.css | 19 +- .../bootstrap-table-page-jump-to.js | 1163 ++++- .../bootstrap-table-page-jump-to.min.css | 10 + .../bootstrap-table-page-jump-to.min.js | 10 + .../pipeline/bootstrap-table-pipeline.js | 1478 +++++-- .../pipeline/bootstrap-table-pipeline.min.js | 10 + .../extensions/print/bootstrap-table-print.js | 1765 +++++++- .../print/bootstrap-table-print.min.js | 10 + .../bootstrap-table-reorder-columns.js | 1564 ++++++- .../bootstrap-table-reorder-columns.min.js | 10 + .../bootstrap-table-reorder-rows.css | 20 +- .../bootstrap-table-reorder-rows.js | 1092 ++++- .../bootstrap-table-reorder-rows.min.css | 10 + .../bootstrap-table-reorder-rows.min.js | 10 + .../resizable/bootstrap-table-resizable.js | 953 +++- .../bootstrap-table-resizable.min.js | 10 + .../bootstrap-table-sticky-header.css | 3 +- .../bootstrap-table-sticky-header.js | 1315 +++++- .../bootstrap-table-sticky-header.min.css | 10 + .../bootstrap-table-sticky-header.min.js | 10 + .../toolbar/bootstrap-table-toolbar.js | 2183 +++++++++- .../toolbar/bootstrap-table-toolbar.min.js | 10 + .../treegrid/bootstrap-table-treegrid.js | 1278 +++++- .../treegrid/bootstrap-table-treegrid.min.js | 10 + .../css/bootstrap-table-filter-control.css | 13 - .../static/css/bootstrap-table-group-by.css | 11 - .../bootstrap-table-filter-control.js | 3021 ------------- .../bootstrap/bootstrap-table-group-by.js | 269 -- InvenTree/templates/base.html | 14 +- .../templates/registration/logged_out.html | 1 - InvenTree/templates/registration/login.html | 1 - .../registration/password_reset_complete.html | 1 - .../registration/password_reset_confirm.html | 1 - .../registration/password_reset_done.html | 1 - .../registration/password_reset_form.html | 1 - 75 files changed, 36980 insertions(+), 7087 deletions(-) rename InvenTree/InvenTree/static/{script/bootstrap => bootstrap-table}/bootstrap-table-en-US.min.js (100%) rename InvenTree/InvenTree/static/{css => bootstrap-table}/bootstrap-table.css (81%) rename InvenTree/InvenTree/static/{script/bootstrap => bootstrap-table}/bootstrap-table.js (100%) create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/cookie/bootstrap-table-cookie.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/export/bootstrap-table-export.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.min.css create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/filter-control/utils.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/filter-control/utils.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.min.css create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/key-events/bootstrap-table-key-events.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.min.css create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/print/bootstrap-table-print.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.min.css create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.min.css create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js create mode 100644 InvenTree/InvenTree/static/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.min.js delete mode 100644 InvenTree/InvenTree/static/css/bootstrap-table-filter-control.css delete mode 100644 InvenTree/InvenTree/static/css/bootstrap-table-group-by.css delete mode 100644 InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-filter-control.js delete mode 100644 InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js diff --git a/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js b/InvenTree/InvenTree/static/bootstrap-table/bootstrap-table-en-US.min.js similarity index 100% rename from InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js rename to InvenTree/InvenTree/static/bootstrap-table/bootstrap-table-en-US.min.js diff --git a/InvenTree/InvenTree/static/css/bootstrap-table.css b/InvenTree/InvenTree/static/bootstrap-table/bootstrap-table.css similarity index 81% rename from InvenTree/InvenTree/static/css/bootstrap-table.css rename to InvenTree/InvenTree/static/bootstrap-table/bootstrap-table.css index 7a71650329..5729f104bb 100644 --- a/InvenTree/InvenTree/static/css/bootstrap-table.css +++ b/InvenTree/InvenTree/static/bootstrap-table/bootstrap-table.css @@ -1,14 +1,14 @@ -@charset "UTF-8"; /** * @author zhixin wen - * version: 1.14.2 + * version: 1.18.3 * https://github.com/wenzhixin/bootstrap-table/ */ -.bootstrap-table .fixed-table-toolbar:after { +.bootstrap-table .fixed-table-toolbar::after { content: ""; display: block; clear: both; } + .bootstrap-table .fixed-table-toolbar .bs-bars, .bootstrap-table .fixed-table-toolbar .search, .bootstrap-table .fixed-table-toolbar .columns { @@ -16,26 +16,34 @@ margin-top: 10px; margin-bottom: 10px; } + .bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group { display: inline-block; margin-left: -1px !important; } + +.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group > .btn { + border-radius: 0; +} + .bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:first-child > .btn { border-top-left-radius: 4px; border-bottom-left-radius: 4px; } + .bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:last-child > .btn { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } -.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group > .btn { - border-radius: 0; -} + .bootstrap-table .fixed-table-toolbar .columns .dropdown-menu { text-align: left; max-height: 300px; overflow: auto; + -ms-overflow-style: scrollbar; + z-index: 1001; } + .bootstrap-table .fixed-table-toolbar .columns label { display: block; padding: 3px 20px; @@ -43,68 +51,188 @@ font-weight: normal; line-height: 1.428571429; } + .bootstrap-table .fixed-table-toolbar .columns-left { margin-right: 5px; } + .bootstrap-table .fixed-table-toolbar .columns-right { margin-left: 5px; } + .bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu { right: 0; left: auto; } + .bootstrap-table .fixed-table-container { position: relative; clear: both; } + +.bootstrap-table .fixed-table-container .table { + width: 100%; + margin-bottom: 0 !important; +} + +.bootstrap-table .fixed-table-container .table th, +.bootstrap-table .fixed-table-container .table td { + vertical-align: middle; + box-sizing: border-box; +} + +.bootstrap-table .fixed-table-container .table thead th { + vertical-align: bottom; + padding: 0; + margin: 0; +} + +.bootstrap-table .fixed-table-container .table thead th:focus { + outline: 0 solid transparent; +} + +.bootstrap-table .fixed-table-container .table thead th.detail { + width: 30px; +} + +.bootstrap-table .fixed-table-container .table thead th .th-inner { + padding: 0.75rem; + vertical-align: bottom; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bootstrap-table .fixed-table-container .table thead th .sortable { + cursor: pointer; + background-position: right; + background-repeat: no-repeat; + padding-right: 30px !important; +} + +.bootstrap-table .fixed-table-container .table thead th .both { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC"); +} + +.bootstrap-table .fixed-table-container .table thead th .asc { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg=="); +} + +.bootstrap-table .fixed-table-container .table thead th .desc { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= "); +} + +.bootstrap-table .fixed-table-container .table tbody tr.selected td { + background-color: rgba(0, 0, 0, 0.075); +} + +.bootstrap-table .fixed-table-container .table tbody tr.no-records-found td { + text-align: center; +} + +.bootstrap-table .fixed-table-container .table tbody tr .card-view { + display: flex; +} + +.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title { + font-weight: bold; + display: inline-block; + min-width: 30%; + width: auto !important; + text-align: left !important; +} + +.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-value { + width: 100% !important; +} + +.bootstrap-table .fixed-table-container .table .bs-checkbox { + text-align: center; +} + +.bootstrap-table .fixed-table-container .table .bs-checkbox label { + margin-bottom: 0; +} + +.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="radio"], +.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="checkbox"] { + margin: 0 auto !important; +} + +.bootstrap-table .fixed-table-container .table.table-sm .th-inner { + padding: 0.3rem; +} + .bootstrap-table .fixed-table-container.fixed-height:not(.has-footer) { border-bottom: 1px solid #dee2e6; } + +.bootstrap-table .fixed-table-container.fixed-height.has-card-view { + border-top: 1px solid #dee2e6; + border-bottom: 1px solid #dee2e6; +} + .bootstrap-table .fixed-table-container.fixed-height .fixed-table-border { border-left: 1px solid #dee2e6; border-right: 1px solid #dee2e6; } + .bootstrap-table .fixed-table-container.fixed-height .table thead th { border-bottom: 1px solid #dee2e6; } + .bootstrap-table .fixed-table-container.fixed-height .table-dark thead th { border-bottom: 1px solid #32383e; } + .bootstrap-table .fixed-table-container .fixed-table-header { overflow: hidden; } + .bootstrap-table .fixed-table-container .fixed-table-body { overflow-x: auto; overflow-y: auto; height: 100%; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading { align-items: center; background: #fff; - display: none; + display: flex; justify-content: center; position: absolute; bottom: 0; width: 100%; z-index: 1000; + transition: visibility 0s, opacity 0.15s ease-in-out; + opacity: 0; + visibility: hidden; } + +.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.open { + visibility: visible; + opacity: 1; +} + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap { align-items: baseline; display: flex; justify-content: center; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text { - font-size: 2rem; margin-right: 6px; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap { align-items: center; display: flex; justify-content: center; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot, -.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:after, -.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:before { +.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after, +.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::before { content: ""; animation-duration: 1.5s; animation-iteration-count: infinite; @@ -117,139 +245,102 @@ opacity: 0; width: 5px; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot { animation-delay: 0.3s; } -.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap:after { + +.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after { animation-delay: 0.6s; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark { background: #212529; } + .bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot, -.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap:after, -.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap:before { +.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::after, +.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::before { background: #fff; } -.bootstrap-table .fixed-table-container .table { - width: 100%; - margin-bottom: 0 !important; -} -.bootstrap-table .fixed-table-container .table th, -.bootstrap-table .fixed-table-container .table td { - vertical-align: middle; - box-sizing: border-box; -} -.bootstrap-table .fixed-table-container .table thead th { - vertical-align: bottom; - padding: 0; - margin: 0; -} -.bootstrap-table .fixed-table-container .table thead th:focus { - outline: 0 solid transparent; -} -.bootstrap-table .fixed-table-container .table thead th.detail { - width: 30px; -} -.bootstrap-table .fixed-table-container .table thead th .th-inner { - padding: 0.75rem; - vertical-align: bottom; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.bootstrap-table .fixed-table-container .table thead th .sortable { - cursor: pointer; - background-position: right; - background-repeat: no-repeat; - padding-right: 30px; -} -.bootstrap-table .fixed-table-container .table thead th .both { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC"); -} -.bootstrap-table .fixed-table-container .table thead th .asc { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg=="); -} -.bootstrap-table .fixed-table-container .table thead th .desc { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= "); -} -.bootstrap-table .fixed-table-container .table tbody tr.selected td { - background-color: rgba(0, 0, 0, 0.075); -} -.bootstrap-table .fixed-table-container .table tbody tr.no-records-found { - text-align: center; -} -.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title { - font-weight: bold; - display: inline-block; - min-width: 30%; - text-align: left !important; -} -.bootstrap-table .fixed-table-container .table .bs-checkbox { - text-align: center; -} -.bootstrap-table .fixed-table-container .table input[type=radio], -.bootstrap-table .fixed-table-container .table input[type=checkbox] { - margin: 0 auto !important; -} -.bootstrap-table .fixed-table-container .table.table-sm .th-inner { - padding: 0.3rem; -} + .bootstrap-table .fixed-table-container .fixed-table-footer { overflow: hidden; } -.bootstrap-table .fixed-table-pagination:after { + +.bootstrap-table .fixed-table-pagination::after { content: ""; display: block; clear: both; } + .bootstrap-table .fixed-table-pagination > .pagination-detail, .bootstrap-table .fixed-table-pagination > .pagination { margin-top: 10px; margin-bottom: 10px; } + .bootstrap-table .fixed-table-pagination > .pagination-detail .pagination-info { line-height: 34px; margin-right: 5px; } + .bootstrap-table .fixed-table-pagination > .pagination-detail .page-list { display: inline-block; } + .bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group { position: relative; display: inline-block; vertical-align: middle; } + .bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group .dropdown-menu { margin-bottom: 0; } + .bootstrap-table .fixed-table-pagination > .pagination ul.pagination { margin: 0; } -.bootstrap-table .fixed-table-pagination > .pagination ul.pagination a { - padding: 6px 12px; - line-height: 1.428571429; -} + .bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a { color: #c8c8c8; } -.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a:before { - content: "⬅"; + +.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::before { + content: '\2B05'; } -.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a:after { - content: "➡"; + +.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::after { + content: '\27A1'; } + .bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.disabled a { pointer-events: none; cursor: default; } + .bootstrap-table.fullscreen { position: fixed; top: 0; left: 0; z-index: 1050; width: 100% !important; - background: #FFF; + background: #fff; + height: calc(100vh); + overflow-y: scroll; +} + +.bootstrap-table.bootstrap4 .pagination-lg .page-link, .bootstrap-table.bootstrap5 .pagination-lg .page-link { + padding: .5rem 1rem; +} + +.bootstrap-table.bootstrap5 .float-left { + float: left; +} + +.bootstrap-table.bootstrap5 .float-right { + float: right; } /* calculate scrollbar width */ @@ -278,5 +369,3 @@ div.fixed-table-scroll-outer { opacity: 0; } } - -/*# sourceMappingURL=bootstrap-table.css.map */ diff --git a/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js b/InvenTree/InvenTree/static/bootstrap-table/bootstrap-table.js similarity index 100% rename from InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js rename to InvenTree/InvenTree/static/bootstrap-table/bootstrap-table.js diff --git a/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js b/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js index e33307f565..37bf86ad25 100644 --- a/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +++ b/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js @@ -1,116 +1,1779 @@ -/** - * @author: general - * @website: note.generals.space - * @email: generals.space@gmail.com - * @github: https://github.com/generals-space/bootstrap-table-addrbar - * @update: zhixin wen - */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : + typeof define === 'function' && define.amd ? define(['jquery'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); +}(this, (function ($) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var $__default = /*#__PURE__*/_interopDefaultLegacy($); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); + } + + function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; + } + + function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; + } + + function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); + } + + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); + } + + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + + function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var check = function (it) { + return it && it.Math == Math && it; + }; + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global_1 = + /* global globalThis -- safe */ + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + check(typeof self == 'object' && self) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + var fails = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + + // Detect IE8's incomplete defineProperty implementation + var descriptors = !fails(function () { + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; + }); + + var nativePropertyIsEnumerable = {}.propertyIsEnumerable; + var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; + + // Nashorn ~ JDK8 bug + var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + + // `Object.prototype.propertyIsEnumerable` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable + var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor$1(this, V); + return !!descriptor && descriptor.enumerable; + } : nativePropertyIsEnumerable; + + var objectPropertyIsEnumerable = { + f: f$4 + }; + + var createPropertyDescriptor = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var toString = {}.toString; + + var classofRaw = function (it) { + return toString.call(it).slice(8, -1); + }; + + var split = ''.split; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var indexedObject = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !Object('z').propertyIsEnumerable(0); + }) ? function (it) { + return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); + } : Object; + + // `RequireObjectCoercible` abstract operation + // https://tc39.es/ecma262/#sec-requireobjectcoercible + var requireObjectCoercible = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // toObject with fallback for non-array-like ES3 strings + + + + var toIndexedObject = function (it) { + return indexedObject(requireObjectCoercible(it)); + }; + + var isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + // `ToPrimitive` abstract operation + // https://tc39.es/ecma262/#sec-toprimitive + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var toPrimitive = function (input, PREFERRED_STRING) { + if (!isObject(input)) return input; + var fn, val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var hasOwnProperty = {}.hasOwnProperty; + + var has$1 = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var document = global_1.document; + // typeof document.createElement is 'object' in old IE + var EXISTS = isObject(document) && isObject(document.createElement); + + var documentCreateElement = function (it) { + return EXISTS ? document.createElement(it) : {}; + }; + + // Thank's IE8 for his funny defineProperty + var ie8DomDefine = !descriptors && !fails(function () { + return Object.defineProperty(documentCreateElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; + }); + + var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor + var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (ie8DomDefine) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); + }; + + var objectGetOwnPropertyDescriptor = { + f: f$3 + }; + + var anObject = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; + }; + + var nativeDefineProperty = Object.defineProperty; + + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (ie8DomDefine) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var objectDefineProperty = { + f: f$2 + }; + + var createNonEnumerableProperty = descriptors ? function (object, key, value) { + return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var setGlobal = function (key, value) { + try { + createNonEnumerableProperty(global_1, key, value); + } catch (error) { + global_1[key] = value; + } return value; + }; + + var SHARED = '__core-js_shared__'; + var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); + + var sharedStore = store$1; + + var functionToString = Function.toString; + + // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper + if (typeof sharedStore.inspectSource != 'function') { + sharedStore.inspectSource = function (it) { + return functionToString.call(it); + }; + } + + var inspectSource = sharedStore.inspectSource; + + var WeakMap$1 = global_1.WeakMap; + + var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1)); + + var shared = createCommonjsModule(function (module) { + (module.exports = function (key, value) { + return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: '3.9.1', + mode: 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' + }); + }); + + var id = 0; + var postfix = Math.random(); + + var uid = function (key) { + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); + }; + + var keys$1 = shared('keys'); + + var sharedKey = function (key) { + return keys$1[key] || (keys$1[key] = uid(key)); + }; + + var hiddenKeys$1 = {}; + + var WeakMap = global_1.WeakMap; + var set, get, has; + + var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); + }; + + var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; + }; + + if (nativeWeakMap) { + var store = sharedStore.state || (sharedStore.state = new WeakMap()); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function (it, metadata) { + metadata.facade = it; + wmset.call(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store, it) || {}; + }; + has = function (it) { + return wmhas.call(store, it); + }; + } else { + var STATE = sharedKey('state'); + hiddenKeys$1[STATE] = true; + set = function (it, metadata) { + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return has$1(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return has$1(it, STATE); + }; + } + + var internalState = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor + }; + + var redefine = createCommonjsModule(function (module) { + var getInternalState = internalState.get; + var enforceInternalState = internalState.enforce; + var TEMPLATE = String(String).split('String'); + + (module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var state; + if (typeof value == 'function') { + if (typeof key == 'string' && !has$1(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + } + if (O === global_1) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else createNonEnumerableProperty(O, key, value); + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || inspectSource(this); + }); + }); + + var path = global_1; + + var aFunction = function (variable) { + return typeof variable == 'function' ? variable : undefined; + }; + + var getBuiltIn = function (namespace, method) { + return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) + : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; + }; + + var ceil = Math.ceil; + var floor$1 = Math.floor; + + // `ToInteger` abstract operation + // https://tc39.es/ecma262/#sec-tointeger + var toInteger = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$1 : ceil)(argument); + }; + + var min$2 = Math.min; + + // `ToLength` abstract operation + // https://tc39.es/ecma262/#sec-tolength + var toLength = function (argument) { + return argument > 0 ? min$2(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + }; + + var max$1 = Math.max; + var min$1 = Math.min; + + // Helper for a popular repeating case of the spec: + // Let integer be ? ToInteger(index). + // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). + var toAbsoluteIndex = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length); + }; + + // `Array.prototype.{ indexOf, includes }` methods implementation + var createMethod$2 = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var arrayIncludes = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod$2(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod$2(false) + }; + + var indexOf = arrayIncludes.indexOf; + + + var objectKeysInternal = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has$1(O, key = names[i++])) { + ~indexOf(result, key) || result.push(key); + } + return result; + }; + + // IE8- don't enum bug keys + var enumBugKeys = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + + var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return objectKeysInternal(O, hiddenKeys); + }; + + var objectGetOwnPropertyNames = { + f: f$1 + }; + + var f = Object.getOwnPropertySymbols; + + var objectGetOwnPropertySymbols = { + f: f + }; + + // all object keys, includes non-enumerable and symbols + var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = objectGetOwnPropertyNames.f(anObject(it)); + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; + }; + + var copyConstructorProperties = function (target, source) { + var keys = ownKeys(source); + var defineProperty = objectDefineProperty.f; + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + }; + + var replacement = /#|\.prototype\./; + + var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; + }; + + var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); + }; + + var data = isForced.data = {}; + var NATIVE = isForced.NATIVE = 'N'; + var POLYFILL = isForced.POLYFILL = 'P'; + + var isForced_1 = isForced; + + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + + + + + -($ => { /* - * function: 获取浏览器地址栏中的指定参数. - * key: 参数名 - * url: 默认为当前地址栏 - */ - function _GET (key, url = window.location.search) { + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target + */ + var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global_1; + } else if (STATIC) { + target = global_1[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global_1[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } + }; + + // `RegExp.prototype.flags` getter implementation + // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags + var regexpFlags = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.dotAll) result += 's'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, + // so we use an intermediate function. + function RE(s, f) { + return RegExp(s, f); + } + + var UNSUPPORTED_Y$2 = fails(function () { + // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError + var re = RE('a', 'y'); + re.lastIndex = 2; + return re.exec('abcd') != null; + }); + + var BROKEN_CARET = fails(function () { + // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 + var re = RE('^r', 'gy'); + re.lastIndex = 2; + return re.exec('str') != null; + }); + + var regexpStickyHelpers = { + UNSUPPORTED_Y: UNSUPPORTED_Y$2, + BROKEN_CARET: BROKEN_CARET + }; + + var nativeExec = RegExp.prototype.exec; + // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + var nativeReplace = String.prototype.replace; + + var patchedExec = nativeExec; + + var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; + })(); + + var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET; + + // nonparticipating capturing group, copied from es5-shim's String#split patch. + // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + var sticky = UNSUPPORTED_Y$1 && re.sticky; + var flags = regexpFlags.call(re); + var source = re.source; + var charsAdded = 0; + var strCopy = str; + + if (sticky) { + flags = flags.replace('y', ''); + if (flags.indexOf('g') === -1) { + flags += 'g'; + } + + strCopy = String(str).slice(re.lastIndex); + // Support anchored sticky behavior. + if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { + source = '(?: ' + source + ')'; + strCopy = ' ' + strCopy; + charsAdded++; + } + // ^(? + rx + ) is needed, in combination with some str slicing, to + // simulate the 'y' flag. + reCopy = new RegExp('^(?:' + source + ')', flags); + } + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + source + '$(?!\\s)', flags); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = nativeExec.call(sticky ? reCopy : re, strCopy); + + if (sticky) { + if (match) { + match.input = match.input.slice(charsAdded); + match[0] = match[0].slice(charsAdded); + match.index = re.lastIndex; + re.lastIndex += match[0].length; + } else re.lastIndex = 0; + } else if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + var regexpExec = patchedExec; + + // `RegExp.prototype.exec` method + // https://tc39.es/ecma262/#sec-regexp.prototype.exec + _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { + exec: regexpExec + }); + + var engineIsNode = classofRaw(global_1.process) == 'process'; + + var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; + + var process = global_1.process; + var versions = process && process.versions; + var v8 = versions && versions.v8; + var match, version; + + if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; + } else if (engineUserAgent) { + match = engineUserAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = engineUserAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } + } + + var engineV8Version = version && +version; + + var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { + /* global Symbol -- required for testing */ + return !Symbol.sham && + // Chrome 38 Symbol has incorrect toString conversion + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41); + }); + + var useSymbolAsUid = nativeSymbol + /* global Symbol -- safe */ + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; + + var WellKnownSymbolsStore = shared('wks'); + var Symbol$1 = global_1.Symbol; + var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; + + var wellKnownSymbol = function (name) { + if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { + if (nativeSymbol && has$1(Symbol$1, name)) { + WellKnownSymbolsStore[name] = Symbol$1[name]; + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); + } + } return WellKnownSymbolsStore[name]; + }; + + // TODO: Remove from `core-js@4` since it's moved to entry points + + + + + + + + var SPECIES$3 = wellKnownSymbol('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; + }); + + // IE <= 11 replaces $0 with the whole match, as if it was $& + // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 + var REPLACE_KEEPS_$0 = (function () { + return 'a'.replace(/./, '$0') === '$0'; + })(); + + var REPLACE = wellKnownSymbol('replace'); + // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string + var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { + if (/./[REPLACE]) { + return /./[REPLACE]('a', '$0') === ''; + } + return false; + })(); + + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + // Weex JS has frozen built-in prototypes, so use try / catch wrapper + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + // eslint-disable-next-line regexp/no-empty-group -- required for testing + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; + }); + + var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { + var SYMBOL = wellKnownSymbol(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES$3] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; + } + + re.exec = function () { execCalled = true; return null; }; + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !( + REPLACE_SUPPORTS_NAMED_GROUPS && + REPLACE_KEEPS_$0 && + !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + )) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + }, { + REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, + REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE + }); + var stringMethod = methods[0]; + var regexMethod = methods[1]; + + redefine(String.prototype, KEY, stringMethod); + redefine(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return regexMethod.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return regexMethod.call(string, this); } + ); + } + + if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); + }; + + // `SameValue` abstract operation + // https://tc39.es/ecma262/#sec-samevalue + var sameValue = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare -- NaN check + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + + // `RegExpExec` abstract operation + // https://tc39.es/ecma262/#sec-regexpexec + var regexpExecAbstract = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + + if (classofRaw(R) !== 'RegExp') { + throw TypeError('RegExp#exec called on incompatible receiver'); + } + + return regexpExec.call(R, S); + }; + + // @@search logic + fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.es/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = requireObjectCoercible(this); + var searcher = regexp == undefined ? undefined : regexp[SEARCH]; + return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative(nativeSearch, regexp, this); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regexpExecAbstract(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; + }); + + var aPossiblePrototype = function (it) { + if (!isObject(it) && it !== null) { + throw TypeError("Can't set " + String(it) + ' as a prototype'); + } return it; + }; + + /* eslint-disable no-proto -- safe */ + + + + // `Object.setPrototypeOf` method + // https://tc39.es/ecma262/#sec-object.setprototypeof + // Works with __proto__ only. Old v8 can't work with null proto objects. + var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; + setter.call(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter.call(O, proto); + else O.__proto__ = proto; + return O; + }; + }() : undefined); + + // makes subclassing work correct for wrapped built-ins + var inheritIfRequired = function ($this, dummy, Wrapper) { + var NewTarget, NewTargetPrototype; + if ( + // it can work only with native `setPrototypeOf` + objectSetPrototypeOf && + // we haven't completely correct pre-ES6 way for getting `new.target`, so use this + typeof (NewTarget = dummy.constructor) == 'function' && + NewTarget !== Wrapper && + isObject(NewTargetPrototype = NewTarget.prototype) && + NewTargetPrototype !== Wrapper.prototype + ) objectSetPrototypeOf($this, NewTargetPrototype); + return $this; + }; + + var MATCH$1 = wellKnownSymbol('match'); + + // `IsRegExp` abstract operation + // https://tc39.es/ecma262/#sec-isregexp + var isRegexp = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); + }; + + var SPECIES$2 = wellKnownSymbol('species'); + + var setSpecies = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = objectDefineProperty.f; + + if (descriptors && Constructor && !Constructor[SPECIES$2]) { + defineProperty(Constructor, SPECIES$2, { + configurable: true, + get: function () { return this; } + }); + } + }; + + var defineProperty = objectDefineProperty.f; + var getOwnPropertyNames = objectGetOwnPropertyNames.f; + + + + + + var setInternalState = internalState.set; + + + + var MATCH = wellKnownSymbol('match'); + var NativeRegExp = global_1.RegExp; + var RegExpPrototype$1 = NativeRegExp.prototype; + var re1 = /a/g; + var re2 = /a/g; + + // "new" should create a new object, old webkit bug + var CORRECT_NEW = new NativeRegExp(re1) !== re1; + + var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y; + + var FORCED$1 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () { + re2[MATCH] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; + }))); + + // `RegExp` constructor + // https://tc39.es/ecma262/#sec-regexp-constructor + if (FORCED$1) { + var RegExpWrapper = function RegExp(pattern, flags) { + var thisIsRegExp = this instanceof RegExpWrapper; + var patternIsRegExp = isRegexp(pattern); + var flagsAreUndefined = flags === undefined; + var sticky; + + if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) { + return pattern; + } + + if (CORRECT_NEW) { + if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source; + } else if (pattern instanceof RegExpWrapper) { + if (flagsAreUndefined) flags = regexpFlags.call(pattern); + pattern = pattern.source; + } + + if (UNSUPPORTED_Y) { + sticky = !!flags && flags.indexOf('y') > -1; + if (sticky) flags = flags.replace(/y/g, ''); + } + + var result = inheritIfRequired( + CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags), + thisIsRegExp ? this : RegExpPrototype$1, + RegExpWrapper + ); + + if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky }); + + return result; + }; + var proxy = function (key) { + key in RegExpWrapper || defineProperty(RegExpWrapper, key, { + configurable: true, + get: function () { return NativeRegExp[key]; }, + set: function (it) { NativeRegExp[key] = it; } + }); + }; + var keys = getOwnPropertyNames(NativeRegExp); + var index = 0; + while (keys.length > index) proxy(keys[index++]); + RegExpPrototype$1.constructor = RegExpWrapper; + RegExpWrapper.prototype = RegExpPrototype$1; + redefine(global_1, 'RegExp', RegExpWrapper); + } + + // https://tc39.es/ecma262/#sec-get-regexp-@@species + setSpecies('RegExp'); + + var TO_STRING = 'toString'; + var RegExpPrototype = RegExp.prototype; + var nativeToString = RegExpPrototype[TO_STRING]; + + var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); + // FF44- RegExp#toString has a wrong name + var INCORRECT_NAME = nativeToString.name != TO_STRING; + + // `RegExp.prototype.toString` method + // https://tc39.es/ecma262/#sec-regexp.prototype.tostring + if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = String(R.source); + var rf = R.flags; + var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); + } + + // `String.prototype.{ codePointAt, at }` methods implementation + var createMethod$1 = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = String(requireObjectCoercible($this)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING ? S.charAt(position) : first + : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; + }; + + var stringMultibyte = { + // `String.prototype.codePointAt` method + // https://tc39.es/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod$1(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod$1(true) + }; + + var charAt = stringMultibyte.charAt; + + // `AdvanceStringIndex` abstract operation + // https://tc39.es/ecma262/#sec-advancestringindex + var advanceStringIndex = function (S, index, unicode) { + return index + (unicode ? charAt(S, index).length : 1); + }; + + // @@match logic + fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.es/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = requireObjectCoercible(this); + var matcher = regexp == undefined ? undefined : regexp[MATCH]; + return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative(nativeMatch, regexp, this); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + + if (!rx.global) return regexpExecAbstract(rx, S); + + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regexpExecAbstract(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; + }); + + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + var objectKeys = Object.keys || function keys(O) { + return objectKeysInternal(O, enumBugKeys); + }; + + var propertyIsEnumerable = objectPropertyIsEnumerable.f; + + // `Object.{ entries, values }` methods implementation + var createMethod = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!descriptors || propertyIsEnumerable.call(O, key)) { + result.push(TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; + }; + + var objectToArray = { + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + entries: createMethod(true), + // `Object.values` method + // https://tc39.es/ecma262/#sec-object.values + values: createMethod(false) + }; + + var $entries = objectToArray.entries; + + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + _export({ target: 'Object', stat: true }, { + entries: function entries(O) { + return $entries(O); + } + }); + + // `IsArray` abstract operation + // https://tc39.es/ecma262/#sec-isarray + var isArray = Array.isArray || function isArray(arg) { + return classofRaw(arg) == 'Array'; + }; + + // `ToObject` abstract operation + // https://tc39.es/ecma262/#sec-toobject + var toObject = function (argument) { + return Object(requireObjectCoercible(argument)); + }; + + var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; + }; + + var SPECIES$1 = wellKnownSymbol('species'); + + // `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES$1]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); + }; + + var SPECIES = wellKnownSymbol('species'); + + var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return engineV8Version >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); + }; + + var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; + var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/679 + var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; + }); + + var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + + var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); + }; + + var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + + // `Array.prototype.concat` method + // https://tc39.es/ecma262/#sec-array.prototype.concat + // with adding support of @@isConcatSpreadable and @@species + _export({ target: 'Array', proto: true, forced: FORCED }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } + }); + + var floor = Math.floor; + var replace = ''.replace; + var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; + + // https://tc39.es/ecma262/#sec-getsubstitution + var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + }; + + var max = Math.max; + var min = Math.min; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; + + // @@replace logic + fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { + var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; + var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; + var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; + + return [ + // `String.prototype.replace` method + // https://tc39.es/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; + return replacer !== undefined + ? replacer.call(searchValue, O, replaceValue) + : nativeReplace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + if ( + (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || + (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) + ) { + var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); + if (res.done) return res.value; + } + + var rx = anObject(regexp); + var S = String(this); + + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regexpExecAbstract(rx, S); + if (result === null) break; + + results.push(result); + if (!global) break; + + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + }); + + /** + * @author: general + * @website: note.generals.space + * @email: generals.space@gmail.com + * @github: https://github.com/generals-space/bootstrap-table-addrbar + * @update: zhixin wen + */ + + /* + * function: 获取浏览器地址栏中的指定参数. + * key: 参数名 + * url: 默认为当前地址栏 + */ + + function _GET(key) { + var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search; + /* * 注意这里正则表达式的书写方法 * (^|&)key匹配: 直接以key开始或以&key开始的字符串 * 同理(&|$)表示以&结束或是直接结束的字符串 * ...当然, 我并不知道这种用法. */ - const reg = new RegExp(`(^|&)${key}=([^&]*)(&|$)`) - const result = url.substr(1).match(reg) + var reg = new RegExp("(^|&)".concat(key, "=([^&]*)(&|$)")); + var result = url.substr(1).match(reg); if (result) { - return decodeURIComponent(result[2]) + return decodeURIComponent(result[2]); } - return null + + return null; } - /* - * function: 根据给定参数生成url地址 - * var dic = {name: 'genreal', age: 24} - * var url = 'https://www.baidu.com?age=22'; - * _buildUrl(dic, url); - * 将得到"https://www.baidu.com?age=24&name=genreal" - * 哦, 忽略先后顺序吧... - * - * 补充: 可以参考浏览器URLSearchParams对象, 更加方便和强大. - * 考虑到兼容性, 暂时不使用这个工具. - */ + * function: 根据给定参数生成url地址 + * var dic = {name: 'genreal', age: 24} + * var url = 'https://www.baidu.com?age=22'; + * _buildUrl(dic, url); + * 将得到"https://www.baidu.com?age=24&name=genreal" + * 哦, 忽略先后顺序吧... + * + * 补充: 可以参考浏览器URLSearchParams对象, 更加方便和强大. + * 考虑到兼容性, 暂时不使用这个工具. + */ + + + function _buildUrl(dict) { + var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search; + + for (var _i = 0, _Object$entries = Object.entries(dict); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + val = _Object$entries$_i[1]; - function _buildUrl (dict, url = window.location.search) { - for (const [key, val] of Object.entries(dict)) { // 搜索name=general这种形式的字符串(&是分隔符) - const pattern = `${key}=([^&]*)` - const targetStr = `${key}=${val}` - + var pattern = "".concat(key, "=([^&]*)"); + var targetStr = "".concat(key, "=").concat(val); + if (val === undefined) continue; /* * 如果目标url中包含了key键, 我们需要将它替换成我们自己的val * 不然就直接添加好了. */ + if (url.match(pattern)) { - const tmp = new RegExp(`(${key}=)([^&]*)`, 'gi') - url = url.replace(tmp, targetStr) + var tmp = new RegExp("(".concat(key, "=)([^&]*)"), 'gi'); + url = url.replace(tmp, targetStr); } else { - const seperator = url.match('[?]') ? '&' : '?' - url = url + seperator + targetStr + var seperator = url.match('[?]') ? '&' : '?'; + url = url + seperator + targetStr; } } + if (location.hash) { - url += location.hash + url += location.hash; } - return url + + return url; + } + /* + * function: _updateHistoryState + * var _prefix = this.options.addrPrefix || '' + * var table = this + * _updateHistoryState( table,_prefix) + * returns void + */ + + + function _updateHistoryState(table, _prefix) { + var params = {}; + params["".concat(_prefix, "page")] = table.options.pageNumber; + params["".concat(_prefix, "size")] = table.options.pageSize; + params["".concat(_prefix, "order")] = table.options.sortOrder; + params["".concat(_prefix, "sort")] = table.options.sortName; + params["".concat(_prefix, "search")] = table.options.searchText; + window.history.pushState({}, '', _buildUrl(params)); } - $.BootstrapTable = class extends $.BootstrapTable { - init () { - // 拥有addrbar选项并且其值为true的才会继续执行 - if (this.options.addrbar) { - // 标志位, 初始加载后关闭 - this.addrbarInit = true - const _prefix = this.options.addrPrefix || '' + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { + addrbar: false, + addrPrefix: '' + }); - // 优先级排序: 用户指定值最优先, 未指定时从地址栏获取, 未获取到时采用默认值 - this.options.pageSize = this.options.pageSize || ( - _GET(`${_prefix}limit`) ? parseInt(_GET(`${_prefix}limit`)) : $.BootstrapTable.DEFAULTS.pageSize - ) - this.options.pageNumber = this.options.pageNumber || ( - _GET(`${_prefix}page`) ? parseInt(_GET(`${_prefix}page`)) : $.BootstrapTable.DEFAULTS.pageNumber - ) - this.options.sortOrder = this.options.sortOrder || ( - _GET(`${_prefix}order`) ? _GET(`${_prefix}order`) : $.BootstrapTable.DEFAULTS.sortOrder - ) - this.options.sortName = this.options.sortName || ( - _GET(`${_prefix}sort`) ? _GET(`${_prefix}sort`) : 'id' - ) - this.options.searchText = this.options.searchText || ( - _GET(`${_prefix}search`) ? _GET(`${_prefix}search`) : $.BootstrapTable.DEFAULTS.searchText - ) + $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { + _inherits(_class, _$$BootstrapTable); - const _onLoadSuccess = this.options.onLoadSuccess + var _super = _createSuper(_class); - this.options.onLoadSuccess = data => { - if (this.addrbarInit) { - this.addrbarInit = false - } else { - const params = {} - params[`${_prefix}page`] = this.options.pageNumber, - params[`${_prefix}limit`] = this.options.pageSize, - params[`${_prefix}order`] = this.options.sortOrder, - params[`${_prefix}sort`] = this.options.sortName, - params[`${_prefix}search`] = this.options.searchText - // h5提供的修改浏览器地址栏的方法 - window.history.pushState({}, '', _buildUrl(params)) - } + function _class() { + _classCallCheck(this, _class); - if (_onLoadSuccess) { - _onLoadSuccess.call(this, data) - } + return _super.apply(this, arguments); + } + + _createClass(_class, [{ + key: "init", + value: function init() { + var _this = this, + _get2; + + if (this.options.pagination && this.options.addrbar) { + // 标志位, 初始加载后关闭 + this.addrbarInit = true; + this.options.pageNumber = +this.getDefaultOptionValue('pageNumber', 'page'); + this.options.pageSize = +this.getDefaultOptionValue('pageSize', 'size'); + this.options.sortOrder = this.getDefaultOptionValue('sortOrder', 'order'); + this.options.sortName = this.getDefaultOptionValue('sortName', 'sort'); + this.options.searchText = this.getDefaultOptionValue('searchText', 'search'); + + var _prefix = this.options.addrPrefix || ''; + + var _onLoadSuccess = this.options.onLoadSuccess; + var _onPageChange = this.options.onPageChange; + + this.options.onLoadSuccess = function (data) { + if (_this.addrbarInit) { + _this.addrbarInit = false; + } else { + _updateHistoryState(_this, _prefix); + } + + if (_onLoadSuccess) { + _onLoadSuccess.call(_this, data); + } + }; + + this.options.onPageChange = function (number, size) { + _updateHistoryState(_this, _prefix); + + if (_onPageChange) { + _onPageChange.call(_this, number, size); + } + }; } + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args)); } - super.init() - } - } -})(jQuery) + /* + * Priority order: + * The value specified by the user has the highest priority. + * If it is not specified, it will be obtained from the address bar. + * If it is not obtained, the default value will be used. + */ + + }, { + key: "getDefaultOptionValue", + value: function getDefaultOptionValue(optionName, prefixName) { + if (this.options[optionName] !== $__default['default'].BootstrapTable.DEFAULTS[optionName]) { + return this.options[optionName]; + } + + return _GET("".concat(this.options.addrPrefix || '').concat(prefixName)) || $__default['default'].BootstrapTable.DEFAULTS[optionName]; + } + }]); + + return _class; + }($__default['default'].BootstrapTable); + +}))); diff --git a/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.min.js b/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.min.js new file mode 100644 index 0000000000..9cc62f2749 --- /dev/null +++ b/InvenTree/InvenTree/static/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.min.js @@ -0,0 +1,10 @@ +/** + * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) + * + * @version v1.18.3 + * @homepage https://bootstrap-table.com + * @author wenzhixin (http://wenzhixin.net.cn/) + * @license MIT + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?vt:gt)(t)},bt=Math.min,xt=function(t){return t>0?bt(yt(t),9007199254740991):0},mt=Math.max,Et=Math.min,St=function(t){return function(e,n,r){var o,i=P(e),a=xt(i.length),c=function(t,e){var n=yt(t);return n<0?mt(n+e,0):Et(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Ot={includes:St(!0),indexOf:St(!1)}.indexOf,wt=function(t,e){var n,r=P(t),o=0,i=[];for(n in r)!A(rt,n)&&A(r,n)&&i.push(n);for(;e.length>o;)A(r,n=e[o++])&&(~Ot(i,n)||i.push(n));return i},jt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Rt=jt.concat("length","prototype"),Pt={f:Object.getOwnPropertyNames||function(t){return wt(t,Rt)}},Tt={f:Object.getOwnPropertySymbols},_t=dt("Reflect","ownKeys")||function(t){var e=Pt.f(k(t)),n=Tt.f;return n?e.concat(n(t)):e},It=function(t,e){for(var n=_t(e),r=L.f,o=$.f,i=0;i0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",l=" "+l,f++),n=new RegExp("^(?:"+u+")",c)),Wt&&(n=new RegExp("^"+u+"$(?!\\s)",c)),Gt&&(e=i.lastIndex),r=Vt.call(a?n:i,l),a?r?(r.input=r.input.slice(f),r[0]=r[0].slice(f),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Gt&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),Wt&&r&&r.length>1&&Kt.call(r[0],n,(function(){for(o=1;o=74)&&(Qt=Zt.match(/Chrome\/(\d+)/))&&(Ht=Qt[1]);var re=Ht&&+Ht,oe=!!Object.getOwnPropertySymbols&&!v((function(){return!Symbol.sham&&(Jt?38===re:re>37&&re<41)})),ie=oe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ae=J("wks"),ce=g.Symbol,ue=ie?ce:ce&&ce.withoutSetter||et,fe=function(t){return A(ae,t)&&(oe||"string"==typeof ae[t])||(oe&&A(ce,t)?ae[t]=ce[t]:ae[t]=ue("Symbol."+t)),ae[t]},le=fe("species"),se=!v((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),pe="$0"==="a".replace(/./,"$0"),he=fe("replace"),de=!!/./[he]&&""===/./[he]("a","$0"),ge=!v((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),ve=function(t,e,n,r){var o=fe(t),i=!v((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!v((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[le]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!a||"replace"===t&&(!se||!pe||de)||"split"===t&&!ge){var c=/./[o],u=n(o,""[t],(function(t,e,n,r,o){return e.exec===Xt?i&&!o?{done:!0,value:c.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:pe,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:de}),f=u[0],l=u[1];st(String.prototype,t,f),st(RegExp.prototype,o,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)})}r&&B(RegExp.prototype[o],"sham",!0)},ye=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},be=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==O(t))throw TypeError("RegExp#exec called on incompatible receiver");return Xt.call(t,e)};ve("search",1,(function(t,e,n){return[function(e){var n=R(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=k(t),i=String(this),a=o.lastIndex;ye(a,0)||(o.lastIndex=0);var c=be(o,i);return ye(o.lastIndex,a)||(o.lastIndex=a),null===c?-1:c.index}]}));var xe=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return k(n),function(t){if(!T(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),me=fe("match"),Ee=fe("species"),Se=L.f,Oe=Pt.f,we=lt.set,je=fe("match"),Re=g.RegExp,Pe=Re.prototype,Te=/a/g,_e=/a/g,Ie=new Re(Te)!==Te,Ae=zt.UNSUPPORTED_Y;if(y&&kt("RegExp",!Ie||Ae||v((function(){return _e[je]=!1,Re(Te)!=Te||Re(_e)==_e||"/a/i"!=Re(Te,"i")})))){for(var Ce=function(t,e){var n,r,o,i=this instanceof Ce,a=T(n=t)&&(void 0!==(r=n[me])?!!r:"RegExp"==O(n)),c=void 0===e;if(!i&&a&&t.constructor===Ce&&c)return t;Ie?a&&!c&&(t=t.source):t instanceof Ce&&(c&&(e=Bt.call(t)),t=t.source),Ae&&(o=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var u,f,l,s,p,h=(u=Ie?new Re(t,e):Re(t,e),f=i?this:Pe,l=Ce,xe&&"function"==typeof(s=f.constructor)&&s!==l&&T(p=s.prototype)&&p!==l.prototype&&xe(u,p),u);return Ae&&o&&we(h,{sticky:o}),h},De=function(t){t in Ce||Se(Ce,t,{configurable:!0,get:function(){return Re[t]},set:function(e){Re[t]=e}})},Ne=Oe(Re),Ue=0;Ne.length>Ue;)De(Ne[Ue++]);Pe.constructor=Ce,Ce.prototype=Pe,st(g,"RegExp",Ce)}!function(t){var e=dt(t),n=L.f;y&&e&&!e[Ee]&&n(e,Ee,{configurable:!0,get:function(){return this}})}("RegExp");var $e="toString",ke=RegExp.prototype,Me=ke.toString,Le=v((function(){return"/a/b"!=Me.call({source:"a",flags:"b"})})),Be=Me.name!=$e;(Le||Be)&&st(RegExp.prototype,$e,(function(){var t=k(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in ke)?Bt.call(t):n)}),{unsafe:!0});var Fe=function(t){return function(e,n){var r,o,i=String(R(e)),a=yt(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):r:t?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},ze={codeAt:Fe(!1),charAt:Fe(!0)}.charAt,Ve=function(t,e,n){return e+(n?ze(t,e).length:1)};ve("match",1,(function(t,e,n){return[function(e){var n=R(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=k(t),i=String(this);if(!o.global)return be(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],f=0;null!==(c=be(o,i));){var l=String(c[0]);u[f]=l,""===l&&(o.lastIndex=Ve(i,xt(o.lastIndex),a)),f++}return 0===f?null:u}]}));var Ke=Object.keys||function(t){return wt(t,jt)},qe=m.f,Ge=function(t){return function(e){for(var n,r=P(e),o=Ke(r),i=o.length,a=0,c=[];i>a;)n=o[a++],y&&!qe.call(r,n)||c.push(t?[n,r[n]]:r[n]);return c}},Ye={entries:Ge(!0),values:Ge(!1)}.entries;Lt({target:"Object",stat:!0},{entries:function(t){return Ye(t)}});var We,Xe=Array.isArray||function(t){return"Array"==O(t)},Qe=function(t){return Object(R(t))},He=function(t,e,n){var r=_(e);r in t?L.f(t,r,E(0,n)):t[r]=n},Je=fe("species"),Ze=function(t,e){var n;return Xe(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Xe(n.prototype)?T(n)&&null===(n=n[Je])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},tn=fe("species"),en=fe("isConcatSpreadable"),nn=9007199254740991,rn="Maximum allowed index exceeded",on=re>=51||!v((function(){var t=[];return t[en]=!1,t.concat()[0]!==t})),an=(We="concat",re>=51||!v((function(){var t=[];return(t.constructor={})[tn]=function(){return{foo:1}},1!==t[We](Boolean).foo}))),cn=function(t){if(!T(t))return!1;var e=t[en];return void 0!==e?!!e:Xe(t)};Lt({target:"Array",proto:!0,forced:!on||!an},{concat:function(t){var e,n,r,o,i,a=Qe(this),c=Ze(a,0),u=0;for(e=-1,r=arguments.length;enn)throw TypeError(rn);for(n=0;n=nn)throw TypeError(rn);He(c,u++,i)}return c.length=u,c}});var un=Math.floor,fn="".replace,ln=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,sn=/\$([$&'`]|\d{1,2})/g,pn=function(t,e,n,r,o,i){var a=n+t.length,c=r.length,u=sn;return void 0!==o&&(o=Qe(o),u=ln),fn.call(i,u,(function(i,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var l=+u;if(0===l)return i;if(l>c){var s=un(l/10);return 0===s?i:s<=c?void 0===r[s-1]?u.charAt(1):r[s-1]+u.charAt(1):i}f=r[l-1]}return void 0===f?"":f}))},hn=Math.max,dn=Math.min;function gn(t,e){var n={};n["".concat(e,"page")]=t.options.pageNumber,n["".concat(e,"size")]=t.options.pageSize,n["".concat(e,"order")]=t.options.sortOrder,n["".concat(e,"sort")]=t.options.sortName,n["".concat(e,"search")]=t.options.searchText,window.history.pushState({},"",function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search,n=0,r=Object.entries(t);n=y&&(v+=f.slice(y,m)+j,y=m+x.length)}return v+f.slice(y)}]})),n.default.extend(n.default.fn.bootstrapTable.defaults,{addrbar:!1,addrPrefix:""}),n.default.BootstrapTable=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(p,t);var e,c,l,s=u(p);function p(){return r(this,p),s.apply(this,arguments)}return e=p,(c=[{key:"init",value:function(){var t,e=this;if(this.options.pagination&&this.options.addrbar){this.addrbarInit=!0,this.options.pageNumber=+this.getDefaultOptionValue("pageNumber","page"),this.options.pageSize=+this.getDefaultOptionValue("pageSize","size"),this.options.sortOrder=this.getDefaultOptionValue("sortOrder","order"),this.options.sortName=this.getDefaultOptionValue("sortName","sort"),this.options.searchText=this.getDefaultOptionValue("searchText","search");var n=this.options.addrPrefix||"",r=this.options.onLoadSuccess,o=this.options.onPageChange;this.options.onLoadSuccess=function(t){e.addrbarInit?e.addrbarInit=!1:gn(e,n),r&&r.call(e,t)},this.options.onPageChange=function(t,r){gn(e,n),o&&o.call(e,t,r)}}for(var a=arguments.length,c=new Array(a),u=0;u1&&void 0!==arguments[1]?arguments[1]:window.location.search,n=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),r=e.substr(1).match(n);return r?decodeURIComponent(r[2]):null}("".concat(this.options.addrPrefix||"").concat(e))||n.default.BootstrapTable.DEFAULTS[t]}}])&&o(e.prototype,c),l&&o(e,l),p}(n.default.BootstrapTable)})); diff --git a/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js b/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js index 42edf633e9..287b4bd6b9 100644 --- a/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +++ b/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js @@ -1,78 +1,1211 @@ -/** - * @author: Alec Fenichel - * @webSite: https://fenichelar.com - * @update: zhixin wen - */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : + typeof define === 'function' && define.amd ? define(['jquery'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); +}(this, (function ($) { 'use strict'; -($ => { - const Utils = $.fn.bootstrapTable.utils + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - $.extend($.fn.bootstrapTable.defaults, { + var $__default = /*#__PURE__*/_interopDefaultLegacy($); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); + } + + function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; + } + + function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; + } + + function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var check = function (it) { + return it && it.Math == Math && it; + }; + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global_1 = + /* global globalThis -- safe */ + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + check(typeof self == 'object' && self) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + var fails = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + + // Detect IE8's incomplete defineProperty implementation + var descriptors = !fails(function () { + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; + }); + + var nativePropertyIsEnumerable = {}.propertyIsEnumerable; + var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; + + // Nashorn ~ JDK8 bug + var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + + // `Object.prototype.propertyIsEnumerable` method implementation + // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable + var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor$1(this, V); + return !!descriptor && descriptor.enumerable; + } : nativePropertyIsEnumerable; + + var objectPropertyIsEnumerable = { + f: f$4 + }; + + var createPropertyDescriptor = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var toString = {}.toString; + + var classofRaw = function (it) { + return toString.call(it).slice(8, -1); + }; + + var split = ''.split; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var indexedObject = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !Object('z').propertyIsEnumerable(0); + }) ? function (it) { + return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); + } : Object; + + // `RequireObjectCoercible` abstract operation + // https://tc39.es/ecma262/#sec-requireobjectcoercible + var requireObjectCoercible = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // toObject with fallback for non-array-like ES3 strings + + + + var toIndexedObject = function (it) { + return indexedObject(requireObjectCoercible(it)); + }; + + var isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + // `ToPrimitive` abstract operation + // https://tc39.es/ecma262/#sec-toprimitive + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var toPrimitive = function (input, PREFERRED_STRING) { + if (!isObject(input)) return input; + var fn, val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var hasOwnProperty = {}.hasOwnProperty; + + var has$1 = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var document$1 = global_1.document; + // typeof document.createElement is 'object' in old IE + var EXISTS = isObject(document$1) && isObject(document$1.createElement); + + var documentCreateElement = function (it) { + return EXISTS ? document$1.createElement(it) : {}; + }; + + // Thank's IE8 for his funny defineProperty + var ie8DomDefine = !descriptors && !fails(function () { + return Object.defineProperty(documentCreateElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; + }); + + var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor + var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (ie8DomDefine) try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); + }; + + var objectGetOwnPropertyDescriptor = { + f: f$3 + }; + + var anObject = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } return it; + }; + + var nativeDefineProperty = Object.defineProperty; + + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (ie8DomDefine) try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + + var objectDefineProperty = { + f: f$2 + }; + + var createNonEnumerableProperty = descriptors ? function (object, key, value) { + return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var setGlobal = function (key, value) { + try { + createNonEnumerableProperty(global_1, key, value); + } catch (error) { + global_1[key] = value; + } return value; + }; + + var SHARED = '__core-js_shared__'; + var store$1 = global_1[SHARED] || setGlobal(SHARED, {}); + + var sharedStore = store$1; + + var functionToString = Function.toString; + + // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper + if (typeof sharedStore.inspectSource != 'function') { + sharedStore.inspectSource = function (it) { + return functionToString.call(it); + }; + } + + var inspectSource = sharedStore.inspectSource; + + var WeakMap$1 = global_1.WeakMap; + + var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1)); + + var shared = createCommonjsModule(function (module) { + (module.exports = function (key, value) { + return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: '3.9.1', + mode: 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' + }); + }); + + var id = 0; + var postfix = Math.random(); + + var uid = function (key) { + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); + }; + + var keys = shared('keys'); + + var sharedKey = function (key) { + return keys[key] || (keys[key] = uid(key)); + }; + + var hiddenKeys$1 = {}; + + var WeakMap = global_1.WeakMap; + var set, get, has; + + var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); + }; + + var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; + }; + + if (nativeWeakMap) { + var store = sharedStore.state || (sharedStore.state = new WeakMap()); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function (it, metadata) { + metadata.facade = it; + wmset.call(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store, it) || {}; + }; + has = function (it) { + return wmhas.call(store, it); + }; + } else { + var STATE = sharedKey('state'); + hiddenKeys$1[STATE] = true; + set = function (it, metadata) { + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return has$1(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return has$1(it, STATE); + }; + } + + var internalState = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor + }; + + var redefine = createCommonjsModule(function (module) { + var getInternalState = internalState.get; + var enforceInternalState = internalState.enforce; + var TEMPLATE = String(String).split('String'); + + (module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var state; + if (typeof value == 'function') { + if (typeof key == 'string' && !has$1(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + } + if (O === global_1) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else createNonEnumerableProperty(O, key, value); + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || inspectSource(this); + }); + }); + + var path = global_1; + + var aFunction$1 = function (variable) { + return typeof variable == 'function' ? variable : undefined; + }; + + var getBuiltIn = function (namespace, method) { + return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace]) + : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; + }; + + var ceil = Math.ceil; + var floor = Math.floor; + + // `ToInteger` abstract operation + // https://tc39.es/ecma262/#sec-tointeger + var toInteger = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); + }; + + var min$1 = Math.min; + + // `ToLength` abstract operation + // https://tc39.es/ecma262/#sec-tolength + var toLength = function (argument) { + return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 + }; + + var max = Math.max; + var min = Math.min; + + // Helper for a popular repeating case of the spec: + // Let integer be ? ToInteger(index). + // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). + var toAbsoluteIndex = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); + }; + + // `Array.prototype.{ indexOf, includes }` methods implementation + var createMethod$1 = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + + var arrayIncludes = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod$1(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod$1(false) + }; + + var indexOf = arrayIncludes.indexOf; + + + var objectKeysInternal = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has$1(O, key = names[i++])) { + ~indexOf(result, key) || result.push(key); + } + return result; + }; + + // IE8- don't enum bug keys + var enumBugKeys = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + + var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return objectKeysInternal(O, hiddenKeys); + }; + + var objectGetOwnPropertyNames = { + f: f$1 + }; + + var f = Object.getOwnPropertySymbols; + + var objectGetOwnPropertySymbols = { + f: f + }; + + // all object keys, includes non-enumerable and symbols + var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = objectGetOwnPropertyNames.f(anObject(it)); + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; + }; + + var copyConstructorProperties = function (target, source) { + var keys = ownKeys(source); + var defineProperty = objectDefineProperty.f; + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + }; + + var replacement = /#|\.prototype\./; + + var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : typeof detection == 'function' ? fails(detection) + : !!detection; + }; + + var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); + }; + + var data = isForced.data = {}; + var NATIVE = isForced.NATIVE = 'N'; + var POLYFILL = isForced.POLYFILL = 'P'; + + var isForced_1 = isForced; + + var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; + + + + + + + /* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target + */ + var _export = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global_1; + } else if (STATIC) { + target = global_1[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global_1[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } + }; + + // `IsArray` abstract operation + // https://tc39.es/ecma262/#sec-isarray + var isArray = Array.isArray || function isArray(arg) { + return classofRaw(arg) == 'Array'; + }; + + // `ToObject` abstract operation + // https://tc39.es/ecma262/#sec-toobject + var toObject = function (argument) { + return Object(requireObjectCoercible(argument)); + }; + + var createProperty = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; + }; + + var engineIsNode = classofRaw(global_1.process) == 'process'; + + var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; + + var process = global_1.process; + var versions = process && process.versions; + var v8 = versions && versions.v8; + var match, version; + + if (v8) { + match = v8.split('.'); + version = match[0] + match[1]; + } else if (engineUserAgent) { + match = engineUserAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = engineUserAgent.match(/Chrome\/(\d+)/); + if (match) version = match[1]; + } + } + + var engineV8Version = version && +version; + + var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { + /* global Symbol -- required for testing */ + return !Symbol.sham && + // Chrome 38 Symbol has incorrect toString conversion + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41); + }); + + var useSymbolAsUid = nativeSymbol + /* global Symbol -- safe */ + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; + + var WellKnownSymbolsStore = shared('wks'); + var Symbol$1 = global_1.Symbol; + var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; + + var wellKnownSymbol = function (name) { + if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { + if (nativeSymbol && has$1(Symbol$1, name)) { + WellKnownSymbolsStore[name] = Symbol$1[name]; + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); + } + } return WellKnownSymbolsStore[name]; + }; + + var SPECIES$1 = wellKnownSymbol('species'); + + // `ArraySpeciesCreate` abstract operation + // https://tc39.es/ecma262/#sec-arrayspeciescreate + var arraySpeciesCreate = function (originalArray, length) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES$1]; + if (C === null) C = undefined; + } + } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); + }; + + var SPECIES = wellKnownSymbol('species'); + + var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return engineV8Version >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); + }; + + var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); + var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; + var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; + + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/679 + var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; + }); + + var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + + var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); + }; + + var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + + // `Array.prototype.concat` method + // https://tc39.es/ecma262/#sec-array.prototype.concat + // with adding support of @@isConcatSpreadable and @@species + _export({ target: 'Array', proto: true, forced: FORCED }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = toLength(E.length); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } + }); + + // `Object.keys` method + // https://tc39.es/ecma262/#sec-object.keys + var objectKeys = Object.keys || function keys(O) { + return objectKeysInternal(O, enumBugKeys); + }; + + var nativeAssign = Object.assign; + var defineProperty = Object.defineProperty; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + var objectAssign = !nativeAssign || fails(function () { + // should have correct order of operations (Edge bug) + if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', { + enumerable: true, + get: function () { + defineProperty(this, 'b', { + value: 3, + enumerable: false + }); + } + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + /* global Symbol -- required for testing */ + var symbol = Symbol(); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; + }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; + var propertyIsEnumerable = objectPropertyIsEnumerable.f; + while (argumentsLength > index) { + var S = indexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; + } + } return T; + } : nativeAssign; + + // `Object.assign` method + // https://tc39.es/ecma262/#sec-object.assign + _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { + assign: objectAssign + }); + + var aFunction = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } return it; + }; + + // optional / simple context binding + var functionBindContext = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 0: return function () { + return fn.call(that); + }; + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var push = [].push; + + // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation + var createMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var IS_FILTER_OUT = TYPE == 7; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject($this); + var self = indexedObject(O); + var boundFunction = functionBindContext(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push.call(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push.call(target, value); // filterOut + } + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; + }; + + var arrayIteration = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod(6), + // `Array.prototype.filterOut` method + // https://github.com/tc39/proposal-array-filtering + filterOut: createMethod(7) + }; + + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); + return O; + }; + + var html = getBuiltIn('document', 'documentElement'); + + var GT = '>'; + var LT = '<'; + var PROTOTYPE = 'prototype'; + var SCRIPT = 'script'; + var IE_PROTO = sharedKey('IE_PROTO'); + + var EmptyConstructor = function () { /* empty */ }; + + var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; + }; + + // Create object with fake `null` prototype: use ActiveX Object with cleared prototype + var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; + }; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; + }; + + // Check for document.domain and active x support + // No need to use active x approach when document.domain is not set + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + // avoid IE GC bug + var activeXDocument; + var NullProtoObject = function () { + try { + /* global ActiveXObject -- old IE */ + activeXDocument = document.domain && new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); + }; + + hiddenKeys$1[IE_PROTO] = true; + + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + var objectCreate = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : objectDefineProperties(result, Properties); + }; + + var UNSCOPABLES = wellKnownSymbol('unscopables'); + var ArrayPrototype = Array.prototype; + + // Array.prototype[@@unscopables] + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + if (ArrayPrototype[UNSCOPABLES] == undefined) { + objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: objectCreate(null) + }); + } + + // add a key to Array.prototype[@@unscopables] + var addToUnscopables = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; + }; + + var $find = arrayIteration.find; + + + var FIND = 'find'; + var SKIPS_HOLES = true; + + // Shouldn't skip holes + if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); + + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables + addToUnscopables(FIND); + + /** + * @author: Alec Fenichel + * @webSite: https://fenichelar.com + * @update: zhixin wen + */ + + var Utils = $__default['default'].fn.bootstrapTable.utils; + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { autoRefresh: false, autoRefreshInterval: 60, autoRefreshSilent: true, autoRefreshStatus: true, autoRefreshFunction: null - }) - - $.extend($.fn.bootstrapTable.defaults.icons, { - autoRefresh: Utils.bootstrapVersion === 4 ? 'fa-clock' : 'glyphicon-time icon-time' - }) - - $.extend($.fn.bootstrapTable.locales, { - formatAutoRefresh () { - return 'Auto Refresh' + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, { + autoRefresh: { + bootstrap3: 'glyphicon-time icon-time', + materialize: 'access_time', + 'bootstrap-table': 'icon-clock' + }[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock' + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, { + formatAutoRefresh: function formatAutoRefresh() { + return 'Auto Refresh'; } - }) + }); + $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales); - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales) + $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { + _inherits(_class, _$$BootstrapTable); - $.BootstrapTable = class extends $.BootstrapTable { - init (...args) { - super.init(...args) + var _super = _createSuper(_class); - if (this.options.autoRefresh && this.options.autoRefreshStatus) { - this.options.autoRefreshFunction = setInterval(() => { - this.refresh({silent: this.options.autoRefreshSilent}) - }, this.options.autoRefreshInterval * 1000) - } + function _class() { + _classCallCheck(this, _class); + + return _super.apply(this, arguments); } - initToolbar (...args) { - super.initToolbar(...args) + _createClass(_class, [{ + key: "init", + value: function init() { + var _get2; - if (this.options.autoRefresh) { - const $btnGroup = this.$toolbar.find('>.btn-group') - let $btnAutoRefresh = $btnGroup.find('.auto-refresh') + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - if (!$btnAutoRefresh.length) { - $btnAutoRefresh = $(` - - `).appendTo($btnGroup) + (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args)); - $btnAutoRefresh.on('click', $.proxy(this.toggleAutoRefresh, this)) + if (this.options.autoRefresh && this.options.autoRefreshStatus) { + this.setupRefreshInterval(); } } - } + }, { + key: "initToolbar", + value: function initToolbar() { + var _get3; - toggleAutoRefresh () { - if (this.options.autoRefresh) { - if (this.options.autoRefreshStatus) { - clearInterval(this.options.autoRefreshFunction) - this.$toolbar.find('>.btn-group').find('.auto-refresh').removeClass('active') - } else { - this.options.autoRefreshFunction = setInterval(() => { - this.refresh({silent: this.options.autoRefreshSilent}) - }, this.options.autoRefreshInterval * 1000) - this.$toolbar.find('>.btn-group').find('.auto-refresh').addClass('active') + if (this.options.autoRefresh) { + this.buttons = Object.assign(this.buttons, { + autoRefresh: { + html: "\n \n "), + event: this.toggleAutoRefresh + } + }); } - this.options.autoRefreshStatus = !this.options.autoRefreshStatus + + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + (_get3 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get3, [this].concat(args)); } - } - } -})(jQuery) + }, { + key: "toggleAutoRefresh", + value: function toggleAutoRefresh() { + if (this.options.autoRefresh) { + if (this.options.autoRefreshStatus) { + clearInterval(this.options.autoRefreshFunction); + this.$toolbar.find('>.columns .auto-refresh').removeClass(this.constants.classes.buttonActive); + } else { + this.setupRefreshInterval(); + this.$toolbar.find('>.columns .auto-refresh').addClass(this.constants.classes.buttonActive); + } + + this.options.autoRefreshStatus = !this.options.autoRefreshStatus; + } + } + }, { + key: "destroy", + value: function destroy() { + if (this.options.autoRefresh && this.options.autoRefreshStatus) { + clearInterval(this.options.autoRefreshFunction); + } + + _get(_getPrototypeOf(_class.prototype), "destroy", this).call(this); + } + }, { + key: "setupRefreshInterval", + value: function setupRefreshInterval() { + var _this = this; + + this.options.autoRefreshFunction = setInterval(function () { + if (!_this.options.autoRefresh || !_this.options.autoRefreshStatus) { + return; + } + + _this.refresh({ + silent: _this.options.autoRefreshSilent + }); + }, this.options.autoRefreshInterval * 1000); + } + }]); + + return _class; + }($__default['default'].BootstrapTable); + +}))); diff --git a/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js b/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js new file mode 100644 index 0000000000..6f73d42111 --- /dev/null +++ b/InvenTree/InvenTree/static/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js @@ -0,0 +1,10 @@ +/** + * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) + * + * @version v1.18.3 + * @homepage https://bootstrap-table.com + * @author wenzhixin (http://wenzhixin.net.cn/) + * @license MIT + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n0?vt:bt)(t)},mt=Math.min,wt=function(t){return t>0?mt(gt(t),9007199254740991):0},Ot=Math.max,jt=Math.min,Rt=function(t){return function(e,n,r){var o,i=T(e),u=wt(i.length),c=function(t,e){var n=gt(t);return n<0?Ot(n+e,0):jt(n,e)}(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},St={includes:Rt(!0),indexOf:Rt(!1)}.indexOf,Tt=function(t,e){var n,r=T(t),o=0,i=[];for(n in r)!x(nt,n)&&x(r,n)&&i.push(n);for(;e.length>o;)x(r,n=e[o++])&&(~St(i,n)||i.push(n));return i},Pt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],At=Pt.concat("length","prototype"),Et={f:Object.getOwnPropertyNames||function(t){return Tt(t,At)}},xt={f:Object.getOwnPropertySymbols},It=dt("Reflect","ownKeys")||function(t){var e=Et.f(B(t)),n=xt.f;return n?e.concat(n(t)):e},kt=function(t,e){for(var n=It(e),r=L.f,o=C.f,i=0;i=74)&&(ft=Kt.match(/Chrome\/(\d+)/))&&(st=ft[1]);var Yt,Ht=st&&+st,Jt=!!Object.getOwnPropertySymbols&&!y((function(){return!Symbol.sham&&($t?38===Ht:Ht>37&&Ht<41)})),Ut=Jt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zt=H("wks"),te=h.Symbol,ee=Ut?te:te&&te.withoutSetter||Z,ne=function(t){return x(Zt,t)&&(Jt||"string"==typeof Zt[t])||(Jt&&x(te,t)?Zt[t]=te[t]:Zt[t]=ee("Symbol."+t)),Zt[t]},re=ne("species"),oe=function(t,e){var n;return Dt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Dt(n.prototype)?P(n)&&null===(n=n[re])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},ie=ne("species"),ue=ne("isConcatSpreadable"),ce=9007199254740991,ae="Maximum allowed index exceeded",fe=Ht>=51||!y((function(){var t=[];return t[ue]=!1,t.concat()[0]!==t})),se=(Yt="concat",Ht>=51||!y((function(){var t=[];return(t.constructor={})[ie]=function(){return{foo:1}},1!==t[Yt](Boolean).foo}))),le=function(t){if(!P(t))return!1;var e=t[ue];return void 0!==e?!!e:Dt(t)};zt({target:"Array",proto:!0,forced:!fe||!se},{concat:function(t){var e,n,r,o,i,u=Wt(this),c=oe(u,0),a=0;for(e=-1,r=arguments.length;ece)throw TypeError(ae);for(n=0;n=ce)throw TypeError(ae);Gt(c,a++,i)}return c.length=a,c}});var pe=Object.keys||function(t){return Tt(t,Pt)},he=Object.assign,ye=Object.defineProperty,de=!he||y((function(){if(d&&1!==he({b:1},he(ye({},"a",{enumerable:!0,get:function(){ye(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=he({},t)[n]||pe(he({},e)).join("")!=r}))?function(t,e){for(var n=Wt(t),r=arguments.length,o=1,i=xt.f,u=g.f;r>o;)for(var c,a=R(arguments[o++]),f=i?pe(a).concat(i(a)):pe(a),s=f.length,l=0;s>l;)c=f[l++],d&&!u.call(a,c)||(n[c]=a[c]);return n}:he;zt({target:"Object",stat:!0,forced:Object.assign!==de},{assign:de});var be,ve=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},ge=[].push,me=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(a,f,s,l){for(var p,h,y=Wt(a),d=R(y),b=ve(f,s,3),v=wt(d.length),g=0,m=l||oe,w=e?m(a,v):n||u?m(a,0):void 0;v>g;g++)if((c||g in d)&&(h=b(p=d[g],g,y),t))if(e)w[g]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:ge.call(w,p)}else switch(t){case 4:return!1;case 7:ge.call(w,p)}return i?-1:r||o?o:w}},we={forEach:me(0),map:me(1),filter:me(2),some:me(3),every:me(4),find:me(5),findIndex:me(6),filterOut:me(7)},Oe=d?Object.defineProperties:function(t,e){B(t);for(var n,r=pe(e),o=r.length,i=0;o>i;)L.f(t,n=r[i++],e[n]);return t},je=dt("document","documentElement"),Re=et("IE_PROTO"),Se=function(){},Te=function(t){return" - - - - + + + + diff --git a/InvenTree/templates/registration/logged_out.html b/InvenTree/templates/registration/logged_out.html index f5882c7ff1..e26ae16c60 100644 --- a/InvenTree/templates/registration/logged_out.html +++ b/InvenTree/templates/registration/logged_out.html @@ -14,7 +14,6 @@ - diff --git a/InvenTree/templates/registration/login.html b/InvenTree/templates/registration/login.html index 3b59dde2fc..aa398cac60 100644 --- a/InvenTree/templates/registration/login.html +++ b/InvenTree/templates/registration/login.html @@ -13,7 +13,6 @@ - diff --git a/InvenTree/templates/registration/password_reset_complete.html b/InvenTree/templates/registration/password_reset_complete.html index a941aa6fee..2254e966c8 100644 --- a/InvenTree/templates/registration/password_reset_complete.html +++ b/InvenTree/templates/registration/password_reset_complete.html @@ -14,7 +14,6 @@ - diff --git a/InvenTree/templates/registration/password_reset_confirm.html b/InvenTree/templates/registration/password_reset_confirm.html index dd52cb135f..a1f6d7d258 100644 --- a/InvenTree/templates/registration/password_reset_confirm.html +++ b/InvenTree/templates/registration/password_reset_confirm.html @@ -14,7 +14,6 @@ - diff --git a/InvenTree/templates/registration/password_reset_done.html b/InvenTree/templates/registration/password_reset_done.html index 03d98846a0..044dd3d30b 100644 --- a/InvenTree/templates/registration/password_reset_done.html +++ b/InvenTree/templates/registration/password_reset_done.html @@ -14,7 +14,6 @@ - diff --git a/InvenTree/templates/registration/password_reset_form.html b/InvenTree/templates/registration/password_reset_form.html index a2c241b7d7..f221e6a11b 100644 --- a/InvenTree/templates/registration/password_reset_form.html +++ b/InvenTree/templates/registration/password_reset_form.html @@ -14,7 +14,6 @@ - From f0cf83a0b80649fac88b162660ae4c99f175c84d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 31 May 2021 16:55:21 +1000 Subject: [PATCH 58/68] Use tree-grid instead of group-by for showing test results - Much more predictable display --- InvenTree/templates/js/stock.js | 124 ++++++++++++++++---------------- 1 file changed, 60 insertions(+), 64 deletions(-) diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index b89cceea83..da653402af 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -32,17 +32,32 @@ function removeStockRow(e) { } -function passFailBadge(result) { +function passFailBadge(result, align='float-right') { if (result) { - return `{% trans "PASS" %}`; + return `{% trans "PASS" %}`; } else { - return `{% trans "FAIL" %}`; + return `{% trans "FAIL" %}`; } } -function noResultBadge() { - return `{% trans "NO RESULT" %}`; +function noResultBadge(align='float-right') { + return `{% trans "NO RESULT" %}`; +} + +function formatDate(row) { + // Function for formatting date field + var html = row.date; + + if (row.user_detail) { + html += `${row.user_detail.username}`; + } + + if (row.attachment) { + html += ``; + } + + return html; } function loadStockTestResultsTable(table, options) { @@ -50,21 +65,6 @@ function loadStockTestResultsTable(table, options) { * Load StockItemTestResult table */ - function formatDate(row) { - // Function for formatting date field - var html = row.date; - - if (row.user_detail) { - html += `${row.user_detail.username}`; - } - - if (row.attachment) { - html += ``; - } - - return html; - } - function makeButtons(row, grouped) { var html = `
    `; @@ -81,17 +81,28 @@ function loadStockTestResultsTable(table, options) { return html; } - // First, load all the test templates table.inventreeTable({ url: "{% url 'api-part-test-template-list' %}", method: 'get', name: 'testresult', + treeEnable: true, + rootParentId: options.stock_item, + parentIdField: 'parent', + idField: 'pk', + uniqueId: 'pk', + treeShowField: 'test_name', formatNoMatches: function() { - return "{% trans 'No test results found' %}"; + return '{% trans "No test results found" %}'; }, queryParams: { part: options.part, }, + onPostBody: function() { + table.treegrid({ + treeColumn: 0, + }); + table.treegrid("collapseAll"); + }, columns: [ { field: 'pk', @@ -130,100 +141,85 @@ function loadStockTestResultsTable(table, options) { { field: 'date', title: '{% trans "Test Date" %}', + sortable: true, formatter: function(value, row) { return formatDate(row); - } + }, }, { field: 'buttons', formatter: function(value, row) { return makeButtons(row, false); } - }, - ], - groupBy: true, - groupByField: 'test_name', - groupByFormatter: function(field, id, data) { - - // Extract the "latest" row (data are returned in date order from the server) - var latest = data[data.length-1]; - - switch (field) { - case 'test_name': - return latest.test_name + ` (${data.length})` + passFailBadge(latest.result); - case 'value': - return latest.value; - case 'notes': - return latest.notes; - case 'date': - return formatDate(latest); - case 'buttons': - // Buttons are done differently for grouped rows - return makeButtons(latest, true); - default: - return "---"; } - }, + ], onLoadSuccess: function(tableData) { - // Once the test template data are loaded, query for results + + // Set "parent" for each existing row + tableData.forEach(function(item, idx) { + tableData[idx].parent = options.stock_item; + }); + + // Once the test template data are loaded, query for test results inventreeGet( - "{% url 'api-stock-test-result-list' %}", + '{% url "api-stock-test-result-list" %}', { stock_item: options.stock_item, user_detail: true, attachment_detail: true, + ordering: "-date", }, { success: function(data) { + // Iterate through the returned test data + data.forEach(function(item, index) { - // Iterate through the returned test result data, and group by test - data.forEach(function(item) { var match = false; var override = false; var key = item.key; - // Try to associate this result with a test row + // Attempt to associate this result with an existing test tableData.forEach(function(row, index) { - - // The result matches the test template row if (key == row.key) { - // Force the names to be the same! item.test_name = row.test_name; item.required = row.required; + match = true; + if (row.result == null) { - // The original row has not recorded a result - override! + item.parent = options.stock_item; tableData[index] = item; override = true; + } else { + item.parent = row.pk; } - - match = true; } }); - // No match could be found (this is a new test!) + // No match could be found if (!match) { - item.test_name = item.test; + item.parent = options.stock_item; } if (!override) { tableData.push(item); } + }); - // Finally, push the data back into the table! + // Push data back into the table table.bootstrapTable("load", tableData); } - }, - ); + } + ) } }); -} +} function loadStockTable(table, options) { /* Load data into a stock table with adjustable options. From 3ba7b2d136cb6052c5f8fa1b96ea44e6ddbf6988 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 31 May 2021 17:05:12 +1000 Subject: [PATCH 59/68] Visual hack for custom part card view --- InvenTree/templates/js/part.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index 5c2840b121..81cc4e0630 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -516,11 +516,21 @@ function loadPartTable(table, url, options={}) { var html = ''; - data.forEach(function(row) { + html = `
    `; + + data.forEach(function(row, index) { + + // Force a new row every 4 columns, to prevent visual issues + if ((index > 0) && (index % 4 == 0) && (index < data.length)) { + html += `
    `; + } + html += partGridTile(row); }); - return `
    ${html}
    `; + html += `
    `; + + return html; } }); From 0375d5b940f5a87f113270abe388bd76eb263cee Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 08:30:50 +1000 Subject: [PATCH 60/68] Specify a unique parent node that cannot shadow an existing pk --- InvenTree/templates/js/stock.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index da653402af..1a052b5fa1 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -81,15 +81,17 @@ function loadStockTestResultsTable(table, options) { return html; } + var parent_node = "parent node"; + table.inventreeTable({ url: "{% url 'api-part-test-template-list' %}", method: 'get', name: 'testresult', treeEnable: true, - rootParentId: options.stock_item, + rootParentId: parent_node, parentIdField: 'parent', idField: 'pk', - uniqueId: 'pk', + uniqueId: 'key', treeShowField: 'test_name', formatNoMatches: function() { return '{% trans "No test results found" %}'; @@ -190,7 +192,7 @@ function loadStockTestResultsTable(table, options) { match = true; if (row.result == null) { - item.parent = options.stock_item; + item.parent = parent_node; tableData[index] = item; override = true; } else { @@ -202,7 +204,7 @@ function loadStockTestResultsTable(table, options) { // No match could be found if (!match) { item.test_name = item.test; - item.parent = options.stock_item; + item.parent = parent_node; } if (!override) { From 5c71f04360f1779042e43509aa96c43efd984aca Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 13:59:01 +1000 Subject: [PATCH 61/68] Add "allow_variants" field to BomItem --- .../migrations/0066_bomitem_allow_variants.py | 18 ++++++++++++++++++ InvenTree/part/models.py | 7 +++++++ InvenTree/part/serializers.py | 9 +++++---- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 InvenTree/part/migrations/0066_bomitem_allow_variants.py diff --git a/InvenTree/part/migrations/0066_bomitem_allow_variants.py b/InvenTree/part/migrations/0066_bomitem_allow_variants.py new file mode 100644 index 0000000000..e545c8e3cb --- /dev/null +++ b/InvenTree/part/migrations/0066_bomitem_allow_variants.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2 on 2021-06-01 03:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0065_auto_20210505_2144'), + ] + + operations = [ + migrations.AddField( + model_name='bomitem', + name='allow_variants', + field=models.BooleanField(default=False, help_text='Stock items for variant parts can be used for this BOM item', verbose_name='Allow Variants'), + ), + ] diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 7db998ab3d..7b9038fecb 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -2240,6 +2240,7 @@ class BomItem(models.Model): note: Note field for this BOM item checksum: Validation checksum for the particular BOM line item inherited: This BomItem can be inherited by the BOMs of variant parts + allow_variants: Stock for part variants can be substituted for this BomItem """ def save(self, *args, **kwargs): @@ -2288,6 +2289,12 @@ class BomItem(models.Model): help_text=_('This BOM item is inherited by BOMs for variant parts'), ) + allow_variants = models.BooleanField( + default=False, + verbose_name=_('Allow Variants'), + help_text=_('Stock items for variant parts can be used for this BOM item') + ) + def get_item_hash(self): """ Calculate the checksum hash of this BOM line item: diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 04e0b7a119..d03a37c6dc 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -453,6 +453,7 @@ class BomItemSerializer(InvenTreeModelSerializer): class Meta: model = BomItem fields = [ + 'allow_variants', 'inherited', 'note', 'optional', @@ -460,16 +461,16 @@ class BomItemSerializer(InvenTreeModelSerializer): 'pk', 'part', 'part_detail', + 'purchase_price_avg', + 'purchase_price_max', + 'purchase_price_min', + 'purchase_price_range', 'quantity', 'reference', 'sub_part', 'sub_part_detail', # 'price_range', 'validated', - 'purchase_price_min', - 'purchase_price_max', - 'purchase_price_avg', - 'purchase_price_range', ] From 0bd0e57f160c23dece55edd79eb878bc0295c01e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 14:03:21 +1000 Subject: [PATCH 62/68] BomList can be filtered by "allow_variants" flag --- InvenTree/part/api.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 5bdd572145..b2b70b3030 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -821,6 +821,14 @@ class BomList(generics.ListCreateAPIView): queryset = queryset.filter(inherited=inherited) + # Filter by "allow_variants" + variants = params.get("allow_variants", None) + + if variants is not None: + variants = str2bool(variants) + + queryset = queryset.filter(allow_variants=variants) + # Filter by part? part = params.get('part', None) From 9f407df15a61308a900c4ec218697233eda16d2e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 14:17:31 +1000 Subject: [PATCH 63/68] Update BOM table display --- InvenTree/part/api.py | 2 +- InvenTree/part/forms.py | 1 + InvenTree/templates/js/bom.js | 13 ++++++++++--- InvenTree/templates/js/part.js | 18 ++++++++---------- InvenTree/templates/js/table_filters.js | 4 ++++ 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index b2b70b3030..537b0f9e40 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -827,7 +827,7 @@ class BomList(generics.ListCreateAPIView): if variants is not None: variants = str2bool(variants) - queryset = queryset.filter(allow_variants=variants) + queryset = queryset.filter(allow_variants=variants) # Filter by part? part = params.get('part', None) diff --git a/InvenTree/part/forms.py b/InvenTree/part/forms.py index 8f6e3d8898..95de4961f9 100644 --- a/InvenTree/part/forms.py +++ b/InvenTree/part/forms.py @@ -352,6 +352,7 @@ class EditBomItemForm(HelperForm): 'reference', 'overage', 'note', + 'allow_variants', 'inherited', 'optional', ] diff --git a/InvenTree/templates/js/bom.js b/InvenTree/templates/js/bom.js index e35a51d8bd..7328bcb331 100644 --- a/InvenTree/templates/js/bom.js +++ b/InvenTree/templates/js/bom.js @@ -285,11 +285,18 @@ function loadBomTable(table, options) { title: '{% trans "Optional" %}', searchable: false, formatter: function(value) { - if (value == '1') return '{% trans "true" %}'; - if (value == '0') return '{% trans "false" %}'; + return yesNoLabel(value); } }); + cols.push({ + field: 'allow_variants', + title: '{% trans "Allow Variants" %}', + formatter: function(value) { + return yesNoLabel(value); + } + }) + cols.push({ field: 'inherited', title: '{% trans "Inherited" %}', @@ -297,7 +304,7 @@ function loadBomTable(table, options) { formatter: function(value, row, index, field) { // This BOM item *is* inheritable, but is defined for this BOM if (!row.inherited) { - return "-"; + return yesNoLabel(false); } else if (row.part == options.parent_id) { return '{% trans "Inherited" %}'; } else { diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index 81cc4e0630..7331ec25e0 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -5,6 +5,14 @@ * Requires api.js to be loaded first */ +function yesNoLabel(value) { + if (value) { + return `{% trans "YES" %}`; + } else { + return `{% trans "NO" %}`; + } +} + function toggleStar(options) { /* Toggle the 'starred' status of a part. * Performs AJAX queries and updates the display on the button. @@ -662,16 +670,6 @@ function loadPartCategoryTable(table, options) { }); } - -function yesNoLabel(value) { - if (value) { - return `{% trans "YES" %}`; - } else { - return `{% trans "NO" %}`; - } -} - - function loadPartTestTemplateTable(table, options) { /* * Load PartTestTemplate table. diff --git a/InvenTree/templates/js/table_filters.js b/InvenTree/templates/js/table_filters.js index 5f516e9419..d02fa50d80 100644 --- a/InvenTree/templates/js/table_filters.js +++ b/InvenTree/templates/js/table_filters.js @@ -49,6 +49,10 @@ function getAvailableTableFilters(tableKey) { inherited: { type: 'bool', title: '{% trans "Inherited" %}', + }, + allow_variants: { + type: 'bool', + title: '{% trans "Allow Variant Stock" %}', } }; } From 7578cab9a8572bcff29b604cbeaa35f9d8e2ac05 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 15:25:39 +1000 Subject: [PATCH 64/68] Add 'bom_item' field to BuildItem model - Required to link the build to the output in case of variant stock --- .../migrations/0028_builditem_bom_item.py | 20 +++++ InvenTree/build/models.py | 82 +++++++++++++++++-- 2 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 InvenTree/build/migrations/0028_builditem_bom_item.py diff --git a/InvenTree/build/migrations/0028_builditem_bom_item.py b/InvenTree/build/migrations/0028_builditem_bom_item.py new file mode 100644 index 0000000000..f93c63dc4c --- /dev/null +++ b/InvenTree/build/migrations/0028_builditem_bom_item.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2 on 2021-06-01 05:23 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0066_bomitem_allow_variants'), + ('build', '0027_auto_20210404_2016'), + ] + + operations = [ + migrations.AddField( + model_name='builditem', + name='bom_item', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='allocate_build_items', to='part.bomitem'), + ), + ] diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index c80c0e8523..afe7f335e4 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -1036,7 +1036,19 @@ class Build(MPTTModel): StockModels.StockItem.IN_STOCK_FILTER ) - items = items.filter(part=part) + # Check if variants are allowed for this part + try: + bom_item = PartModels.BomItem.objects.get(part=self.part, sub_part=part) + allow_part_variants = bom_item.allow_variants + except PartModels.BomItem.DoesNotExist: + allow_part_variants = False + + if allow_part_variants: + parts = part.get_descendants(include_self=True) + items = items.filter(part__pk__in=[p.pk for p in parts]) + + else: + items = items.filter(part=part) # Exclude any items which have already been allocated allocated = BuildItem.objects.filter( @@ -1160,10 +1172,6 @@ class BuildItem(models.Model): if self.stock_item.part and self.stock_item.part.trackable and not self.install_into: raise ValidationError(_('Build item must specify a build output, as master part is marked as trackable')) - # Allocated part must be in the BOM for the master part - if self.stock_item.part not in self.build.part.getRequiredParts(recursive=False): - errors['stock_item'] = [_("Selected stock item not found in BOM for part '{p}'").format(p=self.build.part.full_name)] - # Allocated quantity cannot exceed available stock quantity if self.quantity > self.stock_item.quantity: errors['quantity'] = [_("Allocated quantity ({n}) must not exceed available quantity ({q})").format( @@ -1189,6 +1197,61 @@ class BuildItem(models.Model): if len(errors) > 0: raise ValidationError(errors) + """ + Attempt to find the "BomItem" which links this BuildItem to the build. + + - If a BomItem is already set, and it is valid, then we are ok! + """ + + bom_item_valid = False + + if self.bom_item: + """ + A BomItem object has already been assigned. This is valid if: + + a) It points to the same "part" as the referened build + b) Either: + i) The sub_part points to the same part as the referenced StockItem + ii) The BomItem allows variants and the part referenced by the StockItem + is a variant of the sub_part referenced by the BomItem + """ + + if self.build and self.build.part == self.bom_item.part: + + # Check that the sub_part points to the stock_item (either directly or via a variant) + if self.bom_item.sub_part == self.stock_item.part: + bom_item_valid = True + + elif self.bom_item.allow_variants and self.stock_item.part in self.bom_item.sub_part.get_descendants(include_self=False): + bom_item_valid = True + + # If the existing BomItem is *not* valid, try to find a match + if not bom_item_valid: + + if self.build and self.stock_item: + ancestors = self.stock_item.part.get_ancestors(include_self=True, ascending=True) + + for idx, ancestor in enumerate(ancestors): + + try: + bom_item = PartModels.BomItem.objects.get(part=self.build.part, sub_part=ancestor) + except PartModels.BomItem.DoesNotExist: + continue + + # A matching BOM item has been found! + if idx == 0 or bom_item.allow_variants: + bom_item_valid = True + self.bom_item = bom_item + break + + # BomItem did not exist or could not be validated. + # Search for a new one + if not bom_item_valid: + + raise ValidationError({ + 'stock_item': _("Selected stock item not found in BOM for part '{p}'").format(p=self.build.part.full_name) + }) + @transaction.atomic def complete_allocation(self, user): """ @@ -1225,6 +1288,15 @@ class BuildItem(models.Model): help_text=_('Build to allocate parts') ) + # Internal model which links part <-> sub_part + # We need to track this separately, to allow for "variant' stock + bom_item = models.ForeignKey( + PartModels.BomItem, + on_delete=models.CASCADE, + related_name='allocate_build_items', + blank=True, null=True, + ) + stock_item = models.ForeignKey( 'stock.StockItem', on_delete=models.CASCADE, From ab16e1efc3b44d3ba0966a4c996aab1a6294f157 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 15:39:21 +1000 Subject: [PATCH 65/68] Custom migration to find BomItem / BuildItem links where they exist --- .../migrations/0029_auto_20210601_1525.py | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 InvenTree/build/migrations/0029_auto_20210601_1525.py diff --git a/InvenTree/build/migrations/0029_auto_20210601_1525.py b/InvenTree/build/migrations/0029_auto_20210601_1525.py new file mode 100644 index 0000000000..c5ea04b5c9 --- /dev/null +++ b/InvenTree/build/migrations/0029_auto_20210601_1525.py @@ -0,0 +1,62 @@ +# Generated by Django 3.2 on 2021-06-01 05:25 + +from django.db import migrations + + +def assign_bom_items(apps, schema_editor): + """ + Run through existing BuildItem objects, + and assign a matching BomItem + """ + + BuildItem = apps.get_model('build', 'builditem') + BomItem = apps.get_model('part', 'bomitem') + Part = apps.get_model('part', 'part') + + print("Assigning BomItems to existing BuildItem objects") + + count_valid = 0 + count_total = 0 + + for build_item in BuildItem.objects.all(): + + # Try to find a BomItem which matches the BuildItem + # Note: Before this migration, variant stock assignment was not allowed, + # so BomItem lookup should be pretty easy + + count_total += 1 + + try: + bom_item = BomItem.objects.get( + part__id=build_item.build.part.pk, + sub_part__id=build_item.stock_item.part.pk, + ) + + build_item.bom_item = bom_item + build_item.save() + + count_valid += 1 + + except BomItem.DoesNotExist: + pass + + print(f"Assigned BomItem for {count_valid}/{count_total} entries") + + +def unassign_bom_items(apps, schema_editor): + """ + Reverse migration does not do anything. + Function here to preserve ability to reverse migration + """ + pass + + +class Migration(migrations.Migration): + + dependencies = [ + ('build', '0028_builditem_bom_item'), + ] + + operations = [ + migrations.RunPython(assign_bom_items, reverse_code=unassign_bom_items), + ] From 9baf856d755314858db8556721c3679f6e673da6 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 16:14:26 +1000 Subject: [PATCH 66/68] Fixes for build item allocation rendering --- InvenTree/InvenTree/version.py | 6 +++++- InvenTree/build/models.py | 13 +++++++++++++ InvenTree/build/serializers.py | 6 ++++-- InvenTree/templates/js/build.js | 12 +++++++++++- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/InvenTree/InvenTree/version.py b/InvenTree/InvenTree/version.py index a736bfe6a1..7b8546b1c2 100644 --- a/InvenTree/InvenTree/version.py +++ b/InvenTree/InvenTree/version.py @@ -16,9 +16,13 @@ Increment thi API version number whenever there is a significant change to the A v3 -> 2021-05-22: - The updated StockItem "history tracking" now uses a different interface +v4 -> 2021-06-01 + - BOM items can now accept "variant stock" to be assigned against them + - Many slight API tweaks were needed to get this to work properly! + """ -INVENTREE_API_VERSION = 3 +INVENTREE_API_VERSION = 4 def inventreeInstanceName(): diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index afe7f335e4..031eb09303 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -30,6 +30,7 @@ from InvenTree.models import InvenTreeAttachment import common.models import InvenTree.fields +import InvenTree.helpers from stock import models as StockModels from part import models as PartModels @@ -1280,6 +1281,18 @@ class BuildItem(models.Model): # Simply remove the items from stock item.take_stock(self.quantity, user) + def getStockItemThumbnail(self): + """ + Return qualified URL for part thumbnail image + """ + + if self.stock_item and self.stock_item.part: + return InvenTree.helpers.getMediaUrl(self.stock_item.part.image.thumbnail.url) + elif self.bom_item and self.stock_item.sub_part: + return InvenTree.helpers.getMediaUrl(self.bom_item.sub_part.image.thumbnail.url) + else: + return InvenTree.helpers.getBlankThumbnail() + build = models.ForeignKey( Build, on_delete=models.CASCADE, diff --git a/InvenTree/build/serializers.py b/InvenTree/build/serializers.py index 550a3c3a85..629422f6e5 100644 --- a/InvenTree/build/serializers.py +++ b/InvenTree/build/serializers.py @@ -97,9 +97,10 @@ class BuildSerializer(InvenTreeModelSerializer): class BuildItemSerializer(InvenTreeModelSerializer): """ Serializes a BuildItem object """ + bom_part = serializers.IntegerField(source='bom_item.sub_part.pk', read_only=True) part = serializers.IntegerField(source='stock_item.part.pk', read_only=True) part_name = serializers.CharField(source='stock_item.part.full_name', read_only=True) - part_image = serializers.CharField(source='stock_item.part.image', read_only=True) + part_thumb = serializers.CharField(source='getStockItemThumbnail', read_only=True) stock_item_detail = StockItemSerializerBrief(source='stock_item', read_only=True) quantity = serializers.FloatField() @@ -108,11 +109,12 @@ class BuildItemSerializer(InvenTreeModelSerializer): model = BuildItem fields = [ 'pk', + 'bom_part', 'build', 'install_into', 'part', 'part_name', - 'part_image', + 'part_thumb', 'stock_item', 'stock_item_detail', 'quantity' diff --git a/InvenTree/templates/js/build.js b/InvenTree/templates/js/build.js index 0233974741..9523d24d39 100644 --- a/InvenTree/templates/js/build.js +++ b/InvenTree/templates/js/build.js @@ -372,7 +372,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { data.forEach(function(item) { // Group BuildItem objects by part - var part = item.part; + var part = item.bom_part || item.part; var key = parseInt(part); if (!(key in allocations)) { @@ -461,6 +461,16 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { data: row.allocations, showHeader: true, columns: [ + { + field: 'part', + title: '{% trans "Part" %}', + formatter: function(value, row) { + + var html = imageHoverIcon(row.part_thumb); + html += renderLink(row.part_name, `/part/${value}/`); + return html; + } + }, { width: '50%', field: 'quantity', From ee9df039cbba39864de34d7a425f22bfed66c532 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 16:19:24 +1000 Subject: [PATCH 67/68] allocatedItems function now takes variants into account --- InvenTree/build/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 031eb09303..03a49b627f 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -881,9 +881,12 @@ class Build(MPTTModel): output - Build output (StockItem). """ + # Remember, if 'variant' stock is allowed to be allocated, it becomes more complicated! + variants = part.get_descendants(include_self=True) + allocations = BuildItem.objects.filter( build=self, - stock_item__part=part, + stock_item__part__pk__in=[p.pk for p in variants], install_into=output, ) From b31796cbebc18f83517b7d03da90a717d5d1cb23 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 1 Jun 2021 16:40:02 +1000 Subject: [PATCH 68/68] Simplified "installed_in" table --- InvenTree/templates/js/stock.js | 337 +++++++------------------------- 1 file changed, 76 insertions(+), 261 deletions(-) diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index 1a052b5fa1..151265a3ae 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -1304,33 +1304,6 @@ function createNewStockItem(options) { function loadInstalledInTable(table, options) { /* * Display a table showing the stock items which are installed in this stock item. - * This is a multi-level tree table, where the "top level" items are Part objects, - * and the children of each top-level item are the associated installed stock items. - * - * The process for retrieving data and displaying the table is as follows: - * - * A) Get BOM data for the stock item - * - It is assumed that the stock item will be for an assembly - * (otherwise why are we installing stuff anyway?) - * - Request BOM items for stock_item.part (and only for trackable sub items) - * - * B) Add parts to table - * - Create rows for each trackable sub-part in the table - * - * C) Gather installed stock item data - * - Get the list of installed stock items via the API - * - If the Part reference is already in the table, add the sub-item as a child - * - If this is a stock item for a *new* part, request that part from the API, - * and add that part as a new row, then add the stock item as a child of that part - * - * D) Enjoy! - * - * - * And the options object contains the following things: - * - * - stock_item: The PK of the master stock_item object - * - part: The PK of the Part reference of the stock_item object - * - quantity: The quantity of the stock item */ function updateCallbacks() { @@ -1353,246 +1326,88 @@ function loadInstalledInTable(table, options) { }); } - table.inventreeTable( - { - url: "{% url 'api-bom-list' %}", - queryParams: { - part: options.part, - sub_part_trackable: true, - sub_part_detail: true, - }, - showColumns: false, - name: 'installed-in', - detailView: true, - detailViewByClick: true, - detailFilter: function(index, row) { - return row.installed_count && row.installed_count > 0; - }, - detailFormatter: function(index, row, element) { - var subTableId = `installed-table-${row.sub_part}`; + table.inventreeTable({ + url: "{% url 'api-stock-list' %}", + queryParams: { + installed_in: options.stock_item, + part_detail: true, + }, + formatNoMatches: function() { + return '{% trans "No installed items" %}'; + }, + columns: [ + { + field: 'part', + title: '{% trans "Part" %}', + formatter: function(value, row) { + var html = ''; - var html = `
    `; + html += imageHoverIcon(row.part_detail.thumbnail); + html += renderLink(row.part_detail.full_name, `/stock/item/${row.pk}/`); - element.html(html); - - var subTable = $(`#${subTableId}`); - - // Display a "sub table" showing all the linked stock items - subTable.bootstrapTable({ - data: row.installed_items, - showHeader: true, - columns: [ - { - field: 'item', - title: '{% trans "Stock Item" %}', - formatter: function(value, subrow, index, field) { - - var pk = subrow.pk; - var html = ''; - - if (subrow.serial && subrow.quantity == 1) { - html += `{% trans "Serial" %}: ${subrow.serial}`; - } else { - html += `{% trans "Quantity" %}: ${subrow.quantity}`; - } - - return renderLink(html, `/stock/item/${subrow.pk}/`); - }, - }, - { - field: 'status', - title: '{% trans "Status" %}', - formatter: function(value, subrow, index, field) { - return stockStatusDisplay(value); - } - }, - { - field: 'batch', - title: '{% trans "Batch" %}', - }, - { - field: 'actions', - title: '', - formatter: function(value, subrow, index) { - - var pk = subrow.pk; - var html = ''; - - // Add some buttons yo! - html += `
    `; - - html += makeIconButton('fa-unlink', 'button-uninstall', pk, "{% trans 'Uninstall stock item' %}"); - - html += `
    `; - - return html; - } - } - ], - onPostBody: function() { - // Setup button callbacks - subTable.find('.button-uninstall').click(function() { - var pk = $(this).attr('pk'); - - launchModalForm( - "{% url 'stock-item-uninstall' %}", - { - data: { - 'items[]': [pk], - }, - success: function() { - // Refresh entire table! - table.bootstrapTable('refresh'); - } - } - ); - }); - } - }); - }, - columns: [ - { - checkbox: true, - title: '{% trans "Select" %}', - searchable: false, - switchable: false, - }, - { - field: 'pk', - title: 'ID', - visible: false, - switchable: false, - }, - { - field: 'part', - title: '{% trans "Part" %}', - sortable: true, - formatter: function(value, row, index, field) { - - var url = `/part/${row.sub_part}/`; - var thumb = row.sub_part_detail.thumbnail; - var name = row.sub_part_detail.full_name; - - html = imageHoverIcon(thumb) + renderLink(name, url); - - if (row.not_in_bom) { - html = `${html}` - } - - return html; - } - }, - { - field: 'installed', - title: '{% trans "Installed" %}', - sortable: false, - formatter: function(value, row, index, field) { - // Construct a progress showing how many items have been installed - - var installed = row.installed_count || 0; - var required = row.quantity || 0; - - required *= options.quantity; - - var progress = makeProgressBar(installed, required, { - id: row.sub_part.pk, - }); - - return progress; - } - }, - { - field: 'actions', - switchable: false, - formatter: function(value, row) { - var pk = row.sub_part; - - var html = `
    `; - - html += makeIconButton('fa-link', 'button-install', pk, '{% trans "Install item" %}'); - - html += `
    `; - - return html; - } + return html; } - ], - onLoadSuccess: function() { - // Grab a list of parts which are actually installed in this stock item + }, + { + field: 'quantity', + title: '{% trans "Quantity" %}', + formatter: function(value, row) { - inventreeGet( - "{% url 'api-stock-list' %}", + var html = ''; + + if (row.serial && row.quantity == 1) { + html += `{% trans "Serial" %}: ${row.serial}`; + } else { + html += `${row.quantity}`; + } + + return renderLink(html, `/stock/item/${row.pk}/`); + } + }, + { + field: 'status', + title: '{% trans "Status" %}', + formatter: function(value, row) { + return stockStatusDisplay(value); + } + }, + { + field: 'batch', + title: '{% trans "Batch" %}', + }, + { + field: 'buttons', + title: '', + switchable: false, + formatter: function(value, row) { + var pk = row.pk; + var html = ''; + + html += `
    `; + html += makeIconButton('fa-unlink', 'button-uninstall', pk, '{% trans "Uninstall Stock Item" %}'); + html += `
    `; + + return html; + } + } + ], + onPostBody: function() { + // Assign callbacks to the buttons + table.find('.button-uninstall').click(function() { + var pk = $(this).attr('pk'); + + launchModalForm( + '{% url "stock-item-uninstall" %}', { - installed_in: options.stock_item, - part_detail: true, - }, - { - success: function(stock_items) { - - var table_data = table.bootstrapTable('getData'); - - stock_items.forEach(function(item) { - - var match = false; - - for (var idx = 0; idx < table_data.length; idx++) { - - var row = table_data[idx]; - - // Check each row in the table to see if this stock item matches - table_data.forEach(function(row) { - - // Match on "sub_part" - if (row.sub_part == item.part) { - - // First time? - if (row.installed_count == null) { - row.installed_count = 0; - row.installed_items = []; - } - - row.installed_count += item.quantity; - row.installed_items.push(item); - - // Push the row back into the table - table.bootstrapTable('updateRow', idx, row, true); - - match = true; - } - - }); - - if (match) { - break; - } - } - - if (!match) { - // The stock item did *not* match any items in the BOM! - // Add a new row to the table... - - // Contruct a new "row" to add to the table - var new_row = { - sub_part: item.part, - sub_part_detail: item.part_detail, - not_in_bom: true, - installed_count: item.quantity, - installed_items: [item], - }; - - table.bootstrapTable('append', [new_row]); - - } - }); - - // Update button callback links - updateCallbacks(); + data: { + 'items[]': pk, + }, + success: function() { + table.bootstrapTable('refresh'); } } - ); - - updateCallbacks(); - }, + ) + }); } - ); + }); } \ No newline at end of file