GoogleスプレッドシートでTINを確認する
以前に、新しいGoogle Spreadsheetsサービスを使用して単語で金額を生成する例を既に公開しました
habrahabr.ru/blogs/google/104057
TINの入力の正確性をチェックする機能も実装されました。
テーブルを開きます
https://spreadsheets.google.com/ccc?key=0AppCRCbx33I9dG1rM2lmSW56VmFVeVBmZng0dE5jcmc&hl=en
テーブルをアカウントにコピーして、= is_valid_inn(
A3 )と必須フィールドの値へのリンクを入力するだけです
ソースコード
Copy Source | Copy HTML
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
-
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
// function is_valid_inn(i) { i += ''; if ( i.match(/\D/) ) return false; var inn = i.match(/(\d)/g); if ( inn.length == 10 ) { return inn[9] == String((( 2*inn[ 0] + 4*inn[1] + 10*inn[2] + 3*inn[3] + 5*inn[4] + 9*inn[5] + 4*inn[6] + 6*inn[7] + 8*inn[8] ) % 11) % 10); } else if ( inn.length == 12 ) { return inn[10] == String((( 7*inn[ 0] + 2*inn[1] + 4*inn[2] + 10*inn[3] + 3*inn[4] + 5*inn[5] + 9*inn[6] + 4*inn[7] + 6*inn[8] + 8*inn[9] ) % 11) % 10) && inn[11] == String((( 3*inn[ 0] + 7*inn[1] + 2*inn[2] + 4*inn[3] + 10*inn[4] + 3*inn[5] + 5*inn[6] + 9*inn[7] + 4*inn[8] + 6*inn[9] + 8*inn[10] ) % 11) % 10); } return false; }
news.eastgeology.com/2010/09/google-spreadsheets_19.html-埋め込み表の例
All Articles