Created
February 27, 2019 20:09
-
-
Save ngs/8f1fae3fa7b81ab668852940366c4a4e to your computer and use it in GitHub Desktop.
Auto fill MoneyForward quotes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let unitPrice = ...; | |
| let subjects = `...`.split(/\n/g); | |
| let quantities = `...`.split(/\n/g) | |
| while($('.js-css-item-row').size() < subjects.length + 1) { | |
| $('#js-add-item').click() | |
| $('.js-css-item-row:last #quote_quote_items_attributes__unit_price').val(unitPrice) | |
| } | |
| subjects.forEach((s, i) => $(`.js-css-item-row:eq(${i}) #quote_quote_items_attributes__name`).val(s)) | |
| quantities.forEach((s, i) => $(`.js-css-item-row:eq(${i}) #quote_quote_items_attributes__quantity`).val(s)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment