Hi All
I am trying to get xero to automatically apply credit notes for me, and there is a section with a value for the current credit note, and then the value for the invoices which it could be applied to.
Blockquote
{
“Name”: “apply credit notes”,
“CreationDate”: “2021-9-27”,
“Commands”: [
{
“Command”: “label”,
“Target”: “invoices”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “open”,
“Target”: “Login | Xero Accounting Software”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!errorignore”,
“Description”: “reconcile”
},
{
“Command”: “times”,
“Target”: “20”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[4]/a”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “assertText”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/div[5]/div[3]/div[3]/label”,
“Value”: “Total Credit”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOk} == true”,
“Value”: “if total credit”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “//[@id="ext-gen29"]",
“Value”: “”,
“Description”: “”
},
{
“Command”: “assertText”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/div[4]/div[3]/dl/dd/ul/li[1]/a”,
“Value”: “Allocate Credit”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOk} == true”,
“Value”: “if apply is present”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "//[@id="ext-gen28"]/ul/li[1]/a”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeValue”,
“Target”: “id=AmountDue”,
“Value”: “remaining_credit”,
“Description”: “”
},
{
“Command”: “storeValue”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr/td[5]”,
“Value”: “amount_due”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var a = ${remaining_credit}; return a.replace(‘,’, ‘.’);”,
“Value”: “remaining_credit”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var a = ${amount_due}; return a.replace(‘,’, ‘.’);”,
“Value”: “amount_due”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “parseFloat (${remaining_credit}) - parseFloat (${amount_due}) >= 0”,
“Value”: “amount due”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “//*[@id="Credit_b1636eefdf034275b71eb2b5e90e2571"]”,
“Value”: “${amount_due}”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: " invoices",
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}
i cant seem to get uivision to pick up the values as storevalue, but it works for storetext. can anyone advise?