SHARE
TWEET

Untitled

a guest Mar 26th, 2020 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     async updateItemCost(omitcode = "") {
  2.         for (let irow of await oo.query.select(["Code"]).from("Item").where({Recipe: this.Code}).fetch()) {
  3.             if (!omitcode || omitcode != irow.Code) {
  4.                 let icost = await cm.ItemCost.bring(irow.Code);
  5.                 if (icost) {
  6.                     icost.SubCost = this.TotalCost;
  7.                     if (!icost.OperativeCostCurrency)
  8.                         icost.OperativeCostCurrency = await cm.Currency.default();                  
  9.                     let res = await icost.save();
  10.                     if (!res){
  11.                         this.__error_responses__ = icost.getErrorResponses();
  12.                         return res;
  13.                     }
  14.                 }
  15.             }
  16.         }
  17.         return true;
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top